straighten out some directory stuff, which required some Comanche structural changes

This commit is contained in:
friendica
2015-03-05 18:24:49 -08:00
parent e73d0ee418
commit 22391a2437
7 changed files with 110 additions and 43 deletions

View File

@@ -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) {