allow personalised page layouts for modules.
This commit is contained in:
parent
b1021df485
commit
08313bac6c
14
boot.php
14
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
|
// 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
|
// otherwise, if a pdl file exists for this module, use it
|
||||||
|
|
||||||
if((! count($a->layout)) && ($p = theme_include('mod_' . $a->module . '.pdl')) != '')
|
if(! count($a->layout)) {
|
||||||
comanche_parser($a,@file_get_contents($p));
|
$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);
|
$comanche = ((count($a->layout)) ? true : false);
|
||||||
|
|
||||||
|
@ -1112,8 +1112,6 @@ function get_theme_uid() {
|
|||||||
if(local_user()) {
|
if(local_user()) {
|
||||||
if((get_pconfig(local_user(),'system','always_my_theme')) || (! $uid))
|
if((get_pconfig(local_user(),'system','always_my_theme')) || (! $uid))
|
||||||
return local_user();
|
return local_user();
|
||||||
if(! $uid)
|
|
||||||
return local_user();
|
|
||||||
}
|
}
|
||||||
if(! $uid) {
|
if(! $uid) {
|
||||||
$x = get_sys_channel();
|
$x = get_sys_channel();
|
||||||
|
@ -439,7 +439,6 @@ function settings_post(&$a) {
|
|||||||
dbesc($str_group_deny),
|
dbesc($str_group_deny),
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
|
|
||||||
if($r)
|
if($r)
|
||||||
info( t('Settings updated.') . EOL);
|
info( t('Settings updated.') . EOL);
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2014-02-24.598
|
2014-02-25.599
|
||||||
|
Reference in New Issue
Block a user