diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-07-15 19:45:10 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-07-15 19:45:10 -0700 |
commit | b51b49cb63d990611dacccca5e2a505c6c96357d (patch) | |
tree | 3918f2aec6cb11419971e97926ee091acfd0499f /modules/gallery/views/kohana | |
parent | 993e041274362ddec68ddf4566c72913464de504 (diff) |
Don't show a themed 404 page if we get to a 404 via file_proxy. Just
return a simple "File not found" message, since this is a very basic
file access (thumbnail, resize, original etc)
Diffstat (limited to 'modules/gallery/views/kohana')
-rw-r--r-- | modules/gallery/views/kohana/error.php | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/modules/gallery/views/kohana/error.php b/modules/gallery/views/kohana/error.php index cc9d2e84..0e84f093 100644 --- a/modules/gallery/views/kohana/error.php +++ b/modules/gallery/views/kohana/error.php @@ -25,16 +25,20 @@ try { // 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; } |