#541708 by catch: Removed unnecessary query in _filter_tips().

merge-requests/26/head
Angie Byron 2009-08-21 00:50:32 +00:00
parent 6df0d7edb6
commit cc22ae663a
1 changed files with 6 additions and 6 deletions

View File

@ -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);