aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Webpages.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Webpages.php')
-rw-r--r--Zotlabs/Module/Webpages.php19
1 files changed, 7 insertions, 12 deletions
diff --git a/Zotlabs/Module/Webpages.php b/Zotlabs/Module/Webpages.php
index 5e3091dfa..e449a790f 100644
--- a/Zotlabs/Module/Webpages.php
+++ b/Zotlabs/Module/Webpages.php
@@ -34,7 +34,9 @@ class Webpages extends \Zotlabs\Web\Controller {
\App::$error = 404;
return;
}
-
+
+ nav_set_selected(t('Webpages'));
+
$which = argv(1);
$_SESSION['return_url'] = \App::$query_string;
@@ -179,11 +181,8 @@ class Webpages extends \Zotlabs\Web\Controller {
// so just list titles and an edit link.
- /** @TODO - this should be replaced with pagelist_widget */
-
$sql_extra = item_permissions_sql($owner);
-
$r = q("select * from iconfig left join item on iconfig.iid = item.id
where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'WEBPAGE' and item_type = %d
$sql_extra order by item.created desc",
@@ -191,12 +190,6 @@ class Webpages extends \Zotlabs\Web\Controller {
intval(ITEM_TYPE_WEBPAGE)
);
-// $r = q("select * from item_id left join item on item_id.iid = item.id
-// where item_id.uid = %d and service = 'WEBPAGE' and item_type = %d $sql_extra order by item.created desc",
-// intval($owner),
-// intval(ITEM_TYPE_WEBPAGE)
-// );
-
if(! $r)
$x['pagetitle'] = 'home';
@@ -218,13 +211,15 @@ class Webpages extends \Zotlabs\Web\Controller {
'created' => $rr['created'],
'edited' => $rr['edited'],
'mimetype' => $rr['mimetype'],
- 'pagetitle' => $rr['v'],
+ 'pageurl' => str_replace('%2f','/',$rr['v']),
+ 'pagetitle' => urldecode($rr['v']),
'mid' => $rr['mid'],
'layout_mid' => $rr['layout_mid']
);
$pages[$rr['iid']][] = array(
'url' => $rr['iid'],
- 'pagetitle' => $rr['v'],
+ 'pageurl' => str_replace('%2f','/',$rr['v']),
+ 'pagetitle' => urldecode($rr['v']),
'title' => $rr['title'],
'created' => datetime_convert('UTC',date_default_timezone_get(),$rr['created']),
'edited' => datetime_convert('UTC',date_default_timezone_get(),$rr['edited']),