aboutsummaryrefslogtreecommitdiffstats
path: root/include/template_processor.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2012-03-02 00:00:03 -0800
committerfabrixxm <fabrix.xm@gmail.com>2012-03-02 00:00:03 -0800
commit3a609adfb77a94d5b8681496a9306d9cf4efcafb (patch)
tree153968c7a8ac649be69438ff5374863735699bab /include/template_processor.php
parentf55ffcd48ce5c0b3254ae1a02fda7b29d875fa09 (diff)
parentb6b7742579d16a4eab97249758a62c5ff33bd07d (diff)
downloadvolse-hubzilla-3a609adfb77a94d5b8681496a9306d9cf4efcafb.tar.gz
volse-hubzilla-3a609adfb77a94d5b8681496a9306d9cf4efcafb.tar.bz2
volse-hubzilla-3a609adfb77a94d5b8681496a9306d9cf4efcafb.zip
Merge pull request #55 from fabrixxm/master
Some minor and one majior mod in templates
Diffstat (limited to 'include/template_processor.php')
-rwxr-xr-xinclude/template_processor.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/template_processor.php b/include/template_processor.php
index 28c3f07dd..b4d444e1c 100755
--- a/include/template_processor.php
+++ b/include/template_processor.php
@@ -116,7 +116,15 @@
* {{ inc <templatefile> [with $var1=$var2] }}{{ endinc }}
*/
private function _replcb_inc($args){
- list($tplfile, $newctx) = array_map('trim', explode("with",$args[2]));
+ if (strpos($args[2],"with")) {
+ list($tplfile, $newctx) = array_map('trim', explode("with",$args[2]));
+ } else {
+ $tplfile = trim($args[2]);
+ $newctx = null;
+ }
+
+ if ($tplfile[0]=="$") $tplfile = $this->_get_var($tplfile);
+
$this->_push_stack();
$r = $this->r;
if (!is_null($newctx)) {