aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-27 18:40:33 -0700
committerfriendica <info@friendica.com>2013-08-27 18:40:33 -0700
commit390a1ce552d57fe5eea6bc2ed43ea0b8bb07c77b (patch)
tree369069091264b842c787e69af04c2e1a52217cab /mod/photos.php
parentb77eaebb3a424247ca3fc7bef5c79b775a2db0e2 (diff)
downloadvolse-hubzilla-390a1ce552d57fe5eea6bc2ed43ea0b8bb07c77b.tar.gz
volse-hubzilla-390a1ce552d57fe5eea6bc2ed43ea0b8bb07c77b.tar.bz2
volse-hubzilla-390a1ce552d57fe5eea6bc2ed43ea0b8bb07c77b.zip
more loose ends
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 789e26949..5573f6a87 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -184,12 +184,13 @@ function photos_post(&$a) {
intval($page_owner_uid),
dbesc($r[0]['resource_id'])
);
- $i = q("SELECT * FROM `item` WHERE `resource_id` = '%s' AND `uid` = %d LIMIT 1",
+ $i = q("SELECT * FROM `item` WHERE `resource_id` = '%s' AND resource_type = 'photo' and `uid` = %d LIMIT 1",
dbesc($r[0]['resource_id']),
intval($page_owner_uid)
);
if(count($i)) {
- q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent_mid` = '%s' AND `uid` = %d",
+ q("UPDATE `item` SET item_restrict = (item_restrict & %d), `edited` = '%s', `changed` = '%s' WHERE `parent_mid` = '%s' AND `uid` = %d",
+ intval(ITEM_DELETED),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc($i[0]['mid']),