#541708 by catch: Removed unnecessary query in _filter_tips().
parent
6df0d7edb6
commit
cc22ae663a
|
@ -551,15 +551,15 @@ function filter_access($format) {
|
||||||
* Helper function for fetching filter tips.
|
* Helper function for fetching filter tips.
|
||||||
*/
|
*/
|
||||||
function _filter_tips($format, $long = FALSE) {
|
function _filter_tips($format, $long = FALSE) {
|
||||||
if ($format == -1) {
|
$formats = filter_formats();
|
||||||
$formats = filter_formats();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$formats = array(db_query("SELECT * FROM {filter_format} WHERE format = :format", array(':format' => $format))->fetchObject());
|
|
||||||
}
|
|
||||||
|
|
||||||
$tips = array();
|
$tips = array();
|
||||||
|
|
||||||
|
// If only listing one format, extract it from the $formats array.
|
||||||
|
if ($format != -1) {
|
||||||
|
$formats = array($formats[$format]);
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($formats as $format) {
|
foreach ($formats as $format) {
|
||||||
$filters = filter_list_format($format->format);
|
$filters = filter_list_format($format->format);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue