Fix user name in disown notifications
diff mbox

Message ID 20170224192852.5638-1-lfleischer@archlinux.org
State Accepted, archived
Headers show

Commit Message

Lukas Fleischer Feb. 24, 2017, 7:28 p.m. UTC
Do not overwrite the $uid variable when updating co-maintainers.

Fixes FS#52225.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
---
 web/lib/pkgbasefuncs.inc.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch
diff mbox

diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php
index 4f10204..57b307d 100644
--- a/web/lib/pkgbasefuncs.inc.php
+++ b/web/lib/pkgbasefuncs.inc.php
@@ -680,15 +680,15 @@  function pkgbase_adopt ($base_ids, $action=true, $via) {
 				$comaintainers = pkgbase_get_comaintainers($base_id);
 
 				if (count($comaintainers) > 0) {
-					$uid = uid_from_username($comaintainers[0]);
+					$comaintainer_uid = uid_from_username($comaintainers[0]);
 					$comaintainers = array_diff($comaintainers, array($comaintainers[0]));
 					pkgbase_set_comaintainers($base_id, $comaintainers);
 				} else {
-					$uid = "NULL";
+					$comaintainer_uid = "NULL";
 				}
 
 				$q = "UPDATE PackageBases ";
-				$q.= "SET MaintainerUID = " . $uid .  " ";
+				$q.= "SET MaintainerUID = " . $comaintainer_uid .  " ";
 				$q.= "WHERE ID = " . $base_id;
 				$dbh->exec($q);
 			}