summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-21 00:50:32 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-21 00:50:32 +0000
commitcc22ae663a5aafe1872549be1793d775356ae0ee (patch)
tree40e569bc9d2212f3275eea29dbe4888f0dad11be /modules
parent6df0d7edb6c650616e805a388389bb888a790221 (diff)
downloadbrdo-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.module12
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);