1
0

Convert a bunch of left over kohana::show_404 calls to throw

Kohana_404_Exception instead.
This commit is contained in:
Bharat Mediratta 2009-12-23 20:52:09 -08:00
parent a711cb1088
commit bcc0a1e836
3 changed files with 10 additions and 10 deletions

View File

@ -69,7 +69,7 @@ class Admin_Postage_Bands_Controller extends Controller
public function delete_postage_band_form($id) {
$postage = ORM::factory("postage_band", $id);
if (!$postage->loaded()) {
kohana::show_404();
throw new Kohana_404_Exception();
}
print postage_band::get_delete_form_admin($postage);
}
@ -83,7 +83,7 @@ class Admin_Postage_Bands_Controller extends Controller
$postage = ORM::factory("postage_band", $id);
if (!$postage->loaded()) {
kohana::show_404();
throw new Kohana_404_Exception();
}
$form = postage_band::get_delete_form_admin($postage);
@ -106,7 +106,7 @@ class Admin_Postage_Bands_Controller extends Controller
$postage = ORM::factory("postage_band", $id);
if (!$postage->loaded()) {
kohana::show_404();
throw new Kohana_404_Exception();
}
$form = postage_band::get_edit_form_admin($postage);
@ -143,7 +143,7 @@ class Admin_Postage_Bands_Controller extends Controller
public function edit_postage_band_form($id) {
$postage = ORM::factory("postage_band", $id);
if (!$postage->loaded()) {
kohana::show_404();
throw new Kohana_404_Exception();
}
$form = postage_band::get_edit_form_admin($postage);

View File

@ -70,7 +70,7 @@ class Admin_Product_Lines_Controller extends Controller
public function delete_product_form($id) {
$product = ORM::factory("product", $id);
if (!$product->loaded()) {
kohana::show_404();
throw new Kohana_404_Exception();
}
print product::get_delete_form_admin($product);
}
@ -84,7 +84,7 @@ class Admin_Product_Lines_Controller extends Controller
$product = ORM::factory("product", $id);
if (!$product->loaded()) {
kohana::show_404();
throw new Kohana_404_Exception();
}
$form = product::get_delete_form_admin($product);
@ -107,7 +107,7 @@ class Admin_Product_Lines_Controller extends Controller
$product = ORM::factory("product", $id);
if (!$product->loaded()) {
kohana::show_404();
throw new Kohana_404_Exception();
}
$form = product::get_edit_form_admin($product);
@ -145,7 +145,7 @@ class Admin_Product_Lines_Controller extends Controller
public function edit_product_form($id) {
$product = ORM::factory("product", $id);
if (!$product->loaded()) {
kohana::show_404();
throw new Kohana_404_Exception();
}
$form = product::get_edit_form_admin($product);

View File

@ -23,7 +23,7 @@ class ContactOwner_Controller extends Controller {
// If this page is disabled, show a 404 error.
if (module::get_var("contactowner", "contact_owner_link") != true) {
kohana::show_404();
throw new Kohana_404_Exception();
}
// Make a new form with a couple of text boxes.
@ -52,7 +52,7 @@ class ContactOwner_Controller extends Controller {
// If this page is disabled, show a 404 error.
if (module::get_var("contactowner", "contact_user_link") != true) {
kohana::show_404();
throw new Kohana_404_Exception();
}
// Locate the record for the user specified by $user_id,