aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Render/Comanche.php
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-08-26 14:43:58 -0700
committerredmatrix <mike@macgirvin.com>2016-08-26 14:43:58 -0700
commit8e243edd20e758082c3c30fd3053bd9fb0d11dcf (patch)
treeae816a76996204dcf74719705da27a6507ed47a4 /Zotlabs/Render/Comanche.php
parenta8b42fc21ec4488c2ae17b7587339aefcc93fa19 (diff)
downloadvolse-hubzilla-8e243edd20e758082c3c30fd3053bd9fb0d11dcf.tar.gz
volse-hubzilla-8e243edd20e758082c3c30fd3053bd9fb0d11dcf.tar.bz2
volse-hubzilla-8e243edd20e758082c3c30fd3053bd9fb0d11dcf.zip
add a couple of useful observer constructs to support identity aware pages
Diffstat (limited to 'Zotlabs/Render/Comanche.php')
-rw-r--r--Zotlabs/Render/Comanche.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/Zotlabs/Render/Comanche.php b/Zotlabs/Render/Comanche.php
index b0efa5e0b..91f0ce33a 100644
--- a/Zotlabs/Render/Comanche.php
+++ b/Zotlabs/Render/Comanche.php
@@ -104,8 +104,19 @@ class Comanche {
$x = explode('.',$v);
if($x[0] == 'config')
return get_config($x[1],$x[2]);
- elseif($x[0] === 'observer')
+ elseif($x[0] === 'observer') {
+ if(count($x) > 1) {
+ $y = \App::get_observer();
+ if(! $y)
+ return false;
+ if($x[1] == 'address')
+ return $y['xchan_addr'];
+ elseif($x[1] == 'name')
+ return $y['xchan_name'];
+ return false;
+ }
return get_observer_hash();
+ }
else
return false;
}