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/bookmarks.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mod/bookmarks.php') diff --git a/mod/bookmarks.php b/mod/bookmarks.php index a5b9c473f..c3d25253f 100644 --- a/mod/bookmarks.php +++ b/mod/bookmarks.php @@ -9,7 +9,9 @@ function bookmarks_init(&$a) { $u = $a->get_channel(); - $i = q("select * from item where id = %d and uid = %d limit 1", + $item_normal = item_normal(); + + $i = q("select * from item where id = %d and uid = %d $item_normal limit 1", intval($item_id), intval(local_channel()) ); @@ -23,7 +25,7 @@ function bookmarks_init(&$a) { $terms = get_terms_oftype($item['term'],TERM_BOOKMARK); - if($terms && (! $item['item_restrict'])) { + if($terms) { require_once('include/bookmarks.php'); $s = q("select * from xchan where xchan_hash = '%s' limit 1", -- cgit v1.2.3