Added needed "board" column to modlogs (see commit comment for required SQL query)

This commit is contained in:
Savetheinternet 2011-03-28 17:24:23 +11:00
parent c77e78cb9c
commit 959541d505
3 changed files with 38 additions and 5 deletions

View file

@ -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));
}