Changeset 2739
- Timestamp:
- 07/09/08 04:10:57 (19 months ago)
- Files:
-
- 1 modified
-
branches/release-41/lib/MT/App/Search/Legacy.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-41/lib/MT/App/Search/Legacy.pm
r1823 r2739 292 292 ## blog from the database. 293 293 my($blog); 294 my $include = $app->param('IncludeBlogs'); 294 my $include = $app->param('IncludeBlogs') || ''; 295 $include =~ s/[^\d,]//g; 295 296 if ($include) { 296 297 my @blog_ids = split ',', $include; … … 303 304 $blog = MT::Blog->load($app->param('blog_id')); 304 305 } 305 $include = $blog->id if $blog; 306 } 306 $include = $blog->id if $blog; 307 } 308 return $app->error($app->translate('Invalid request.')) 309 unless $blog; 307 310 308 311 ## Initialize and set up the context object. … … 317 320 } 318 321 $ctx->stash('template_id', $app->{searchparam}{Template}); 319 $ctx->stash('maxresults', $app->{searchparam}{MaxResults}); 322 my $maxresults = $app->{searchparam}{MaxResults} || ''; 323 $maxresults =~ s/\D//g; 324 $app->{searchparam}{MaxResults} = $maxresults; 325 $ctx->stash('maxresults', $maxresults); 320 326 $ctx->var( 'page_layout', $blog->page_layout ) 321 327 if $blog && $blog->page_layout;
