aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-03 01:57:11 -0700
committerfriendica <info@friendica.com>2013-09-03 01:57:11 -0700
commit0be8e4061c42372a60e0274e7947edcb81625eaa (patch)
tree0c00759b9a9d73bdc31950377bdf66860b5a5919 /include
parent9d262a186f4d7532d74f2eced4959372a9b7f392 (diff)
downloadvolse-hubzilla-0be8e4061c42372a60e0274e7947edcb81625eaa.tar.gz
volse-hubzilla-0be8e4061c42372a60e0274e7947edcb81625eaa.tar.bz2
volse-hubzilla-0be8e4061c42372a60e0274e7947edcb81625eaa.zip
testing Comanche
Diffstat (limited to 'include')
-rw-r--r--include/comanche.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/comanche.php b/include/comanche.php
index bdce0c5e2..3b50a5d85 100644
--- a/include/comanche.php
+++ b/include/comanche.php
@@ -45,15 +45,15 @@ function pdl_selector($uid,$current="") {
function comanche_parser(&$a,$s) {
- $cnt = preg_match("/\[layout\](.*?)\[\/layout\]/ism", $matches, $s);
+ $cnt = preg_match("/\[layout\](.*?)\[\/layout\]/ism", $s, $matches);
if($cnt)
$a->page['template'] = trim($matches[1]);
- $cnt = preg_match("/\[theme\](.*?)\[\/theme\]/ism", $matches, $s);
+ $cnt = preg_match("/\[theme\](.*?)\[\/theme\]/ism", $s, $matches);
if($cnt)
$a->layout['theme'] = trim($matches[1]);
- $cnt = preg_match_all("/\[region=(.*?)\](.*?)\[\/region\]/ism", $matches, $s, PREG_SET_ORDER);
+ $cnt = preg_match_all("/\[region=(.*?)\](.*?)\[\/region\]/ism", $s, $matches, PREG_SET_ORDER);
if($cnt) {
foreach($matches as $mtch) {
$a->layout['region_' . $mtch[1]] = comanche_region($a,$mtch[2]);
@@ -71,8 +71,9 @@ function comanche_menu($name) {
function comanche_replace_region($match) {
$a = get_app();
- if(array_key_exists($match[1],$a->page))
+ if(array_key_exists($match[1],$a->page)) {
return $a->page[$match[1]];
+ }
}
// Widgets will have to get any operational arguments from the session,
@@ -90,7 +91,7 @@ function comanche_widget($name,$args = null) {
function comanche_region(&$a,$s) {
- $cnt = preg_match_all("/\[menu\](.*?)\[\/menu\]/ism", $matches, $s, PREG_SET_ORDER);
+ $cnt = preg_match_all("/\[menu\](.*?)\[\/menu\]/ism", $s, $matches, PREG_SET_ORDER);
if($cnt) {
foreach($matches as $mtch) {
$s = str_replace($mtch[0],comanche_menu(trim($mtch[1])),$s);
@@ -99,7 +100,7 @@ function comanche_region(&$a,$s) {
// need to modify this to accept parameters
- $cnt = preg_match_all("/\[widget\](.*?)\[\/widget\]/ism", $matches, $s, PREG_SET_ORDER);
+ $cnt = preg_match_all("/\[widget\](.*?)\[\/widget\]/ism", $s, $matches, PREG_SET_ORDER);
if($cnt) {
foreach($matches as $mtch) {
$s = str_replace($mtch[0],comanche_widget(trim($mtch[1])),$s);