WordPress.org

Plugin Directory

Changeset 584898


Ignore:
Timestamp:
08/13/12 15:16:08 (21 months ago)
Author:
ryelle
Message:

Update validation function: was previously ignoring any validation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • meetup-widgets/trunk/vs_meetup.php

    r551888 r584898  
    8383     */ 
    8484    public function validate($input) { 
    85         if ( !preg_match('/^[a-zA-Z0-9]{0,40}$/i', $input['vs_meetup_key']) ) 
    86             $input['vs_meetup_key'] = $input['vs_meetup_key']; 
    87         if ( !preg_match('/^[a-zA-Z0-9]{0,40}$/i', $input['vs_meetup_secret']) ) 
    88             $input['vs_meetup_secret'] = $input['vs_meetup_secret']; 
    89         if ( !preg_match('/^[a-zA-Z0-9]{0,40}$/i', $input['vs_meetup_api_key']) ) 
    90             $input['vs_meetup_api_key'] = $input['vs_meetup_api_key']; 
    91         return $input; 
     85        $output = array(); 
     86        if ( preg_match('/^[a-zA-Z0-9]{0,40}$/i', $input['vs_meetup_key']) ) 
     87            $output['vs_meetup_key'] = $input['vs_meetup_key']; 
     88        if ( preg_match('/^[a-zA-Z0-9]{0,40}$/i', $input['vs_meetup_secret']) ) 
     89            $output['vs_meetup_secret'] = $input['vs_meetup_secret']; 
     90        if ( preg_match('/^[a-zA-Z0-9]{0,40}$/i', $input['vs_meetup_api_key']) ) 
     91            $output['vs_meetup_api_key'] = $input['vs_meetup_api_key']; 
     92        return $output; 
    9293    } 
    9394     
Note: See TracChangeset for help on using the changeset viewer.