diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/digibug/controllers/digibug.php | 2 | ||||
-rw-r--r-- | modules/gallery/controllers/admin.php | 2 | ||||
-rw-r--r-- | modules/gallery/controllers/file_proxy.php | 16 | ||||
-rw-r--r-- | modules/tag/controllers/admin_tags.php | 4 | ||||
-rw-r--r-- | modules/user/controllers/admin_users.php | 16 |
5 files changed, 20 insertions, 20 deletions
diff --git a/modules/digibug/controllers/digibug.php b/modules/digibug/controllers/digibug.php index a23d2863..6e6009db 100644 --- a/modules/digibug/controllers/digibug.php +++ b/modules/digibug/controllers/digibug.php @@ -87,7 +87,7 @@ class Digibug_Controller extends Controller { $file = $type == "full" ? $proxy->item->file_path() : $proxy->item->thumb_path(); if (!file_exists($file)) { - kohana::show_404(); + throw new Kohana_404_Exception(); } // We don't need to save the session for this request diff --git a/modules/gallery/controllers/admin.php b/modules/gallery/controllers/admin.php index 98cac557..e4216991 100644 --- a/modules/gallery/controllers/admin.php +++ b/modules/gallery/controllers/admin.php @@ -44,7 +44,7 @@ class Admin_Controller extends Controller { } if (!method_exists($controller_name, $method)) { - return kohana::show_404(); + throw new Kohana_404_Exception(); } call_user_func_array(array(new $controller_name, $method), $args); 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 diff --git a/modules/tag/controllers/admin_tags.php b/modules/tag/controllers/admin_tags.php index a56d4d20..e20b8ac8 100644 --- a/modules/tag/controllers/admin_tags.php +++ b/modules/tag/controllers/admin_tags.php @@ -45,7 +45,7 @@ class Admin_Tags_Controller extends Admin_Controller { $tag = ORM::factory("tag", $id); if (!$tag->loaded()) { - kohana::show_404(); + throw new Kohana_404_Exception(); } $form = tag::get_delete_form($tag); @@ -80,7 +80,7 @@ class Admin_Tags_Controller extends Admin_Controller { $tag = ORM::factory("tag", $id); if (!$tag->loaded()) { - kohana::show_404(); + throw new Kohana_404_Exception(); } $in_place_edit = InPlaceEdit::factory($tag->name) diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php index ee65efd2..96b86fff 100644 --- a/modules/user/controllers/admin_users.php +++ b/modules/user/controllers/admin_users.php @@ -77,7 +77,7 @@ class Admin_Users_Controller extends Admin_Controller { $user = user::lookup($id); if (empty($user)) { - kohana::show_404(); + throw new Kohana_404_Exception(); } $form = $this->_get_user_delete_form_admin($user); @@ -98,7 +98,7 @@ class Admin_Users_Controller extends Admin_Controller { public function delete_user_form($id) { $user = user::lookup($id); if (empty($user)) { - kohana::show_404(); + throw new Kohana_404_Exception(); } print $this->_get_user_delete_form_admin($user); } @@ -108,7 +108,7 @@ class Admin_Users_Controller extends Admin_Controller { $user = user::lookup($id); if (empty($user)) { - kohana::show_404(); + throw new Kohana_404_Exception(); } $form = $this->_get_user_edit_form_admin($user); @@ -155,7 +155,7 @@ class Admin_Users_Controller extends Admin_Controller { public function edit_user_form($id) { $user = user::lookup($id); if (empty($user)) { - kohana::show_404(); + throw new Kohana_404_Exception(); } $v = new View("user_form.html"); @@ -224,7 +224,7 @@ class Admin_Users_Controller extends Admin_Controller { $group = group::lookup($id); if (empty($group)) { - kohana::show_404(); + throw new Kohana_404_Exception(); } $form = $this->_get_group_delete_form_admin($group); @@ -245,7 +245,7 @@ class Admin_Users_Controller extends Admin_Controller { public function delete_group_form($id) { $group = group::lookup($id); if (empty($group)) { - kohana::show_404(); + throw new Kohana_404_Exception(); } print $this->_get_group_delete_form_admin($group); @@ -256,7 +256,7 @@ class Admin_Users_Controller extends Admin_Controller { $group = group::lookup($id); if (empty($group)) { - kohana::show_404(); + throw new Kohana_404_Exception(); } $form = $this->_get_group_edit_form_admin($group); @@ -288,7 +288,7 @@ class Admin_Users_Controller extends Admin_Controller { public function edit_group_form($id) { $group = group::lookup($id); if (empty($group)) { - kohana::show_404(); + throw new Kohana_404_Exception(); } print $this->_get_group_edit_form_admin($group); |