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

Diff for phpPlatonLib/Platon/Platon.php between version 1.22 and 1.23

version 1.22, 2004/01/26 13:53:55 version 1.23, 2004/04/11 16:19:46
Line 24 
Line 24 
  * @access      public   * @access      public
  */   */
   
 /* $Platon: phpPlatonLib/Platon/Platon.php,v 1.21 2004/01/02 11:31:39 nepto Exp $ */  /* $Platon: phpPlatonLib/Platon/Platon.php,v 1.22 2004/01/26 13:53:55 nepto Exp $ */
   
 class Platon  class Platon
 {  {
Line 200  class Platon
Line 200  class Platon
     /**      /**
      * Returns original variables HTML code for use in forms or links.       * Returns original variables HTML code for use in forms or links.
      *       *
      * @param   mixed   $origvars       string or array of original varaibles       * @param   mixed   $origvars  string or array of original variables;
      * @param   string  $method         type of method ("POST" or "GET")       *                             if string values should be rawurlencoded();
      * @param   mixed   $default_value  default value of variables       *                             if array values should not be encoded
      *                                  if null, empty values will be skipped       * @param   string  $method    type of method ("POST" or "GET")
      * @return                          get HTML code of original varaibles       * @param   mixed   $default   default value of variables
        *                             if null, empty values will be skipped
        * @return                     get HTML code of original variables
      */       */
     function get_origvars_html($origvars, $method = 'POST', $default_value = '') /* {{{ */      function get_origvars_html($origvars, $method = 'POST', $default = '') /* {{{ */
     {      {
         $ret    = '';          $ret    = '';
         $method = strtoupper($method);          $method = strtoupper($method);
Line 216  class Platon
Line 218  class Platon
                 foreach (explode('&', $origvars) as $param) {                  foreach (explode('&', $origvars) as $param) {
                     $parts = explode('=', $param, 2);                      $parts = explode('=', $param, 2);
                     if (! isset($parts[1])) {                      if (! isset($parts[1])) {
                         $parts[1] = $default_value;                          $parts[1] = $default;
                     }                      }
                     if (strlen($parts[0]) <= 0) {                      if (strlen($parts[0]) <= 0) {
                         continue;                          continue;
Line 226  class Platon
Line 228  class Platon
                 $origvars =& $new_origvars;                  $origvars =& $new_origvars;
             }              }
             foreach ($origvars as $key => $val) {              foreach ($origvars as $key => $val) {
                 if (strlen($val) <= 0 && $default_value === null) {                  if (strlen($val) <= 0 && $default === null) {
                     continue;                      continue;
                 }                  }
                 $key = rawurldecode($key);                  $key = rawurldecode($key);
Line 241  class Platon
Line 243  class Platon
                 $ret .= $origvars;                  $ret .= $origvars;
             } else {              } else {
                 foreach ($origvars as $key => $val) {                  foreach ($origvars as $key => $val) {
                     if (strlen($val) <= 0 && $default_value === null) {                      if (strlen($val) <= 0 && $default === null) {
                         continue;                          continue;
                     }                      }
                     $ret == '' || $ret .= '&amp;';                      $ret == '' || $ret .= '&amp;';

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

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