diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-03-28 17:24:23 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-03-28 17:24:23 +1100 |
| commit | 959541d5050eaf80c72aa0f8be3d8dba4f7ccde3 (patch) | |
| tree | 8e8569944a22883569ea466fc8c8ba5bad480ce5 /inc | |
| parent | c77e78cb9c69fb495e57aead0ef508bb908532d6 (diff) | |
Added needed "board" column to modlogs (see commit comment for required SQL query)
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)); } |
