From a3bdc3148d924a3f1e8e2052572930bdf159829a Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Fri, 12 Jan 2007 21:51:48 +0000 Subject: fixed tracking of user of flagged objects and allowed mass reject, approve --- lib/class/flag.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/class/flag.class.php') diff --git a/lib/class/flag.class.php b/lib/class/flag.class.php index 0e86f643..fa7aa382 100644 --- a/lib/class/flag.class.php +++ b/lib/class/flag.class.php @@ -174,6 +174,7 @@ class Flag { $id = sql_escape($id); $type = sql_escape($type); $flag = sql_escape($flag); + $user = sql_escape($GLOBALS['user']->id); $comment = sql_escape($comment); $time = time(); $approved = '0'; @@ -181,8 +182,8 @@ class Flag { /* If they are an admin, it's auto approved */ if ($GLOBALS['user']->has_access('100')) { $approved = '1'; } - $sql = "INSERT INTO flagged (`object_id`,`object_type`,`flag`,`comment`,`date`,`approved`) VALUES " . - " ('$id','$type','$flag','$comment','$time','$approved')"; + $sql = "INSERT INTO flagged (`object_id`,`object_type`,`flag`,`comment`,`date`,`approved`,`user`) VALUES " . + " ('$id','$type','$flag','$comment','$time','$approved','$user')"; $db_results = mysql_query($sql, dbh()); return true; -- cgit