diff options
Diffstat (limited to 'mod/page.php')
-rw-r--r-- | mod/page.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mod/page.php b/mod/page.php index 25b4d8888..2d977fb7a 100644 --- a/mod/page.php +++ b/mod/page.php @@ -59,11 +59,11 @@ function page_init(&$a) { $sql_options = item_permissions_sql($u[0]['channel_id']); $r = q("select item.* from item left join item_id on item.id = item_id.iid - where item.uid = %d and sid = '%s' and (( service = 'WEBPAGE' and - item_restrict = %d ) or ( service = 'PDL' and item_restrict = %d )) $sql_options $revision limit 1", + where item.uid = %d and sid = '%s' and (( service = 'WEBPAGE' and item_type = %d ) + OR ( service = 'PDL' AND item_type = %d )) $sql_options $revision limit 1", intval($u[0]['channel_id']), dbesc($page_id), - intval(ITEM_WEBPAGE), + intval(ITEM_TYPE_WEBPAGE), intval(ITEM_PDL) ); if(! $r) { @@ -72,10 +72,10 @@ function page_init(&$a) { $x = q("select item.* from item left join item_id on item.id = item_id.iid where item.uid = %d and sid = '%s' and service = 'WEBPAGE' and - item_restrict = %d $revision limit 1", + item_type = %d $revision limit 1", intval($u[0]['channel_id']), dbesc($page_id), - intval(ITEM_WEBPAGE) + intval(ITEM_TYPE_WEBPAGE) ); if($x) { // Yes, it's there. You just aren't allowed to see it. |