1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Fixes #4048 - Valid HTML when no search results are found

Moved alert <div> outside of <ul> tags.
This commit is contained in:
Moc
2021-12-21 12:01:42 +01:00
parent 1779170933
commit dfc4fa5a1e

View File

@@ -840,10 +840,18 @@ class search_front extends e_shortcode
// }
// print_a($ps);
$idkey = str_replace('_', '-', $key);
$text .= '<ul id="search-results-'.$idkey.'" class="list-unstyled search-block">';
$text .= $ps['text'];
$text .= '</ul>';
if($ps['results'] == "0")
{
$text .= $ps['text'];
}
else
{
$idkey = str_replace('_', '-', $key);
$text .= '<ul id="search-results-'.$idkey.'" class="list-unstyled search-block">';
$text .= $ps['text'];
$text .= '</ul>';
}
$results = $ps['results'];
}