diff options
author | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2011-05-28 10:37:33 +0200 |
---|---|---|
committer | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2011-05-28 10:37:33 +0200 |
commit | 770d1bb7a368cdaba8e7340b54fd4b13ffea66b8 (patch) | |
tree | e47786d170dacd9ca59569a8ff8e558e5d8b610c /mod/item.php | |
parent | 5e01432c6f15714370f3fd4f07eaf35615052955 (diff) | |
parent | 69f014d02b0d53ac2b42cbebe3d30418a2d0f612 (diff) | |
download | volse-hubzilla-770d1bb7a368cdaba8e7340b54fd4b13ffea66b8.tar.gz volse-hubzilla-770d1bb7a368cdaba8e7340b54fd4b13ffea66b8.tar.bz2 volse-hubzilla-770d1bb7a368cdaba8e7340b54fd4b13ffea66b8.zip |
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'mod/item.php')
-rw-r--r-- | mod/item.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mod/item.php b/mod/item.php index 82f33eaeb..b07f26e32 100644 --- a/mod/item.php +++ b/mod/item.php @@ -204,13 +204,25 @@ function item_post(&$a) { continue; $image_uri = substr($image,strrpos($image,'/') + 1); $image_uri = substr($image_uri,0, strpos($image_uri,'-')); + $srch = '<' . intval($profile_uid) . '>'; + $r = q("SELECT `id` FROM `photo` WHERE `allow_cid` = '%s' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' + AND `resource-id` = '%s' AND `uid` = %d LIMIT 1", + dbesc($srch), + dbesc($image_uri), + intval($profile_uid) + ); + if(! count($r)) + continue; + + $r = q("UPDATE `photo` SET `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' - WHERE `resource-id` = '%s' AND `album` = '%s' ", + WHERE `resource-id` = '%s' AND `uid` = %d AND `album` = '%s' ", dbesc($str_contact_allow), dbesc($str_group_allow), dbesc($str_contact_deny), dbesc($str_group_deny), dbesc($image_uri), + intval($profile_uid), dbesc( t('Wall Photos')) ); |