summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-10-09 15:47:44 +0000
committerDries Buytaert <dries@buytaert.net>2004-10-09 15:47:44 +0000
commita56f9b5c9f1adb5c36e84036289f53dcf96214e5 (patch)
treeef2b675326f3654abe53548f8c1a89465dbb3fe5 /modules
parent48bcc19ca276fab09d9a6c28fe2316a0288a528e (diff)
downloadbrdo-a56f9b5c9f1adb5c36e84036289f53dcf96214e5.tar.gz
brdo-a56f9b5c9f1adb5c36e84036289f53dcf96214e5.tar.bz2
- Bugfix: the filter module generated an empty <ul></ul> (= invalid XHTML) when no filter tips are present.
Diffstat (limited to 'modules')
-rw-r--r--modules/filter.module10
-rw-r--r--modules/filter/filter.module10
2 files changed, 12 insertions, 8 deletions
diff --git a/modules/filter.module b/modules/filter.module
index 770911c87..6d47ba84e 100644
--- a/modules/filter.module
+++ b/modules/filter.module
@@ -734,13 +734,15 @@ function theme_filter_tips($tips, $long = false, $extra = '') {
$output .= '<strong>'. $name .'</strong>:<br />';
}
- $output .= '<ul class="tips">';
-
+ $tips = '';
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) {
$output .= '</li>';
}
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index 770911c87..6d47ba84e 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -734,13 +734,15 @@ function theme_filter_tips($tips, $long = false, $extra = '') {
$output .= '<strong>'. $name .'</strong>:<br />';
}
- $output .= '<ul class="tips">';
-
+ $tips = '';
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) {
$output .= '</li>';
}