Changeset 682

Show
Ignore:
Timestamp:
09/21/06 03:37:15 (3 years ago)
Author:
bchoate
Message:

Filter inputs for include/exclude blog parameters.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/wheeljack/lib/MT/App/Search.pm

    r681 r682  
    6666            if ($blog_id =~ m/,/) { 
    6767                my @ids = split /,/, $blog_id; 
    68                 $app->{searchparam}{$type}{$_} = 1 for @ids; 
     68                s/\D+//g for @ids; # only numeric values. 
     69                foreach my $id (@ids) { 
     70                    next unless $id; 
     71                    $app->{searchparam}{$type}{$id} = 1; 
     72                } 
    6973            } else { 
     74                $blog_id =~ s/\D+//g; # only numeric values. 
    7075                $app->{searchparam}{$type}{$blog_id} = 1; 
    7176            }