Commit e9ed6056 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Do not notify if status is unchanged in pkg_flag()

Check if a package actually changed its status before sending an email
to prevent from spamming. Addresses FS#31745.

Signed-off-by: default avatarLukas Fleischer <>
parent e2f3bee0
......@@ -699,9 +699,13 @@ function pkg_flag ($atype, $ids, $action=true, $dbh=NULL) {
$q.= "AND MaintainerUID = " . uid_from_sid($_COOKIE["AURSID"], $dbh);
if ($action) {
$q.= " AND OutOfDateTS IS NULL";
$affected_pkgs = $dbh->exec($q);
if ($action && $affected_pkgs > 0) {
# Notify of flagging by email
$f_name = username_from_sid($_COOKIE['AURSID'], $dbh);
$f_email = email_from_sid($_COOKIE['AURSID'], $dbh);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment