aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-10-20 16:47:58 -0700
committerfriendica <info@friendica.com>2014-10-20 16:47:58 -0700
commitcb15c73dae51c7001fa7277ef4d324645f72c5c3 (patch)
tree3e886a2884d6a6be6481ffcdce918d99c3594f5b /mod
parentc909b8be060cb04479eba79232030e3da25410c6 (diff)
downloadvolse-hubzilla-cb15c73dae51c7001fa7277ef4d324645f72c5c3.tar.gz
volse-hubzilla-cb15c73dae51c7001fa7277ef4d324645f72c5c3.tar.bz2
volse-hubzilla-cb15c73dae51c7001fa7277ef4d324645f72c5c3.zip
move all theme initialisation to one place - just after calling module_init. Revert if there are serious issues, but please note the issues in as much detail as possible so we can work through them.
Diffstat (limited to 'mod')
-rw-r--r--mod/page.php22
1 files changed, 18 insertions, 4 deletions
diff --git a/mod/page.php b/mod/page.php
index b3f53a227..e8f17ebda 100644
--- a/mod/page.php
+++ b/mod/page.php
@@ -14,13 +14,11 @@ function page_init(&$a) {
if($a->profile['profile_uid'])
head_set_icon($a->profile['thumb']);
-}
-
+ // load the item here in the init function because we need to extract
+ // the page layout and initialise the correct theme.
-function page_content(&$a) {
-
$observer = $a->get_observer();
$ob_hash = (($observer) ? $observer['xchan_hash'] : '');
@@ -97,11 +95,27 @@ function page_content(&$a) {
}
}
+ $a->data['webpage'] = $r;
+
+
+
+}
+
+
+
+
+function page_content(&$a) {
+
+ $r = $a->data['webpage'];
+ if(! $r)
+ return;
// logger('layout: ' . print_r($a->layout,true));
// Use of widgets should be determined by Comanche, but we don't have it on system pages yet, so...
+ // I recommend we now get rid of this bit - it's quite a hack to work around... - mike
+
if ($perms['write_pages']) {
$chan = $a->channel['channel_id'];
$who = $channel_address;