diff options
author | zotlabs <mike@macgirvin.com> | 2017-11-01 22:34:31 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-11-01 22:34:31 -0700 |
commit | f23c8e7597b6d96639738d0180e8cb277682ce23 (patch) | |
tree | ffcb15dd536800b67c9918756e41bb4accde3320 /Zotlabs/Module/Page.php | |
parent | e539a9e7bdd035f96d8e8406e3433d34d99435da (diff) | |
parent | 11cdc36bcc7414002c2e72fd0c45d285d9515f0c (diff) | |
download | volse-hubzilla-f23c8e7597b6d96639738d0180e8cb277682ce23.tar.gz volse-hubzilla-f23c8e7597b6d96639738d0180e8cb277682ce23.tar.bz2 volse-hubzilla-f23c8e7597b6d96639738d0180e8cb277682ce23.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Module/Page.php')
-rw-r--r-- | Zotlabs/Module/Page.php | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/Zotlabs/Module/Page.php b/Zotlabs/Module/Page.php index c142afe77..5fdd32825 100644 --- a/Zotlabs/Module/Page.php +++ b/Zotlabs/Module/Page.php @@ -89,22 +89,30 @@ class Page extends \Zotlabs\Web\Controller { if(! $ignore_language) { $r = q("select item.* from item left join iconfig on item.id = iconfig.iid where item.uid = %d and iconfig.cat = 'system' and iconfig.v = '%s' and item.item_delayed = 0 - and (( iconfig.k = 'WEBPAGE' and item_type = %d ) - OR ( iconfig.k = 'PDL' AND item_type = %d )) $sql_options $revision limit 1", + and iconfig.k = 'WEBPAGE' and item_type = %d + $sql_options $revision limit 1", intval($u[0]['channel_id']), dbesc($lang_page_id), - intval(ITEM_TYPE_WEBPAGE), - intval(ITEM_TYPE_PDL) + intval(ITEM_TYPE_WEBPAGE) + ); + } + if(! $r) { + $r = q("select item.* from item left join iconfig on item.id = iconfig.iid + where item.uid = %d and iconfig.cat = 'system' and iconfig.v = '%s' and item.item_delayed = 0 + and iconfig.k = 'WEBPAGE' and item_type = %d + $sql_options $revision limit 1", + intval($u[0]['channel_id']), + dbesc($page_id), + intval(ITEM_TYPE_WEBPAGE) ); } if(! $r) { + // no webpage by that name, but we do allow you to load/preview a layout using this module. Try that. $r = q("select item.* from item left join iconfig on item.id = iconfig.iid where item.uid = %d and iconfig.cat = 'system' and iconfig.v = '%s' and item.item_delayed = 0 - and (( iconfig.k = 'WEBPAGE' and item_type = %d ) - OR ( iconfig.k = 'PDL' AND item_type = %d )) $sql_options $revision limit 1", + and iconfig.k = 'PDL' AND item_type = %d $sql_options $revision limit 1", intval($u[0]['channel_id']), dbesc($page_id), - intval(ITEM_TYPE_WEBPAGE), intval(ITEM_TYPE_PDL) ); } @@ -129,7 +137,7 @@ class Page extends \Zotlabs\Web\Controller { } return; } - + if($r[0]['title']) \App::$page['title'] = escape_tags($r[0]['title']); |