Improved exception handling and other minor fixes
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user