From 22391a24378cae317cdf62dc4be4b31b68e8191f Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 5 Mar 2015 18:24:49 -0800 Subject: straighten out some directory stuff, which required some Comanche structural changes --- boot.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 5f8dd20fd..d89b1bd41 100755 --- a/boot.php +++ b/boot.php @@ -654,7 +654,7 @@ class App { public $profile_uid = 0; // If applicable, the channel_id of the "page owner" public $poi = null; // "person of interest", generally a referenced connection public $layout = array(); // Comanche parsed template - + public $pdl = null; private $perms = null; // observer permissions private $widgets = array(); // widgets for this page //private $widgetlist = null; // widget ordering and inclusion directives @@ -2047,11 +2047,24 @@ function load_pdl(&$a) { if((! $s) && (($p = theme_include($n)) != '')) $s = @file_get_contents($p); - if($s) + if($s) { comanche_parser($a, $s); + $a->pdl = $s; + } + } +} + + +function exec_pdl(&$a) { + require_once('include/comanche.php'); + + if($a->pdl) { + comanche_parser($a, $a->pdl,1); } } + + /** * @brief build the page. * @@ -2061,6 +2074,9 @@ function load_pdl(&$a) { */ function construct_page(&$a) { + + exec_pdl($a); + $comanche = ((count($a->layout)) ? true : false); require_once(theme_include('theme_init.php')); @@ -2074,6 +2090,7 @@ function construct_page(&$a) { } if($comanche) { + if($a->layout['nav']) { $a->page['nav'] = get_custom_nav($a, $a->layout['nav']); } @@ -2124,6 +2141,7 @@ function construct_page(&$a) { call_hooks('construct_page', $arr); $a->layout = $arr['layout']; + foreach($a->layout as $k => $v) { if((strpos($k, 'region_') === 0) && strlen($v)) { if(strpos($v, '$region_') !== false) { -- cgit v1.2.3