diff options
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/mod.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/inc/mod.php b/inc/mod.php index 3d0c0d83..bce9e206 100644 --- a/inc/mod.php +++ b/inc/mod.php @@ -74,12 +74,16 @@ } function modLog($action) { - global $mod; - $query = prepare("INSERT INTO `modlogs` VALUES (:id, :ip, :time, :text)"); + global $mod, $board; + $query = prepare("INSERT INTO `modlogs` VALUES (:id, :ip, :board, :time, :text)"); $query->bindValue(':id', $mod['id'], PDO::PARAM_INT); $query->bindValue(':ip', $_SERVER['REMOTE_ADDR']); $query->bindValue(':time', time(), PDO::PARAM_INT); $query->bindValue(':text', $action); + if(isset($board)) + $query->bindValue(':board', $board['id']); + else + $query->bindValue(':board', null, PDO::PARAM_NULL); $query->execute() or error(db_error($query)); } |
