aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-05-06 13:42:22 -0400
committerAndrew Manning <tamanning@zoho.com>2016-05-06 13:42:22 -0400
commit6950100ff4c9104fd6f980641e7118b909fd44db (patch)
tree2af109ca04cd3cd1f8a12a35bc5dbca4cffcb1ce /boot.php
parent3011d3768cb524ccf795ed64924649a2e30a036b (diff)
parentb08fc746d81e9e486988439ae9a51918e9f9ee37 (diff)
downloadvolse-hubzilla-6950100ff4c9104fd6f980641e7118b909fd44db.tar.gz
volse-hubzilla-6950100ff4c9104fd6f980641e7118b909fd44db.tar.bz2
volse-hubzilla-6950100ff4c9104fd6f980641e7118b909fd44db.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into plugin-repo
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/boot.php b/boot.php
index dab90f0a1..bc92778d4 100755
--- a/boot.php
+++ b/boot.php
@@ -724,6 +724,7 @@ class App {
public static $nav_sel;
public static $is_mobile = false;
public static $is_tablet = false;
+ public static $comanche;
public static $category;
@@ -2111,7 +2112,10 @@ function get_custom_nav(&$a, $navname) {
* @param App &$a global application object
*/
function load_pdl(&$a) {
- require_once('include/comanche.php');
+
+ App::$comanche = new Zotlabs\Render\Comanche();
+
+ // require_once('include/comanche.php');
if (! count(App::$layout)) {
@@ -2120,7 +2124,7 @@ function load_pdl(&$a) {
$layout = $arr['layout'];
$n = 'mod_' . App::$module . '.pdl' ;
- $u = comanche_get_channel_id();
+ $u = App::$comanche->get_channel_id();
if($u)
$s = get_pconfig($u, 'system', $n);
if(! $s)
@@ -2129,7 +2133,7 @@ function load_pdl(&$a) {
if((! $s) && (($p = theme_include($n)) != ''))
$s = @file_get_contents($p);
if($s) {
- comanche_parser($a, $s);
+ App::$comanche->parse($s);
App::$pdl = $s;
}
}
@@ -2138,10 +2142,10 @@ function load_pdl(&$a) {
function exec_pdl(&$a) {
- require_once('include/comanche.php');
+// require_once('include/comanche.php');
if(App::$pdl) {
- comanche_parser($a, App::$pdl,1);
+ App::$comanche->parse(App::$pdl,1);
}
}
@@ -2196,7 +2200,7 @@ function construct_page(&$a) {
App::build_pagehead();
if(App::$page['pdl_content']) {
- App::$page['content'] = comanche_region($a,App::$page['content']);
+ App::$page['content'] = App::$comanche->region(App::$page['content']);
}
// Let's say we have a comanche declaration '[region=nav][/region][region=content]$nav $content[/region]'.
@@ -2217,7 +2221,7 @@ function construct_page(&$a) {
foreach(App::$layout as $k => $v) {
if((strpos($k, 'region_') === 0) && strlen($v)) {
if(strpos($v, '$region_') !== false) {
- $v = preg_replace_callback('/\$region_([a-zA-Z0-9]+)/ism', 'comanche_replace_region', $v);
+ $v = preg_replace_callback('/\$region_([a-zA-Z0-9]+)/ism', array(App::$comanche,'replace_region'), $v);
}
// And a couple of convenience macros