]> 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:53:02 +0000 (12:53 +0000)
committermkanat%kerio.com <>
Tue, 13 Dec 2005 12:53:02 +0000 (12:53 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave

checksetup.pl

index bf93a65894be088eeefa9d8b77d232ee210672ff..fea6f4c71cd05ac520bcc120998495ceb97e0449 100755 (executable)
@@ -3189,10 +3189,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'");