make sorting case-insensitive

This commit is contained in:
xfnw 2020-12-15 21:02:31 -05:00
parent be5b250319
commit 6a1b3d66d8

View file

@ -53,7 +53,7 @@ if (isset($_GET['q']) && preg_replace('/\s+/', '', $_GET['q']) != '') {
while ($row = $stmt->fetch()) { while ($row = $stmt->fetch()) {
$score = 0; $score = 0;
foreach ($terms as $param) foreach ($terms as $param)
$score = $score + substr_count($row['content'],$param); $score = $score + substr_count(strtolower($row['content']),strtolower($param));
array_push($scores, $score); array_push($scores, $score);
$row['score'] = $score; $row['score'] = $score;
array_push($rows, $row); array_push($rows, $row);