From fe43c2dcdfc844fce2c699887cf1ddae53c24b4b Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 9 Sep 2005 06:40:08 +0000 Subject: Bug 256135: Parameter 'movers' is handled differently in Bug.pm and buglist.cgi - Patch by Frédéric Buclin r/a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process_bug.cgi | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'process_bug.cgi') diff --git a/process_bug.cgi b/process_bug.cgi index c554e8181..e61834bb2 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -592,14 +592,8 @@ my $action = trim($cgi->param('action') || ''); if ($action eq Param('move-button-text')) { Param('move-enabled') || ThrowUserError("move_bugs_disabled"); - my $exporter = $user->login; - my $movers = Param('movers'); - $movers =~ s/\s?,\s?/|/g; - $movers =~ s/@/\@/g; - if ($exporter !~ /($movers)/) { - ThrowUserError("auth_failure", {action => 'move', - object => 'bugs'}); - } + $user->is_mover || ThrowUserError("auth_failure", {action => 'move', + object => 'bugs'}); # Moved bugs are marked as RESOLVED MOVED. my $sth = $dbh->prepare("UPDATE bugs @@ -615,7 +609,7 @@ if ($action eq Param('move-button-text')) { $comment = $cgi->param('comment') . "\n\n"; } $comment .= "Bug moved to " . Param('move-to-url') . ".\n\n"; - $comment .= "If the move succeeded, $exporter will receive a mail\n"; + $comment .= "If the move succeeded, " . $user->login . " will receive a mail\n"; $comment .= "containing the number of the new bug in the other database.\n"; $comment .= "If all went well, please mark this bug verified, and paste\n"; $comment .= "in a link to the new bug. Otherwise, reopen this bug.\n"; @@ -652,7 +646,7 @@ if ($action eq Param('move-button-text')) { # Now send emails. foreach my $id (@idlist) { - $vars->{'mailrecipients'} = { 'changer' => $exporter }; + $vars->{'mailrecipients'} = { 'changer' => $user->login }; $vars->{'id'} = $id; $vars->{'type'} = "move"; -- cgit v1.2.3-24-g4f1b