Fix searching for NUT Network UPS would return no results

due to branding stuff
pull/11/head
Squidly271 2021-03-15 06:29:12 -04:00
parent f09ca9a9e6
commit 7c953e31e9
3 changed files with 2 additions and 0 deletions

View File

@ -237,6 +237,7 @@ function DownloadApplicationFeed() {
$o['RepoName'] = $o['Repo'];
$o['SortAuthor'] = $o['Author'];
$o['SortName'] = str_replace("-"," ",$o['Name']);
$o['SortName'] = preg_replace('/\s+/',' ',$o['SortName']);
$o['CardDescription'] = (strlen($o['Description']) > 240) ? substr($o['Description'],0,240)." ..." : $o['Description'];
if ( $o['IconHTTPS'] )

View File

@ -364,6 +364,7 @@ function validURL($URL) {
function filterMatch($filter,$searchArray,$exact=true) {
$filterwords = explode(" ",$filter);
foreach ( $filterwords as $testfilter) {
if ( ! trim($testfilter) ) continue;
foreach ($searchArray as $search) {
if ( stripos($search,$testfilter) !== false ) {
$foundword++;