- Bugfix: the filter module generated an empty <ul></ul> (= invalid XHTML) when no filter tips are present.

4.5.x
Dries Buytaert 2004-10-09 15:47:44 +00:00
parent 48bcc19ca2
commit a56f9b5c9f
2 changed files with 12 additions and 8 deletions

View File

@ -734,13 +734,15 @@ function theme_filter_tips($tips, $long = false, $extra = '') {
$output .= '<strong>'. $name .'</strong>:<br />'; $output .= '<strong>'. $name .'</strong>:<br />';
} }
$output .= '<ul class="tips">'; $tips = '';
foreach ($tiplist as $tip) { foreach ($tiplist as $tip) {
$output .= '<li'. ($long ? ' id="'. $tip['id'] .'">' : '>') . $tip['tip'] . '</li>'; $tips .= '<li'. ($long ? ' id="'. $tip['id'] .'">' : '>') . $tip['tip'] . '</li>';
} }
$output .= '</ul>'; if ($tips) {
$output .= "<ul class=\"tips\">$tips</ul>";
}
if ($multiple) { if ($multiple) {
$output .= '</li>'; $output .= '</li>';
} }

View File

@ -734,13 +734,15 @@ function theme_filter_tips($tips, $long = false, $extra = '') {
$output .= '<strong>'. $name .'</strong>:<br />'; $output .= '<strong>'. $name .'</strong>:<br />';
} }
$output .= '<ul class="tips">'; $tips = '';
foreach ($tiplist as $tip) { foreach ($tiplist as $tip) {
$output .= '<li'. ($long ? ' id="'. $tip['id'] .'">' : '>') . $tip['tip'] . '</li>'; $tips .= '<li'. ($long ? ' id="'. $tip['id'] .'">' : '>') . $tip['tip'] . '</li>';
} }
$output .= '</ul>'; if ($tips) {
$output .= "<ul class=\"tips\">$tips</ul>";
}
if ($multiple) { if ($multiple) {
$output .= '</li>'; $output .= '</li>';
} }