Misc fixes from live site

This commit is contained in:
Deon George
2013-07-05 16:11:37 +10:00
parent 3499776ddc
commit f3d2c1fe8d
21 changed files with 80 additions and 65 deletions

View File

@@ -21,7 +21,7 @@ class Kohana_Exception extends Kohana_Kohana_Exception {
try {
$eo = ORM::factory('Log_Error');
$eo->message = Kohana_Exception::text($e);
$eo->account_id = Auth::instance()->get_user()->id;
$eo->account_id = (PHP_SAPI === 'cli' OR ! Auth::instance()->logged_in()) ? NULL : Auth::instance()->get_user()->id;
if (Request::current()) {
$eo->module = (Request::current()->directory() ? Request::current()->directory().'_' : '').Request::current()->controller();