From ca870dbf31d31455ab4f5e0f461c5af89e1573fa Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 10 Jun 2015 16:59:04 -0700 Subject: more work on item table optimisation --- mod/photos.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mod/photos.php') diff --git a/mod/photos.php b/mod/photos.php index 3338e22ab..52fbe5e4c 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -135,14 +135,13 @@ function photos_post(&$a) { goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']); } - $r = q("select id, item_restrict from item where resource_id in ( $str ) and resource_type = 'photo' and uid = %d", + $r = q("select id from item where resource_id in ( $str ) and resource_type = 'photo' and uid = %d " . item_normal(), intval($page_owner_uid) ); if($r) { foreach($r as $i) { drop_item($i['id'],false,DROPITEM_PHASE1,true /* force removal of linked items */); - if(! $item_restrict) - proc_run('php','include/notifier.php','drop',$i['id']); + proc_run('php','include/notifier.php','drop',$i['id']); } } -- cgit v1.2.3