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

@@ -18,6 +18,10 @@ class URL extends Kohana_URL {
'task'=>'task',
);
public static function admin_url() {
return (Request::current() AND ((Auth::instance()->logged_in() AND ! empty(URL::$method_directory[strtolower(Request::current()->directory())])) OR in_array(strtolower(Request::current()->controller()),array('login'))));
}
/**
* Wrapper to provide a URL::site() link based on function
*/