aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-25 14:12:51 -0800
committerfriendica <info@friendica.com>2014-02-25 14:12:51 -0800
commit08313bac6c7ce9f87b6b6ddf23cc5c4d50747aa1 (patch)
tree6073cd06d11b17d13153739e58e05f57c75e930c /boot.php
parentb1021df485fb6129acda5bba616bac10aea75a45 (diff)
downloadvolse-hubzilla-08313bac6c7ce9f87b6b6ddf23cc5c4d50747aa1.tar.gz
volse-hubzilla-08313bac6c7ce9f87b6b6ddf23cc5c4d50747aa1.tar.bz2
volse-hubzilla-08313bac6c7ce9f87b6b6ddf23cc5c4d50747aa1.zip
allow personalised page layouts for modules.
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index fbab83f05..68b7c8d3c 100755
--- a/boot.php
+++ b/boot.php
@@ -1807,8 +1807,18 @@ function construct_page(&$a) {
// in case a page has overloaded a module, see if we already have a layout defined
// otherwise, if a pdl file exists for this module, use it
- if((! count($a->layout)) && ($p = theme_include('mod_' . $a->module . '.pdl')) != '')
- comanche_parser($a,@file_get_contents($p));
+ if(! count($a->layout)) {
+ $n = 'mod_' . $a->module . '.pdl' ;
+ $u = get_theme_uid();
+ if((! $u) && $a->profile_uid)
+ $u = $a->profile_uid;
+ if($u)
+ $s = get_pconfig($u,'system',$n);
+ if((! $s) && (($p = theme_include($n)) != ''))
+ $s = @file_get_contents($p);
+ if($s)
+ comanche_parser($a,$s);
+ }
$comanche = ((count($a->layout)) ? true : false);