From 08313bac6c7ce9f87b6b6ddf23cc5c4d50747aa1 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 25 Feb 2014 14:12:51 -0800 Subject: allow personalised page layouts for modules. --- boot.php | 14 ++++++++++++-- include/identity.php | 2 -- mod/settings.php | 1 - version.inc | 2 +- 4 files changed, 13 insertions(+), 6 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); diff --git a/include/identity.php b/include/identity.php index 2e611625a..93174031c 100644 --- a/include/identity.php +++ b/include/identity.php @@ -1112,8 +1112,6 @@ function get_theme_uid() { if(local_user()) { if((get_pconfig(local_user(),'system','always_my_theme')) || (! $uid)) return local_user(); - if(! $uid) - return local_user(); } if(! $uid) { $x = get_sys_channel(); diff --git a/mod/settings.php b/mod/settings.php index b88380ff0..13cb3cae9 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -439,7 +439,6 @@ function settings_post(&$a) { dbesc($str_group_deny), intval(local_user()) ); - if($r) info( t('Settings updated.') . EOL); diff --git a/version.inc b/version.inc index adf85ba7e..5e33a16d7 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2014-02-24.598 +2014-02-25.599 -- cgit v1.2.3