Show
Ignore:
Timestamp:
01/25/2008 04:08:12 PM (12 months ago)
Author:
Geert
Message:
  • Small regex optimization (non-capturing parentheses now).
  • Updating validation translation.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Validation.php

    r1815 r1816  
    505505                        foreach($params as $param) 
    506506                        { 
    507                                 if (preg_match('/[0-9]+x[0-9]+(-[0-9]+x[0-9]+)?/', $param)) 
    508                                 { 
    509                                         // Image size, eg: 200x100 , 20x10-200x100 
    510                                         $param = (strpos($param, '-') === False) ? $param.'-'.$param : $param; 
     507                                if (preg_match('/[0-9]+x[0-9]+(?:-[0-9]+x[0-9]+)?/', $param)) 
     508                                { 
     509                                        // Image size, eg: 200x100, 20x10-200x100 
     510                                        $param = (strpos($param, '-') === FALSE) ? $param.'-'.$param : $param; 
    511511 
    512512                                        list($min, $max) = explode('-', $param);