diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/page.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mod/page.php b/mod/page.php index d91f8d866..452341cb1 100644 --- a/mod/page.php +++ b/mod/page.php @@ -48,9 +48,15 @@ function page_content(&$a) { return; } + if($_REQUEST['rev']) + $revision = " and revision = " . intval($_REQUEST['rev']) . " "; + else + $revision = " order by revision desc "; + + $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 limit 1", + item_restrict = %d $revision limit 1", intval($u[0]['channel_id']), dbesc($page_id), intval(ITEM_WEBPAGE) |