Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for phpPlatonLib/HTML_Template_Platon/Platon.php between version 1.1 and 1.2

version 1.1, 2002/11/26 12:24:26 version 1.2, 2003/01/15 22:15:36
Line 9 
Line 9 
    NOT APPLICABLE NOW! It is printed "as is" outside <?php ?> tags.     NOT APPLICABLE NOW! It is printed "as is" outside <?php ?> tags.
  */   */
   
 if (! isset($_HTML_Template_Platon_cfg)) {  if (! isset($GLOBALS)) {
         $_HTML_Template_Platon_cfg = array(          global $GLOBALS;
   }
   if (! isset($GLOBALS['_HTML_Template_Platon_cfg'])) {
           $GLOBALS['_HTML_Template_Platon_cfg'] = array(
                         'load_function'        => null,                          'load_function'        => null,
                         'method_function_name' => '_HTML_Template_Platon_function_',                          'method_function_name' => '_HTML_Template_Platon_function_',
                         'method_function_idx'  => 0                          'method_function_idx'  => 0
Line 18  if (! isset($_HTML_Template_Platon_cfg))
Line 21  if (! isset($_HTML_Template_Platon_cfg))
 }  }
   
 /* Output method (bit array) */  /* Output method (bit array) */
 define(HTML_TEMPLATE_PLATON_METHOD_NORMAL,              0);  define('HTML_TEMPLATE_PLATON_METHOD_NORMAL',    0);
 define(HTML_TEMPLATE_PLATON_METHOD_FUNCTION,    1);  define('HTML_TEMPLATE_PLATON_METHOD_FUNCTION',  1);
 define(HTML_TEMPLATE_PLATON_METHOD_VAR_KEEP,    2);  define('HTML_TEMPLATE_PLATON_METHOD_VAR_KEEP',  2);
   
 /* Set method (enumeration constants) */  /* Set method (enumeration constants) */
 define(HTML_TEMPLATE_PLATON_SET_VALUE,                  0);  define('HTML_TEMPLATE_PLATON_SET_VALUE',                0);
 define(HTML_TEMPLATE_PLATON_SET_CODE,                   1);  define('HTML_TEMPLATE_PLATON_SET_CODE',                 1);
 define(HTML_TEMPLATE_PLATON_SET_PARSE,                  2);  define('HTML_TEMPLATE_PLATON_SET_PARSE',                2);
   
 class HTML_Template_Platon  class HTML_Template_Platon
 {  {
Line 348  class HTML_Template_Platon
Line 351  class HTML_Template_Platon
   
                 if ($this->_method & HTML_TEMPLATE_PLATON_METHOD_VAR_KEEP) {                  if ($this->_method & HTML_TEMPLATE_PLATON_METHOD_VAR_KEEP) {
                         foreach ($this->_set_vars as $key => $val) {                          foreach ($this->_set_vars as $key => $val) {
                                   // @ is used, since kept varaible may not exist
                                 if (is_array($this->_set_vars[$key])) {                                  if (is_array($this->_set_vars[$key])) {
                                         $ret .= '$'.$key.'__HTML_Template_Platon_var_bck=$'.$key.';';                                          $ret .= '$'.$key.'__HTML_Template_Platon_var_bck=@$'.$key.';';
                                         $ret .= $val[0];                                          $ret .= $val[0];
                                 } else {                                  } else {
                                         $ret = '$' . $key . '=\''                                          $ret = '$' . $key . '=\''
                                                 . str_replace('\'', '\\\'', str_replace('\\', '\\\\\\\\', $val))                                                  . str_replace('\'', '\\\'', str_replace('\\', '\\\\\\\\', $val))
                                                 . '\';' . "\n"                                                  . '\';' . "\n"
                                                 . $ret;                                                  . $ret;
                                         $ret = '$'.$key.'__HTML_Template_Platon_var_bck=$'.$key.';' . "\n" . $ret;                                          $ret = '$'.$key.'__HTML_Template_Platon_var_bck=@$'.$key.';' . "\n" . $ret;
                                 }                                  }
                         }                          }
                 } else {                  } else {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top