diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2015-08-30 16:24:13 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2015-08-30 16:44:12 +0200 |
commit | e1a258bd832c3ba76b5f898cbd068c5bdf4eb4dc (patch) | |
tree | f24bf8f305d6493b23ad654ea0534ad4b851be9b /web/lib/pkgbasefuncs.inc.php | |
parent | 57250a164172672f26c763e8453855f74d72c191 (diff) | |
download | aur-e1a258bd832c3ba76b5f898cbd068c5bdf4eb4dc.tar.gz aur-e1a258bd832c3ba76b5f898cbd068c5bdf4eb4dc.tar.xz |
Remember user ID when flagging package bases
Add a new FlaggerUID field to the database and use it to store the user
ID of the account who recently flagged a package out-of-date.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/lib/pkgbasefuncs.inc.php')
-rw-r--r-- | web/lib/pkgbasefuncs.inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php index 677ae6b8..df1ae186 100644 --- a/web/lib/pkgbasefuncs.inc.php +++ b/web/lib/pkgbasefuncs.inc.php @@ -328,15 +328,15 @@ function pkgbase_flag($base_ids) { return array(false, __("You did not select any packages to flag.")); } + $uid = uid_from_sid($_COOKIE['AURSID']); $dbh = DB::connect(); $q = "UPDATE PackageBases SET"; - $q.= " OutOfDateTS = UNIX_TIMESTAMP()"; + $q.= " OutOfDateTS = UNIX_TIMESTAMP(), FlaggerUID = " . $uid; $q.= " WHERE ID IN (" . implode(",", $base_ids) . ")"; $q.= " AND OutOfDateTS IS NULL"; $dbh->exec($q); - $uid = uid_from_sid($_COOKIE['AURSID']); foreach ($base_ids as $base_id) { notify(array('flag', $uid, $base_id)); } |