diff -urpN drupal-6.x-dev-200708181601/includes/bootstrap.inc prepatch-200708181601/includes/bootstrap.inc --- drupal-6.x-dev-200708181601/includes/bootstrap.inc 2007-08-18 16:12:56.000000000 +0800 +++ prepatch-200708181601/includes/bootstrap.inc 2007-08-18 16:09:21.000000000 +0800 @@ -822,7 +771,7 @@ function drupal_is_denied($type, $mask) // (allowed). // The use of ORDER BY / LIMIT is more efficient than "MAX(status) = 0" // in PostgreSQL <= 8.0. - return (bool) db_result(db_query_range("SELECT CASE WHEN status=1 THEN 0 ELSE 1 END FROM {access} WHERE type = '%s' AND LOWER(mask) LIKE LOWER('%s') ORDER BY status DESC", $type, $mask, 0, 1)); + return (bool) db_result(db_query_range("SELECT CASE WHEN status=1 THEN 0 ELSE 1 END AS bool FROM {access} WHERE type = '%s' AND LOWER(mask) LIKE LOWER('%s') ORDER BY status DESC", $type, $mask, 0, 1)); } /**