mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:41:59 +01:00
audit logging fix
This commit is contained in:
parent
6e8f451e52
commit
36e08326d0
@ -19,8 +19,7 @@ function LOGGER($event = '', $username = '') {
|
||||
}
|
||||
|
||||
|
||||
function AUDIT($action = 0, $email = '', $ipaddr = '', $piler_id = '', $description = '') {
|
||||
$id = 0;
|
||||
function AUDIT($action = 0, $email = '', $ipaddr = '', $id = 0, $description = '') {
|
||||
|
||||
if(ENABLE_AUDIT == 0) { return 0; }
|
||||
|
||||
@ -29,12 +28,8 @@ function AUDIT($action = 0, $email = '', $ipaddr = '', $piler_id = '', $descript
|
||||
|
||||
$db = Registry::get('db');
|
||||
|
||||
if($piler_id && verify_piler_id($piler_id) == 1){
|
||||
$query = $db->query("SELECT id FROM " . TABLE_META . " WHERE piler_id=?", array($piler_id));
|
||||
if(isset($query->row['id'])) { $id = $query->row['id']; }
|
||||
}
|
||||
|
||||
$query = $db->query("INSERT INTO " . TABLE_AUDIT . " (ts, email, action, ipaddr, meta_id, description) VALUES(?,?,?,?,?,?)", array(time(), $email, $action, $ipaddr, $id, $description));
|
||||
|
||||
return $db->countAffected();
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
.boxtitle { height: 12px !important; padding: 2px 10px 5px 5px; border-bottom: 1px solid #999; color: #333; font-size: 11px; font-weight: bold; overflow: hidden; }
|
||||
.boxlistcontent { position: absolute; top: 20px; bottom: 22px; left: 0; right: 0; width: 100%; overflow-y: auto; overflow-x: hidden; }
|
||||
.boxfooter { position: absolute; bottom: 0px; left: 0px; right: 0px; overflow: hidden; height: 22px; border-top: 1px solid #999; background: url(/view/theme/default/images/listheader.gif) top left repeat-x #CCC; }
|
||||
.boxfooter { position: absolute; bottom: 0px; left: 0px; right: 0px; overflow: hidden; height: 15px; border-top: 1px solid #999; background: url(/view/theme/default/images/listheader.gif) top left repeat-x #CCC; }
|
||||
|
||||
#mailboxlist { position:relative; height: auto; margin: 0px; padding: 0px; list-style-image: none; list-style-type: none; overflow: hidden; white-space: nowrap; background-color: #FFF; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user