diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-21 00:50:32 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-21 00:50:32 +0000 |
commit | cc22ae663a5aafe1872549be1793d775356ae0ee (patch) | |
tree | 40e569bc9d2212f3275eea29dbe4888f0dad11be /modules | |
parent | 6df0d7edb6c650616e805a388389bb888a790221 (diff) | |
download | brdo-cc22ae663a5aafe1872549be1793d775356ae0ee.tar.gz brdo-cc22ae663a5aafe1872549be1793d775356ae0ee.tar.bz2 |
#541708 by catch: Removed unnecessary query in _filter_tips().
Diffstat (limited to 'modules')
-rw-r--r-- | modules/filter/filter.module | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 66fd6a5f7..9efe79991 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -551,15 +551,15 @@ function filter_access($format) { * Helper function for fetching filter tips. */ function _filter_tips($format, $long = FALSE) { - if ($format == -1) { - $formats = filter_formats(); - } - else { - $formats = array(db_query("SELECT * FROM {filter_format} WHERE format = :format", array(':format' => $format))->fetchObject()); - } + $formats = filter_formats(); $tips = array(); + // If only listing one format, extract it from the $formats array. + if ($format != -1) { + $formats = array($formats[$format]); + } + foreach ($formats as $format) { $filters = filter_list_format($format->format); |