Show
Ignore:
Timestamp:
12/03/08 07:58:25 (12 months ago)
Author:
fumiakiy
Message:

Merging the latest of fireball branch to trunk. svn merge -r3095:3215 http://code.sixapart.com/svn/movabletype/branches/fireball . (two conflicts resolved; MT.pm, mt.php and mt-check.cgi merged manually.)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/MT/App/Search.pm

    r3082 r3219  
    8484 
    8585    my $q = $app->param; 
     86 
     87    # These parameters are strictly numeric; invalid request if they 
     88    # are given and are not 
     89    foreach my $param ( qw( blog_id limit offset SearchMaxResults ) ) { 
     90        my $val = $q->param($param); 
     91        next unless defined $val && ($val ne ''); 
     92        return $app->errtrans( 'Invalid [_1] parameter.', $param ) 
     93            if $val !~ m/^\d+$/; 
     94    } 
     95    foreach my $param ( qw( IncludeBlogs ExcludeBlogs ) ) { 
     96        my $val = $q->param($param); 
     97        next unless defined $val && ($val ne ''); 
     98        return $app->errtrans( 'Invalid [_1] parameter.', $param ) 
     99            if $val !~ m/^(\d+,?)+$/; 
     100    } 
    86101 
    87102    my $params = $app->registry( $app->mode, 'params' );