Changeset 6012


Ignore:
Timestamp:
02/05/12 19:25:25 (4 months ago)
Author:
vain
Message:
  • Updating Smarty to v3.1.7 [libraries]
  • re-applied assignGlobal() patch
Location:
trunk/libraries/smarty
Files:
1 edited
40 copied

Legend:

Unmodified
Added
Removed
  • trunk/libraries/smarty/sysplugins/smarty_internal_data.php

    r5765 r6012  
    7979    public function assignGlobal($varname, $value = null, $nocache = false) 
    8080    { 
    81         if ($varname != '') { 
    82             Smarty::$global_tpl_vars[$varname] = new Smarty_variable($value, $nocache); 
     81        if (is_array($varname)) { 
     82            foreach ($varname as $_key => $_val) { 
     83                if ($_key != '') { 
     84                    Smarty::$global_tpl_vars[$_key] = new Smarty_variable($_val, $nocache); 
     85                } 
     86            } 
     87        } else {        
     88            if ($varname != '') { 
     89                Smarty::$global_tpl_vars[$varname] = new Smarty_variable($value, $nocache); 
     90            } 
    8391        } 
    8492 
Note: See TracChangeset for help on using the changeset viewer.