Fix search case sensitivity - Issue #1

This commit is contained in:
Eslyium 2020-09-13 17:40:53 -04:00 committed by GitHub
parent e51317f6bb
commit 4f0b46c03e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,8 +43,8 @@ foreach($json as $source => $sourceData){
if(count($cog['author']) == 0){ continue; } # ghost entries
foreach($cog['tags'] as $index => $this_tag){$cog['tags'][$index] = strtolower($this_tag);}
if($filter && !in_array(strtolower($filter), $cog['tags'])){ continue; }
if($search && strpos($cog['id'], $search) === false){
if(strpos($cog['description'] ?: $cog['short'], $search) === false){
if($search && strpos(strtolower($cog['id']), strtolower($search)) === false){
if(strpos(strtolower($cog['description'] ?: $cog['short']), strtolower($search)) === false){
continue;
}
}