From 959541d5050eaf80c72aa0f8be3d8dba4f7ccde3 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Mon, 28 Mar 2011 17:24:23 +1100 Subject: Added needed "board" column to modlogs (see commit comment for required SQL query) --- inc/mod.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'inc') 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)); } -- cgit v1.3