summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-01-12 21:51:48 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-01-12 21:51:48 +0000
commita3bdc3148d924a3f1e8e2052572930bdf159829a (patch)
tree308e7446edc7b82fc23a863b1cbadc43ee4771fb /lib/class
parent0b39cf3100870d54e13039a4e5d8635f121df4ab (diff)
downloadampache-a3bdc3148d924a3f1e8e2052572930bdf159829a.tar.gz
ampache-a3bdc3148d924a3f1e8e2052572930bdf159829a.tar.bz2
ampache-a3bdc3148d924a3f1e8e2052572930bdf159829a.zip
fixed tracking of user of flagged objects and allowed mass reject, approve
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/flag.class.php5
1 files changed, 3 insertions, 2 deletions
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;