refactor search a little and add much better testing

This commit is contained in:
Shish
2023-12-14 16:33:21 +00:00
committed by Shish
parent df0a8c28d9
commit a5c6f1321b
23 changed files with 902 additions and 601 deletions

View File

@@ -119,9 +119,9 @@ class NumericScore extends Extension
$this->theme->get_nuller($event->display_user);
}
$n_up = Image::count_images(["upvoted_by={$event->display_user->name}"]);
$n_up = Search::count_images(["upvoted_by={$event->display_user->name}"]);
$link_up = search_link(["upvoted_by={$event->display_user->name}"]);
$n_down = Image::count_images(["downvoted_by={$event->display_user->name}"]);
$n_down = Search::count_images(["downvoted_by={$event->display_user->name}"]);
$link_down = search_link(["downvoted_by={$event->display_user->name}]"]);
$event->add_stats("<a href='$link_up'>$n_up Upvotes</a> / <a href='$link_down'>$n_down Downvotes</a>");
}