Changeset 1816

Show
Ignore:
Timestamp:
01/25/08 16:08:12 (8 months ago)
Author:
Geert
Message:
  • Small regex optimization (non-capturing parentheses now).
  • Updating validation translation.
Location:
trunk/system
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/i18n/en_US/validation.php

    r1815 r1816  
    2828        'max_size'      => 'The %s file you uploaded was too large. The maximum size allowed is %s.', 
    2929        'max_width'     => 'The %s file you uploaded was too big. The maximum allowed width is %spx.', 
    30         'max_height'    => 'The %s file you uploaded was too big, The maximum allowed height is %spx.', 
    31         'min_width'     => 'The %s file you uploaded was too big. The minimum allowed width is %spx.', 
    32         'min_height'    => 'The %s file you uploaded was too big, The minimum allowed height is %spx.', 
     30        'max_height'    => 'The %s file you uploaded was too big. The maximum allowed height is %spx.', 
     31        'min_width'     => 'The %s file you uploaded was too small. The minimum allowed width is %spx.', 
     32        'min_height'    => 'The %s file you uploaded was too small. The minimum allowed height is %spx.', 
    3333 
    3434        // Field types 
  • trunk/system/i18n/nl_NL/validation.php

    r1672 r1816  
    2727        'invalid_type'  => 'Het bestandstype van het %s bestand is niet toegestaan.', 
    2828        'max_size'      => 'Het %s bestand dat je wilde uploaden is te groot. De maximum toegelaten grootte is %s.', 
    29         'max_width'     => 'Het %s bestand heeft een maximum toegelaten breedte van %spx.', 
    30         'max_height'    => 'Het %s bestand heeft een maximum toegelaten hoogte van %spx.', 
     29        'max_width'     => 'Het %s upgeloade bestand is te groot: maximum toegelaten breedte is %spx.', 
     30        'max_height'    => 'Het %s upgeloade bestand is te groot: maximum toegelaten hoogte is %spx.', 
     31        'min_width'     => 'Het %s upgeloade bestand is te klein: minimum toegelaten breedte is %spx.', 
     32        'min_height'    => 'Het %s upgeloade bestand is te klein: minimum toegelaten breedte is %spx.', 
    3133 
    3234        // Field types 
  • 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);