don't redirect-to-image if this is a single image on the last page of several pages

This commit is contained in:
Shish 2009-12-30 09:29:25 +00:00
parent f3cd5d03a4
commit 440fdb88c2

View File

@ -82,7 +82,7 @@ class Index extends SimpleExtension {
$this->theme->display_intro($page);
send_event(new PostListBuildingEvent($search_terms));
}
else if(count($search_terms) > 0 && count($images) == 1) {
else if(count($search_terms) > 0 && count($images) == 1 && $page_number == 1) {
$page->set_mode("redirect");
$page->set_redirect(make_link("post/view/{$images[0]->id}"));
}