Commit cc22ae66 authored by webchick's avatar webchick
Browse files

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

parent 6df0d7ed
......@@ -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);
......
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