aboutsummaryrefslogtreecommitdiffstats
path: root/include/comanche.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-25 15:32:49 -0700
committerfriendica <info@friendica.com>2015-03-25 15:32:49 -0700
commite33da588bddad9269aa7ab9cdc8cb1ab49d1e9cd (patch)
tree14cee749e1a32c83df16b4e5d51248714e7aa3ba /include/comanche.php
parent022305fe8383be238a442efdbd5ba3463d15b7ab (diff)
downloadvolse-hubzilla-e33da588bddad9269aa7ab9cdc8cb1ab49d1e9cd.tar.gz
volse-hubzilla-e33da588bddad9269aa7ab9cdc8cb1ab49d1e9cd.tar.bz2
volse-hubzilla-e33da588bddad9269aa7ab9cdc8cb1ab49d1e9cd.zip
comanche: move 'webpage' declaration to the first parser pass so it is set when content loads.
Diffstat (limited to 'include/comanche.php')
-rw-r--r--include/comanche.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/comanche.php b/include/comanche.php
index 1ddabb693..71ffe99b8 100644
--- a/include/comanche.php
+++ b/include/comanche.php
@@ -79,22 +79,23 @@ function comanche_parser(&$a, $s, $pass = 0) {
if($cnt)
$a->layout['theme'] = trim($matches[1]);
- }
- else {
- $cnt = preg_match_all("/\[region=(.*?)\](.*?)\[\/region\]/ism", $s, $matches, PREG_SET_ORDER);
+ $cnt = preg_match_all("/\[webpage\](.*?)\[\/webpage\]/ism", $s, $matches, PREG_SET_ORDER);
if($cnt) {
+ // only the last webpage definition is used if there is more than one
foreach($matches as $mtch) {
- $a->layout['region_' . $mtch[1]] = comanche_region($a,$mtch[2]);
+ $a->layout['webpage'] = comanche_webpage($a,$mtch[1]);
}
}
- $cnt = preg_match_all("/\[webpage\](.*?)\[\/webpage\]/ism", $s, $matches, PREG_SET_ORDER);
+ }
+ else {
+ $cnt = preg_match_all("/\[region=(.*?)\](.*?)\[\/region\]/ism", $s, $matches, PREG_SET_ORDER);
if($cnt) {
- // only the last webpage definition is used if there is more than one
foreach($matches as $mtch) {
- $a->layout['webpage'] = comanche_webpage($a,$mtch[1]);
+ $a->layout['region_' . $mtch[1]] = comanche_region($a,$mtch[2]);
}
}
+
}
}