Skip to content
Snippets Groups Projects
Commit cc22ae66 authored by Angie Byron's avatar Angie Byron
Browse files

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

parent 6df0d7ed
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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());
}
$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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment