Commit a8d2c8e8 authored by Dries's avatar Dries

- Path Patch #1213242 by andypost: optimize count(has) quiery.

parent 1866b96e
......@@ -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();
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment