diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-08-26 10:02:04 +0100 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-08-26 10:02:04 +0100 |
commit | 8009b45f19e22405168c1e65c3df91e61b0f746c (patch) | |
tree | e106cd91f8b5669d84854e99836a1473c364e9af /modules/aggregator | |
parent | ae64c12900b6610450c046bd1246e6ea573f0ce4 (diff) | |
download | brdo-8009b45f19e22405168c1e65c3df91e61b0f746c.tar.gz brdo-8009b45f19e22405168c1e65c3df91e61b0f746c.tar.bz2 |
- Path Patch #1213242 by andypost: optimize count(has) quiery.
Diffstat (limited to 'modules/aggregator')
-rw-r--r-- | modules/aggregator/aggregator.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 1e1686af8..eafb61ed3 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -283,7 +283,7 @@ function _aggregator_category_title($category) { * otherwise. */ function _aggregator_has_categories() { - return user_access('access news feeds') && db_query('SELECT COUNT(*) FROM {aggregator_category}')->fetchField(); + return user_access('access news feeds') && (bool) db_query_range('SELECT 1 FROM {aggregator_category}', 0, 1)->fetchField(); } /** |