1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01: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
No known key found for this signature in database
GPG Key ID: AAEA3CC2C5A308F2

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'];
}