Skip to content

Commit

Permalink
Don't show a themed 404 page if we get to a 404 via file_proxy. Just
Browse files Browse the repository at this point in the history
return a simple "File not found" message, since this is a very basic
file access (thumbnail, resize, original etc)
  • Loading branch information
bharat committed Jul 16, 2010
1 parent 993e041 commit b51b49c
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions modules/gallery/views/kohana/error.php
Expand Up @@ -25,16 +25,20 @@

// Try to show a themed error page for 404 errors
if ($e instanceof Kohana_404_Exception) {
$view = new Theme_View("page.html", "other", "error");
$view->page_title = t("Dang... Page not found!");
$view->content = new View("error_404.html");
$user = identity::active_user();
$view->content->is_guest = $user && $user->guest;
if ($view->content->is_guest) {
$view->content->login_form = new View("login_ajax.html");
$view->content->login_form->form = auth::get_login_form("login/auth_html");
if (Router::$controller == "file_proxy") {
print "File not found";
} else {
$view = new Theme_View("page.html", "other", "error");
$view->page_title = t("Dang... Page not found!");
$view->content = new View("error_404.html");
$user = identity::active_user();
$view->content->is_guest = $user && $user->guest;
if ($view->content->is_guest) {
$view->content->login_form = new View("login_ajax.html");
$view->content->login_form->form = auth::get_login_form("login/auth_html");
}
print $view;
}
print $view;
return;
}

Expand Down

0 comments on commit b51b49c

Please sign in to comment.