summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/file_proxy.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-12-23 20:51:33 -0800
committerBharat Mediratta <bharat@menalto.com>2009-12-23 20:51:33 -0800
commit057e8d09afaecd27f672f804a6a65341578d50fd (patch)
treed0a039076270f3d037c77b615772dcf0f6ea9326 /modules/gallery/controllers/file_proxy.php
parentb62083bd24b7e5fa079726dc0819fb646c31192b (diff)
Convert a bunch of leftover kohana::show_404 calls to throw
Kohana_404_Exception instead. These are the ones where we used a lower-case 'k' so my previous filter didn't catch it.
Diffstat (limited to 'modules/gallery/controllers/file_proxy.php')
-rw-r--r--modules/gallery/controllers/file_proxy.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php
index 6a80ad85..65c0cb50 100644
--- a/modules/gallery/controllers/file_proxy.php
+++ b/modules/gallery/controllers/file_proxy.php
@@ -38,19 +38,19 @@ class File_Proxy_Controller extends Controller {
// Make sure that the request is for a file inside var
$offset = strpos($request_uri, $var_uri);
if ($offset === false) {
- kohana::show_404();
+ throw new Kohana_404_Exception();
}
$file_uri = substr($request_uri, strlen($var_uri));
// Make sure that we don't leave the var dir
if (strpos($file_uri, "..") !== false) {
- kohana::show_404();
+ throw new Kohana_404_Exception();
}
list ($type, $path) = explode("/", $file_uri, 2);
if ($type != "resizes" && $type != "albums" && $type != "thumbs") {
- kohana::show_404();
+ throw new Kohana_404_Exception();
}
// If the last element is .album.jpg, pop that off since it's not a real item
@@ -78,7 +78,7 @@ class File_Proxy_Controller extends Controller {
}
if (!$item->loaded()) {
- kohana::show_404();
+ throw new Kohana_404_Exception();
}
if ($type == "albums") {
@@ -91,21 +91,21 @@ class File_Proxy_Controller extends Controller {
// Make sure we have access to the item
if (!access::can("view", $item)) {
- kohana::show_404();
+ throw new Kohana_404_Exception();
}
// Make sure we have view_full access to the original
if ($type == "albums" && !access::can("view_full", $item)) {
- kohana::show_404();
+ throw new Kohana_404_Exception();
}
// Don't try to load a directory
if ($type == "albums" && $item->is_album()) {
- kohana::show_404();
+ throw new Kohana_404_Exception();
}
if (!file_exists($file)) {
- kohana::show_404();
+ throw new Kohana_404_Exception();
}
// We don't need to save the session for this request