aboutsummaryrefslogtreecommitdiffstats
path: root/include/template_processor.php
diff options
context:
space:
mode:
authorMichael <icarus@dabo.de>2012-03-02 10:34:18 +0100
committerMichael <icarus@dabo.de>2012-03-02 10:34:18 +0100
commit20817b4b8ea8b7d074d57a3fd752862931cf711c (patch)
treefd0344bd209043c4d8191ef68dceb1499cf7dd9a /include/template_processor.php
parent52ea842e872cc004fd012496c828e9fb6186bec9 (diff)
parentf1bf6dcdfb89bf3c21e498ba3d76c600dafed934 (diff)
downloadvolse-hubzilla-20817b4b8ea8b7d074d57a3fd752862931cf711c.tar.gz
volse-hubzilla-20817b4b8ea8b7d074d57a3fd752862931cf711c.tar.bz2
volse-hubzilla-20817b4b8ea8b7d074d57a3fd752862931cf711c.zip
Merge remote branch 'upstream/master'
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)) {