]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 284975: Any code after Throw*Error is a dead code.
authormkanat%kerio.com <>
Wed, 9 Mar 2005 08:26:38 +0000 (08:26 +0000)
committermkanat%kerio.com <>
Wed, 9 Mar 2005 08:26:38 +0000 (08:26 +0000)
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=LpSolit, a=myk

createaccount.cgi
editclassifications.cgi
editcomponents.cgi
editkeywords.cgi
editmilestones.cgi
editproducts.cgi
editversions.cgi

index 60a180623d0666cb1c21638680bfb6cd210004cd..de8dc6fde37e63b2dda402610e9a3bdc3172e763 100755 (executable)
@@ -72,7 +72,6 @@ if (defined($login)) {
     if (!($createexp)
         || ($login !~ /$createexp/)) {
         ThrowUserError("account_creation_disabled");
-        exit;
     }
     
     # Create account
index deeffdce76438a1a6b204957f7c22becaee09115..7fd26366bcec9f76c4e16b4d1629fb32bbc4abd3 100755 (executable)
@@ -300,7 +300,7 @@ if ($action eq 'update') {
 
     if ($classification ne $classificationold) {
         unless ($classification) {
-            ThrowUserError("classification_not_specified")
+            ThrowUserError("classification_not_specified");
         }
         
         if (TestClassification($classification)) {
index d21518fceaa7a2558a4a14b45422a5a689f2afea..a8d1f1f9031a3e6d5f1912a77eef192d806e24d0 100755 (executable)
@@ -67,13 +67,11 @@ sub CheckProduct ($)
     # do we have a product?
     unless ($prod) {
         ThrowUserError('product_not_specified');
-        exit;
     }
 
     unless (TestProduct $prod) {
         ThrowUserError('product_doesnt_exist',
                        {'product' => $prod});
-        exit;
     }
 }
 
@@ -97,7 +95,6 @@ sub CheckComponent ($$)
     # do we have the component?
     unless ($comp) {
         ThrowUserError('component_not_specified');
-        exit;
     }
 
     CheckProduct($prod);
@@ -106,7 +103,6 @@ sub CheckComponent ($$)
         ThrowUserError('component_not_valid',
                        {'product' => $prod,
                         'name' => $comp});
-        exit;
     }
 }
 
@@ -267,18 +263,15 @@ if ($action eq 'new') {
     unless ($component) {
         ThrowUserError('component_blank_name',
                        {'name' => $component});
-        exit;
     }
     if (TestComponent($product, $component)) {
         ThrowUserError('component_already_exists',
                        {'name' => $component});
-        exit;
     }
 
     if (length($component) > 64) {
         ThrowUserError('component_name_too_long',
                        {'name' => $component});
-        exit;
     }
 
     my $description = trim($cgi->param('description') || '');
@@ -286,7 +279,6 @@ if ($action eq 'new') {
     if ($description eq '') {
         ThrowUserError('component_blank_description',
                        {'name' => $component});
-        exit;
     }
 
     my $initialowner = trim($cgi->param('initialowner') || '');
@@ -294,14 +286,12 @@ if ($action eq 'new') {
     if ($initialowner eq '') {
         ThrowUserError('component_need_initialowner',
                        {'name' => $component});
-        exit;
     }
 
     my $initialownerid = login_to_id ($initialowner);
     if (!$initialownerid) {
         ThrowUserError('component_need_valid_initialowner',
                        {'name' => $component});
-        exit;
     }
 
     my $initialqacontact = trim($cgi->param('initialqacontact') || '');
@@ -310,7 +300,6 @@ if ($action eq 'new') {
         if (!$initialqacontactid && $initialqacontact ne '') {
             ThrowUserError('component_need_valid_initialqacontact',
                            {'name' => $component});
-            exit;
         }
     }
 
@@ -571,7 +560,6 @@ if ($action eq 'update') {
     if (length($component) > 64) {
         ThrowUserError('component_name_too_long',
                        {'name' => $component});
-        exit;
     }
 
     # Note that the order of this tests is important. If you change
@@ -587,7 +575,6 @@ if ($action eq 'update') {
         unless ($description) {
             ThrowUserError('component_blank_description',
                            {'name' => $componentold});
-            exit;
         }
         SendSQL("UPDATE components
                  SET description=" . SqlQuote($description) . "
@@ -604,7 +591,6 @@ if ($action eq 'update') {
         unless ($initialownerid) {
             ThrowUserError('component_need_valid_initialowner',
                            {'name' => $componentold});
-            exit;
         }
 
         SendSQL("UPDATE components
@@ -621,7 +607,6 @@ if ($action eq 'update') {
         if (!$initialqacontactid && $initialqacontact ne '') {
             ThrowUserError('component_need_valid_initialqacontact',
                            {'name' => $componentold});
-            exit;
         }
 
         SendSQL("UPDATE components
@@ -637,12 +622,10 @@ if ($action eq 'update') {
         unless ($component) {
             ThrowUserError('component_must_have_a_name',
                            {'name' => $componentold});
-            exit;
         }
         if (TestComponent($product, $component)) {
             ThrowUserError('component_already_exists',
                            {'name' => $component});
-            exit;
         }
 
         SendSQL("UPDATE components SET name=" . SqlQuote($component) . 
index 9c835e8b777c461f0cb30ee53d12b4b7e717d754..4f4cf4bd52cd518bc2194789181d483b670e4f23 100755 (executable)
@@ -37,15 +37,12 @@ sub Validate ($$) {
     my ($name, $description) = @_;
     if ($name eq "") {
         ThrowUserError("keyword_blank_name");
-        exit;
     }
     if ($name =~ /[\s,]/) {
         ThrowUserError("keyword_invalid_name");
-        exit;
     }    
     if ($description eq "") {
         ThrowUserError("keyword_blank_description");
-        exit;
     }
 }
 
@@ -124,7 +121,6 @@ if ($action eq 'new') {
     if (FetchOneColumn()) {
         $vars->{'name'} = $name;
         ThrowUserError("keyword_already_exists");
-        exit;
     }
 
 
@@ -183,7 +179,6 @@ if ($action eq 'edit') {
     if (!$name) {
         $vars->{'id'} = $id;
         ThrowCodeError("invalid_keyword_id", $vars);
-        exit;
     }
 
     SendSQL("SELECT count(*)
@@ -227,7 +222,6 @@ if ($action eq 'update') {
     if ($tmp && $tmp != $id) {
         $vars->{'name'} = $name;
         ThrowUserError("keyword_already_exists", $vars);
-        exit;
     }
 
     SendSQL("UPDATE keyworddefs SET name = " . SqlQuote($name) .
index 7317e72204480682e0461f2e80cf23e410681fd9..85bcae8d30cf35e2cb2dd25fc8184336a1ceccb6 100755 (executable)
@@ -60,14 +60,12 @@ sub CheckProduct ($)
     # do we have a product?
     unless ($product) {
         ThrowUserError('product_not_specified');    
-        exit;
     }
 
     # Does it exist in the DB?
     unless (TestProduct $product) {
         ThrowUserError('product_doesnt_exist',
                        {'product' => $product});
-        exit;
     }
 }
 
@@ -104,7 +102,6 @@ sub CheckMilestone ($$)
     # do we have the milestone and product combination?
     unless ($milestone) {
         ThrowUserError('milestone_not_specified');
-        exit;
     }
 
     CheckProduct($product);
@@ -113,7 +110,6 @@ sub CheckMilestone ($$)
         ThrowUserError('milestone_not_valid',
                        {'product' => $product,
                         'milestone' => $milestone});
-        exit;
     }
 }
 
@@ -254,13 +250,11 @@ if ($action eq 'new') {
     unless ($milestone) {
         ThrowUserError('milestone_blank_name',
                        {'name' => $milestone});
-        exit;
     }
 
     if (length($milestone) > 20) {
         ThrowUserError('milestone_name_too_long',
                        {'name' => $milestone});
-        exit;
     }
 
     # Need to store in case detaint_natural() clears the sortkey
@@ -269,13 +263,11 @@ if ($action eq 'new') {
         ThrowUserError('milestone_sortkey_invalid',
                        {'name' => $milestone,
                         'sortkey' => $stored_sortkey});
-        exit;
     }
     if (TestMilestone($product, $milestone)) {
         ThrowUserError('milestone_already_exists',
                        {'name' => $milestone,
                         'product' => $product});
-        exit;
     }
 
     # Add the new milestone
@@ -492,7 +484,6 @@ if ($action eq 'update') {
     if (length($milestone) > 20) {
         ThrowUserError('milestone_name_too_long',
                        {'name' => $milestone});
-        exit;
     }
 
     my $dbh = Bugzilla->dbh;
@@ -509,7 +500,6 @@ if ($action eq 'update') {
             ThrowUserError('milestone_sortkey_invalid',
                            {'name' => $milestone,
                             'sortkey' => $stored_sortkey});
-            exit;
         }
 
         trick_taint($milestoneold);
@@ -530,13 +520,11 @@ if ($action eq 'update') {
     if ($milestone ne $milestoneold) {
         unless ($milestone) {
             ThrowUserError('milestone_blank_name');
-            exit;
         }
         if (TestMilestone($product, $milestone)) {
             ThrowUserError('milestone_already_exists',
                            {'name' => $milestone,
                             'product' => $product});
-            exit;
         }
 
         trick_taint($milestone);
index 11658c29ac789953e6d91c0a9019bff83eeb5155..db391228bf65ae799be98285fc3a8f09b0a135e1 100755 (executable)
@@ -129,13 +129,11 @@ sub CheckClassificationNew ($)
     # do we have a classification?
     unless ($cl) {
         ThrowUserError('classification_not_specified');    
-        exit;
     }
 
     unless (TestClassification $cl) {
         ThrowUserError('classification_doesnt_exist',
                        {'name' => $cl});
-        exit;
     }
 }
 
index 60f60057eb19f6828c5cd2ed9dfc36274f9c6230..7faea7c8d592ce4d49de61956829a12034ed7343 100755 (executable)
@@ -64,13 +64,11 @@ sub CheckProduct ($)
     # do we have a product?
     unless ($prod) {
         ThrowUserError('product_not_specified');    
-        exit;
     }
 
     unless (TestProduct $prod) {
         ThrowUserError('product_doesnt_exist',
                        {'product' => $prod});
-        exit;
     }
 }
 
@@ -94,7 +92,6 @@ sub CheckVersion ($$)
     # do we have the version?
     unless ($ver) {
         ThrowUserError('version_not_specified');
-        exit;
     }
 
     CheckProduct($prod);
@@ -103,7 +100,6 @@ sub CheckVersion ($$)
         ThrowUserError('version_not_valid',
                        {'product' => $prod,
                         'version' => $ver});
-        exit;
     }
 }
 
@@ -233,14 +229,12 @@ if ($action eq 'new') {
     unless ($version) {
         ThrowUserError('version_blank_name',
                        {'name' => $version});
-        exit;
     }
 
     if (TestVersion($product,$version)) {
         ThrowUserError('version_already_exists',
                        {'name' => $version,
                         'product' => $product});
-        exit;
     }
 
     # Add the new version
@@ -407,13 +401,11 @@ if ($action eq 'update') {
     if ($version ne $versionold) {
         unless ($version) {
             ThrowUserError('version_blank_name');
-            exit;
         }
         if (TestVersion($product,$version)) {
             ThrowUserError('version_already_exists',
                            {'name' => $version,
                             'product' => $product});
-            exit;
         }
         SendSQL("UPDATE bugs
                  SET version=" . SqlQuote($version) . "