]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 678959: Make GenerateUniqueToken work for all tables
authorByron Jones <bjones@mozilla.com>
Mon, 15 Aug 2011 12:38:08 +0000 (20:38 +0800)
committerByron Jones <bjones@mozilla.com>
Mon, 15 Aug 2011 12:38:08 +0000 (20:38 +0800)
r=LpSolit, a=LpSolit

Bugzilla/Token.pm

index 69751e9057e94d4176b1c9ac671a1e9aee3de7ab..c339c59842cd94fa519d67775de88a7e2ef6f0a6 100644 (file)
@@ -245,7 +245,7 @@ sub GenerateUniqueToken {
     $column ||= "token";
 
     my $dbh = Bugzilla->dbh;
-    my $sth = $dbh->prepare("SELECT userid FROM $table WHERE $column = ?");
+    my $sth = $dbh->prepare("SELECT 1 FROM $table WHERE $column = ?");
 
     while ($duplicate) {
         ++$tries;