[geeklog-hg] geeklog: Expanded set_var function of template class to allow an...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Aug 24 22:50:49 EDT 2015


changeset 9618:c0623e60b671
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/c0623e60b671
user: Tom
date: Mon Aug 24 22:47:02 2015 -0400
description:
Expanded set_var function of template class to allow an array to be outputted (code submitted by remy) (feature request #0001805)

diffstat:

 system/classes/template.class.php |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 239c3096e8de -r c0623e60b671 system/classes/template.class.php
--- a/system/classes/template.class.php	Tue Jul 21 10:35:25 2015 -0400
+++ b/system/classes/template.class.php	Mon Aug 24 22:47:02 2015 -0400
@@ -610,6 +610,10 @@
                         $this->varvals[$k] .= $v;
                     } else {
                         $this->varvals[$k] = $v;
+                        
+                        if (is_array($value)) {
+                            foreach ($value as $k => $v) { $this->set_var($varname.'['.$k.']', $v, $append); }
+                         }                        
                     }
                     if ($nocache) {
                         $this->nocache[$k] = true;



More information about the geeklog-cvs mailing list