aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Render/Comanche.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2017-10-25 13:29:19 +0200
committerMario <mario@mariovavti.com>2017-10-25 13:29:19 +0200
commit344aa13c64f0fa7a246f3284bf9cdb267e6101d3 (patch)
tree943809c01164dda7b6e4a26bc3d6c7e8c48bd6eb /Zotlabs/Render/Comanche.php
parent61c86212b944efa0d78dcc0364b81bfb8a0d19bc (diff)
parent69b22e3f7916b5ba19b5ed03a55ad72bf5995291 (diff)
downloadvolse-hubzilla-344aa13c64f0fa7a246f3284bf9cdb267e6101d3.tar.gz
volse-hubzilla-344aa13c64f0fa7a246f3284bf9cdb267e6101d3.tar.bz2
volse-hubzilla-344aa13c64f0fa7a246f3284bf9cdb267e6101d3.zip
Merge branch '2.8RC'
Diffstat (limited to 'Zotlabs/Render/Comanche.php')
-rw-r--r--Zotlabs/Render/Comanche.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/Zotlabs/Render/Comanche.php b/Zotlabs/Render/Comanche.php
index beee9796e..8831bd117 100644
--- a/Zotlabs/Render/Comanche.php
+++ b/Zotlabs/Render/Comanche.php
@@ -121,6 +121,11 @@ class Comanche {
if($cnt)
\App::$layout['theme'] = trim($matches[1]);
+ $cnt = preg_match("/\[navbar\](.*?)\[\/navbar\]/ism", $s, $matches);
+ if($cnt)
+ \App::$layout['navbar'] = trim($matches[1]);
+
+
$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
@@ -148,6 +153,7 @@ class Comanche {
* $observer.address - xchan_addr or false
* $observer.name - xchan_name or false
* $observer - xchan_hash of observer or empty string
+ * $local_channel - logged in channel_id or false
*/
function get_condition_var($v) {
@@ -157,6 +163,9 @@ class Comanche {
return get_config($x[1],$x[2]);
elseif($x[0] === 'request')
return $_SERVER['REQUEST_URI'];
+ elseif($x[0] === 'local_channel') {
+ return local_channel();
+ }
elseif($x[0] === 'observer') {
if(count($x) > 1) {
if($x[1] == 'language')
@@ -168,6 +177,8 @@ class Comanche {
return $y['xchan_addr'];
elseif($x[1] == 'name')
return $y['xchan_name'];
+ elseif($x[1] == 'webname')
+ return substr($y['xchan_addr'],0,strpos($y['xchan_addr'],'@'));
return false;
}
return get_observer_hash();
@@ -450,6 +461,9 @@ class Comanche {
}
}
+ if(! purify_filename($name))
+ return '';
+
$clsname = ucfirst($name);
$nsname = "\\Zotlabs\\Widget\\" . $clsname;