diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-06-10 16:59:04 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-06-10 16:59:04 -0700 |
commit | ca870dbf31d31455ab4f5e0f461c5af89e1573fa (patch) | |
tree | 30bf8c1a116828dc0272b5677b717f7721809b3b /mod/item.php | |
parent | 2128d5a2560383e0d3587087a7dd0aab217bc262 (diff) | |
download | volse-hubzilla-ca870dbf31d31455ab4f5e0f461c5af89e1573fa.tar.gz volse-hubzilla-ca870dbf31d31455ab4f5e0f461c5af89e1573fa.tar.bz2 volse-hubzilla-ca870dbf31d31455ab4f5e0f461c5af89e1573fa.zip |
more work on item table optimisation
Diffstat (limited to 'mod/item.php')
-rw-r--r-- | mod/item.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mod/item.php b/mod/item.php index d631bd1f2..90f681854 100644 --- a/mod/item.php +++ b/mod/item.php @@ -676,7 +676,7 @@ function item_post(&$a) { if($moderated) - $item_restrict = $item_restrict | ITEM_MODERATED; + $item_blocked = ITEM_MODERATED; if(! strlen($verb)) @@ -940,7 +940,7 @@ function item_content(&$a) { if((argc() == 3) && (argv(1) === 'drop') && intval(argv(2))) { require_once('include/items.php'); - $i = q("select id, uid, author_xchan, owner_xchan, source_xchan, item_restrict from item where id = %d limit 1", + $i = q("select id, uid, author_xchan, owner_xchan, source_xchan, item_type from item where id = %d limit 1", intval(argv(2)) ); @@ -966,7 +966,7 @@ function item_content(&$a) { // if this is a different page type or it's just a local delete // but not by the item author or owner, do a simple deletion - if($i[0]['item_restrict'] || ($local_delete && (! $can_delete))) { + if(intval($i[0]['item_type']) || ($local_delete && (! $can_delete))) { drop_item($i[0]['id']); } else { @@ -1092,7 +1092,7 @@ function item_check_service_class($channel_id,$iswebpage) { ); } else { - $r = q("select count(id) as total from item where parent = id and item_restrict = 0 and item_wall = 1 and uid = %d ", + $r = q("select count(id) as total from item where parent = id and item_wall = 1 and uid = %d " . item_normal(), intval($channel_id) ); } |