diff --git a/e107_admin/admin_log.php b/e107_admin/admin_log.php index 356e8ecf7..e4f50869c 100644 --- a/e107_admin/admin_log.php +++ b/e107_admin/admin_log.php @@ -140,9 +140,10 @@ class admin_log_ui extends e_admin_ui protected $pluginName = 'core'; protected $table = 'admin_log'; protected $pid = 'dblog_id'; - protected $perPage = 10; - - protected $listQry = "SELECT f.*, u.* FROM #admin_log AS f LEFT JOIN #user AS u ON f.dblog_user_id = u.user_id "; // Should not be necessary. + protected $perPage = 10; + // protected $listQry = "SELECT f.*, u.* FROM #admin_log AS f LEFT JOIN #user AS u ON f.dblog_user_id = u.user_id "; // Should not be necessary. + + protected $listQry = "SELECT SQL_CALC_FOUND_ROWS f.*, u.user_id, u.user_name FROM #admin_log AS f LEFT JOIN #user AS u ON f.dblog_user_id = u.user_id "; // Should not be required but be auto-calculated. protected $listOrder = 'f.dblog_id DESC'; protected $batchDelete = false; @@ -662,7 +663,7 @@ class admin_log_form_ui extends e_admin_form_ui class audit_log_ui extends e_admin_ui { - protected $pluginTitle = 'adminlog'; + protected $pluginTitle = ADLAN_155; protected $pluginName = 'adminlog'; protected $table = 'audit_log'; protected $pid = 'dblog_id'; @@ -713,7 +714,7 @@ class audit_log_ui extends e_admin_ui class dblog_ui extends e_admin_ui { - protected $pluginTitle = 'adminlog'; + protected $pluginTitle = ADLAN_155; protected $pluginName = 'adminlog'; protected $table = 'dblog'; protected $pid = 'dblog_id'; diff --git a/e107_handlers/admin_log_class.php b/e107_handlers/admin_log_class.php index 9189be8f0..cd9a28e49 100644 --- a/e107_handlers/admin_log_class.php +++ b/e107_handlers/admin_log_class.php @@ -125,11 +125,12 @@ class e_admin_log * @param int $logImportance [optional] default E_LOG_INFORMATIVE - passed directly to admin log * @param string $logEventCode [optional] - passed directly to admin log * @param string $mstack [optional] message stack passed to message handler + * @param int LOG_TO_ADMIN|LOG_TO_ROLLING|LOG_TO_AUDIT * @return \e_admin_log */ - public function save($logTitle, $logImportance = E_LOG_INFORMATIVE, $logEventCode = '', $mstack = false) + public function save($logTitle, $logImportance = E_LOG_INFORMATIVE, $logEventCode = '', $mstack = false, $target = LOG_TO_ADMIN) { - return $this->flushMessages($logTitle, $logImportance, $logEventCode, $mstack); + return $this->flushMessages($logTitle, $logImportance, $logEventCode, $mstack, $target); } @@ -683,7 +684,7 @@ class e_admin_log * @param string $mstack [optional] message stack passed to message handler * @return e_admin_log */ - public function flushMessages($logTitle, $logImportance = E_LOG_INFORMATIVE, $logEventCode = '', $mstack = false) + public function flushMessages($logTitle, $logImportance = E_LOG_INFORMATIVE, $logEventCode = '', $mstack = false, $target =LOG_TO_ADMIN) { $mes = e107::getMessage(); @@ -714,7 +715,7 @@ class e_admin_log else $mes->add($m['message'], $m['dislevel'], $m['session']); } } - e107::getAdminLog()->add($logTitle, $logString, $logImportance, $logEventCode); + $this->add($logTitle, $logString, $logImportance, $logEventCode, $target); $this->_messages = array(); // Clear the memory for reuse return $this; diff --git a/e107_handlers/arraystorage_class.php b/e107_handlers/arraystorage_class.php index cab172609..1acd8894c 100644 --- a/e107_handlers/arraystorage_class.php +++ b/e107_handlers/arraystorage_class.php @@ -32,7 +32,7 @@ class ArrayData { $log->addDebug("Deprecated ArrayStorage Class called by ".str_replace(e_ROOT,"",$d['file'])." on line ".$d['line']); } - $log->save('DEPRECATED'); + $log->save('DEPRECATED',E_LOG_NOTICE,'',false, LOG_TO_ROLLING); e107::getMessage()->addDebug("Please remove references to arraystorage_class.php and use e107::serialize() and e107::unserialize() instead."); } diff --git a/e107_handlers/xml_class.php b/e107_handlers/xml_class.php index 65c4391d0..2dc717e3d 100644 --- a/e107_handlers/xml_class.php +++ b/e107_handlers/xml_class.php @@ -27,7 +27,7 @@ class parseXml extends xmlClass // BC with v1.x $log->addDebug('Deprecated XML Parser Used'); $log->addArray($data); - $log->save('DEPRECATED',E_LOG_NOTICE); + $log->save('DEPRECATED',E_LOG_NOTICE,'',false, LOG_TO_ROLLING); }