1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-15 19:14:09 +02:00

Add admin logging to search, take out support for MySQL < 4.0

This commit is contained in:
e107steved
2008-12-07 11:45:08 +00:00
parent 2ab54d690d
commit 7e45f0076b
4 changed files with 130 additions and 65 deletions

View File

@@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/admin_log_class.php,v $
| $Revision: 1.12 $
| $Date: 2008-12-06 15:48:16 $
| $Revision: 1.13 $
| $Date: 2008-12-07 11:45:02 $
| $Author: e107steved $
To do:
@@ -328,6 +328,35 @@ Generic log entry point
}
return FALSE;
}
// Logs an entry with all the data from an array, one field per line.
// If $extra is non-empty, it goes on the first line.
// Normally data is in the format keyname=>value, one per line.
// If the $niceName array exists and has a definition, the 'nice Name' is displayed instead of the key name
function logArrayAll($event, $target, $extra='', $niceNames = NULL)
{
$logString = '';
if ($extra)
{
$logString = $extra.'[!br!]';
}
$spacer = '';
$checkNice = ($niceNames != NULL) && is_array($niceNames);
foreach ($target as $k => $v)
{
if ($checkNice && isset($niceNames[$k]['niceName']))
{
$logString .= $spacer.$niceNames[$k]['niceName'].'=>'.$v;
}
else
{
$logString .= $spacer.$k.'=>'.$v;
}
$spacer = '[!br!]';
}
$this->log_event($event,$logString,E_LOG_INFORMATIVE,'');
}
}