]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 310108: checksetup.pl fails if attachstatuses or attachstatusdefs tables are...
authormkanat%kerio.com <>
Tue, 13 Dec 2005 12:50:45 +0000 (12:50 +0000)
committermkanat%kerio.com <>
Tue, 13 Dec 2005 12:50:45 +0000 (12:50 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave

checksetup.pl

index 7f207faf409bf91f19cb135fb5449640a9dc2100..e21600ebfc0665b00b6f00e4d990b893b7b48370 100755 (executable)
@@ -3210,10 +3210,9 @@ if ($dbh->bz_table_info("attachstatuses")
     print "Converting attachment statuses to flags...\n";
     
     # Get IDs for the old attachment status and new flag fields.
-    $sth = $dbh->prepare("SELECT fieldid FROM fielddefs " . 
-                         "WHERE name='attachstatusdefs.name'");
-    $sth->execute();
-    my $old_field_id = $sth->fetchrow_arrayref()->[0] || 0;
+    my ($old_field_id) = $dbh->selectrow_array(
+        "SELECT fieldid FROM fielddefs WHERE name='attachstatusdefs.name'")
+        || 0;
     
     $sth = $dbh->prepare("SELECT fieldid FROM fielddefs " . 
                          "WHERE name='flagtypes.name'");