Development

Changeset 4684

You must first sign up to be able to contribute.

Changeset 4684

Show
Ignore:
Timestamp:
07/20/07 06:25:19 (6 years ago)
Author:
Yining.Zhao
Message:

Fixed yzValidator::setValidationOptions() so validation options function correctly

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfYzClientSideValidationPlugin/lib/yzValidator.class.php

    r4670 r4684  
    154154    $options['url'] = yzValidator::VALIDATOR_MODULE; 
    155155    $options['complete'] = 'yzCSV_JSONUpdater(request, json, '.$eval_onsuccess_field_id.');'; 
    156     $options['update'] = null
     156    unset($options['update'])
    157157    //We will search through all of the keys of $options. Keys that start with 
    158158    //yzValidation_ are options for the AJAX validatoin request that occur after the user 
     
    160160    //stricken from $options 
    161161    $options_keys = array_keys($options); 
     162     
    162163    for($i=0, $num_options = count($options);$i<$num_options;$i++) 
    163164    { 
    164165      $option_key = $options_keys[$i]; 
     166       
    165167      if(strpos($option_key,'yzValidation_')=== 0 ) 
    166168      { 
    167169        $exploded_key_ary = explode('yzValidation_',$option_key); 
    168170        $yzVal_option_key = $exploded_key_ary[1]; 
     171        //echo '$yzVal_option_key: '.$yzVal_option_key.'<br>'; 
    169172        $options[$yzVal_option_key] .= $options[$option_key]; 
    170         $options[$option_key] = null; 
    171       } 
    172     } 
     173        //echo '$options[$option_key]: '.$options[$option_key].'<BR>'; 
     174        //echo '$option_key '.$option_key.'<BR><BR>'; 
     175        unset($options[$option_key]); 
     176      }  
     177    } 
     178    //print_r($options); 
    173179    $this->validation_options = $options; 
    174180  }