includes/template.php
changeset 1192 5882f0eebb34
parent 1173 b5b8e7ab0914
child 1196 704ba4b9819b
equal deleted inserted replaced
1191:ffa3a4938513 1192:5882f0eebb34
  3303   
  3303   
  3304   /**
  3304   /**
  3305    * Assigns an array of string values to the template. Strings can be accessed from the template by inserting {KEY_NAME} in the template file.
  3305    * Assigns an array of string values to the template. Strings can be accessed from the template by inserting {KEY_NAME} in the template file.
  3306    * @param $vars array
  3306    * @param $vars array
  3307    */
  3307    */
  3308   function assign_vars($vars)
  3308   function assign_vars($vars, $_ignored = false)
  3309   {
  3309   {
  3310     if(is_array($this->tpl_strings))
  3310     if(is_array($this->tpl_strings))
  3311       $this->tpl_strings = array_merge($this->tpl_strings, $vars);
  3311       $this->tpl_strings = array_merge($this->tpl_strings, $vars);
  3312     else
  3312     else
  3313       $this->tpl_strings = $vars;
  3313       $this->tpl_strings = $vars;
  3348   }
  3348   }
  3349   /**
  3349   /**
  3350    * Assigns an array of string values to the template. Strings can be accessed from the template by inserting {KEY_NAME} in the template file.
  3350    * Assigns an array of string values to the template. Strings can be accessed from the template by inserting {KEY_NAME} in the template file.
  3351    * @param $vars array
  3351    * @param $vars array
  3352    */
  3352    */
  3353   function assign_vars($vars)
  3353   function assign_vars($vars, $_ignored = false)
  3354   {
  3354   {
  3355     if(is_array($this->tpl_strings))
  3355     if(is_array($this->tpl_strings))
  3356       $this->tpl_strings = array_merge($this->tpl_strings, $vars);
  3356       $this->tpl_strings = array_merge($this->tpl_strings, $vars);
  3357     else
  3357     else
  3358       $this->tpl_strings = $vars;
  3358       $this->tpl_strings = $vars;