summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcanyonknight <canyonknight@gmail.com>2012-10-09 16:44:09 -0400
committerLukas Fleischer <archlinux@cryptocrack.de>2012-10-11 21:19:16 +0200
commitf3325ce66f004b7580229fc7ddafcf641cfc9aa8 (patch)
tree30f6e6b7dbefe0b29961fa9876fe8c5ecc01df56
parent24a8452880476201ab231b86f6a9cde1e74e107c (diff)
pkgfuncs.inc.php: Fix blacklisting functionality
An array that contains whether the package is blacklisted is being improperly used for a comparison. Use fetchColumn() to avoid the array completely and compare a value directly. Regression with e171f6f34eeacf35cf7142b4788d43e7d0978546 Fixes FS#31867 Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r--web/lib/pkgfuncs.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index 0072856..baa9aa1 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -428,7 +428,7 @@ function pkgname_is_blacklisted($name, $dbh=NULL) {
$result = $dbh->query($q);
if (!$result) return false;
- return ($result->fetch(PDO::FETCH_NUM) > 0);
+ return ($result->fetchColumn() > 0);
}
/**