diff options
Diffstat (limited to 'include/Photo.php')
-rw-r--r-- | include/Photo.php | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/include/Photo.php b/include/Photo.php index ba4241a7b..324b8d776 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -311,13 +311,6 @@ class Photo { public function store($uid, $cid, $rid, $filename, $album, $scale, $profile = 0, $allow_cid = '', $allow_gid = '', $deny_cid = '', $deny_gid = '') { - $r = q("select `guid` from photo where `resource-id` = '%s' and `guid` != '' limit 1", - dbesc($rid) - ); - if(count($r)) - $guid = $r[0]['guid']; - else - $guid = get_guid(); $x = q("select id from photo where `resource-id` = '%s' and uid = %d and `contact-id` = %d and `scale` = %d limit 1", dbesc($rid), @@ -329,7 +322,6 @@ class Photo { $r = q("UPDATE `photo` set `uid` = %d, `contact-id` = %d, - `guid` = '%s', `resource-id` = '%s', `created` = '%s', `edited` = '%s', @@ -349,7 +341,6 @@ class Photo { intval($uid), intval($cid), - dbesc($guid), dbesc($rid), dbesc(datetime_convert()), dbesc(datetime_convert()), @@ -370,11 +361,10 @@ class Photo { } else { $r = q("INSERT INTO `photo` - ( `uid`, `contact-id`, `guid`, `resource-id`, `created`, `edited`, `filename`, type, `album`, `height`, `width`, `data`, `scale`, `profile`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid` ) - VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, '%s', '%s', '%s', '%s' )", + ( `uid`, `contact-id`, `resource-id`, `created`, `edited`, `filename`, type, `album`, `height`, `width`, `data`, `scale`, `profile`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid` ) + VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, '%s', '%s', '%s', '%s' )", intval($uid), intval($cid), - dbesc($guid), dbesc($rid), dbesc(datetime_convert()), dbesc(datetime_convert()), |