]> xenbits.xensource.com Git - people/aperard/emesinae.git/commitdiff
bug.pl: simplify some code
authorIan Campbell <ian.campbell@citrix.com>
Tue, 2 Jul 2013 10:03:01 +0000 (11:03 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 2 Jul 2013 10:03:01 +0000 (11:03 +0100)
CGI/bug.pl

index 9b2ffc2778d40c942eb37a9f260351db9739ad31..8c5a4525e9c3187f0b914a559ceddc091ef3dc0a 100755 (executable)
@@ -45,8 +45,7 @@ my $path = url( -absolute => 1 );
 $path =~ m,^$c{CGIPath}bug/([0-9]+)(?:/(mbox))?/?$, or fourohfour();
 
 my $bugid = $1;
-my $mode  = "normal";
-$mode = $2 if $2;
+my $mode = $2 || "normal";
 
 my $bug = Emesinae::Bug->new( $dbh, ID => $bugid );
 fourohfour() unless $bug;