mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:50:10 +00:00
more spaces + some curly spaces added
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
41a36606c6
commit
951006dd10
42 changed files with 206 additions and 187 deletions
|
@ -95,7 +95,7 @@ class Template implements ITemplateEngine {
|
|||
* {{ for <$var> as $name }}...{{ endfor }}
|
||||
* {{ for <$var> as $key=>$name }}...{{ endfor }}
|
||||
*/
|
||||
private function _replcb_for($args) {
|
||||
private function _replcb_for ($args) {
|
||||
$m = array_map('trim', explode(" as ", $args[2]));
|
||||
$x = explode("=>", $m[1]);
|
||||
if (count($x) == 1) {
|
||||
|
@ -109,14 +109,16 @@ class Template implements ITemplateEngine {
|
|||
//$vals = $this->r[$m[0]];
|
||||
$vals = $this->_get_var($m[0]);
|
||||
$ret = "";
|
||||
if (!is_array($vals))
|
||||
if (!is_array($vals)) {
|
||||
return $ret;
|
||||
}
|
||||
foreach ($vals as $k => $v) {
|
||||
$this->_push_stack();
|
||||
$r = $this->r;
|
||||
$r[$varname] = $v;
|
||||
if ($keyname != '')
|
||||
if ($keyname != '') {
|
||||
$r[$keyname] = (($k === 0) ? '0' : $k);
|
||||
}
|
||||
$ret .= $this->replace($args[3], $r);
|
||||
$this->_pop_stack();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue