audit logging fix

This commit is contained in:
SJ 2012-09-14 11:54:09 +02:00
parent 6e8f451e52
commit 36e08326d0
2 changed files with 3 additions and 8 deletions

View File

@ -19,8 +19,7 @@ function LOGGER($event = '', $username = '') {
} }
function AUDIT($action = 0, $email = '', $ipaddr = '', $piler_id = '', $description = '') { function AUDIT($action = 0, $email = '', $ipaddr = '', $id = 0, $description = '') {
$id = 0;
if(ENABLE_AUDIT == 0) { return 0; } if(ENABLE_AUDIT == 0) { return 0; }
@ -29,12 +28,8 @@ function AUDIT($action = 0, $email = '', $ipaddr = '', $piler_id = '', $descript
$db = Registry::get('db'); $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)); $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(); return $db->countAffected();
} }

View File

@ -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; } .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; } .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; } #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; }