Improved exception handling and other minor fixes

This commit is contained in:
Deon George
2013-05-10 00:42:54 +10:00
parent ce17247db6
commit 970b2ef4f0
11 changed files with 45 additions and 75 deletions

View File

@@ -15,10 +15,8 @@ class Controller_Reseller_Invoice extends Controller_Invoice {
$ao = ORM::factory('Account',$id);
if (! $ao->loaded() OR ! Auth::instance()->authorised($ao)) {
$this->template->content = 'Unauthorised or doesnt exist?';
return FALSE;
}
if (! $ao->loaded() OR ! Auth::instance()->authorised($ao))
throw HTTP_Exception::factory(403,'Unauthorised or doesnt exist?');
Block::add(array(
'body'=>$output,