aboutsummaryrefslogtreecommitdiffstats
path: root/include/template_processor.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-06-16 14:56:43 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-06-16 14:56:43 +0200
commitede011cc32b34b9da797813a0a901847d2a68a7a (patch)
treef7b30ecb8d7df4fb12c5694bfd39792ea5d40499 /include/template_processor.php
parentc94b809634cd92c69be3483c935e6741b7d0c090 (diff)
downloadvolse-hubzilla-ede011cc32b34b9da797813a0a901847d2a68a7a.tar.gz
volse-hubzilla-ede011cc32b34b9da797813a0a901847d2a68a7a.tar.bz2
volse-hubzilla-ede011cc32b34b9da797813a0a901847d2a68a7a.zip
Admin users page. some fix to template processor.
Diffstat (limited to 'include/template_processor.php')
-rw-r--r--include/template_processor.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/template_processor.php b/include/template_processor.php
index be40a31ab..3f79ed593 100644
--- a/include/template_processor.php
+++ b/include/template_processor.php
@@ -71,11 +71,7 @@
} else {
$val = $this->_get_var($args[2]);
}
- if (isset($args[4])) {
- list($strue, $sfalse)= explode($args[4], $args[3]);
- } else {
- $strue = $args[3]; $sfalse = "";
- }
+ list($strue, $sfalse)= preg_split("|{{ *else *}}|", $args[3]);
return ($val?$strue:$sfalse);
}
@@ -135,7 +131,6 @@
$s = "";
}
$s = preg_replace_callback('/\|\|([0-9]+)\|\|/', array($this, "_replcb_node"), $s);
- if ($s==Null) $this->_preg_error()
return $s;
}
@@ -168,7 +163,7 @@
#$s = str_replace(array("\n","\r"),array("§n§","§r§"),$s);
$s = $this->_build_nodes($s);
$s = preg_replace_callback('/\|\|([0-9]+)\|\|/', array($this, "_replcb_node"), $s);
- if ($s==Null) $this->_preg_error()
+ if ($s==Null) $this->_preg_error();
$s = str_replace($this->search,$this->replace, $s);
return $s;