aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Page.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-06-14 19:56:04 -0400
committerAndrew Manning <tamanning@zoho.com>2016-06-14 19:56:04 -0400
commiteeaafe9f3918661022b465fe0522a3f0e44065b0 (patch)
treeb0e2e941b670419950630a4cfc2b0078da69b502 /Zotlabs/Module/Page.php
parent6430a232f88ed214997d7704c18aead873094a0f (diff)
parent0ef2622621867fa197988974b47eff85f20a80e7 (diff)
downloadvolse-hubzilla-eeaafe9f3918661022b465fe0522a3f0e44065b0.tar.gz
volse-hubzilla-eeaafe9f3918661022b465fe0522a3f0e44065b0.tar.bz2
volse-hubzilla-eeaafe9f3918661022b465fe0522a3f0e44065b0.zip
Merge remote-tracking branch 'upstream/dev' into wiki
Diffstat (limited to 'Zotlabs/Module/Page.php')
-rw-r--r--Zotlabs/Module/Page.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/Zotlabs/Module/Page.php b/Zotlabs/Module/Page.php
index 14273614c..deb23da68 100644
--- a/Zotlabs/Module/Page.php
+++ b/Zotlabs/Module/Page.php
@@ -65,9 +65,10 @@ class Page extends \Zotlabs\Web\Controller {
require_once('include/security.php');
$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 item.item_delayed = 0 and (( service = 'WEBPAGE' and item_type = %d )
- OR ( service = 'PDL' AND item_type = %d )) $sql_options $revision limit 1",
+ $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",
intval($u[0]['channel_id']),
dbesc($page_id),
intval(ITEM_TYPE_WEBPAGE),
@@ -77,9 +78,9 @@ class Page extends \Zotlabs\Web\Controller {
// Check again with no permissions clause to see if it is a permissions issue
- $x = q("select item.* from item left join item_id on item.id = item_id.iid
- where item.uid = %d and sid = '%s' and item.item_delayed = 0 and service = 'WEBPAGE' and
- item_type = %d $revision limit 1",
+ $x = 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 $revision limit 1",
intval($u[0]['channel_id']),
dbesc($page_id),
intval(ITEM_TYPE_WEBPAGE)
@@ -119,11 +120,8 @@ class Page extends \Zotlabs\Web\Controller {
\App::$data['webpage'] = $r;
}
-
-
-
-
- function get() {
+
+ function get() {
$r = \App::$data['webpage'];
if(! $r)