[statistics] sort by tag id for correctness
Sorting by user.id was an oversight which caused tags to be miscredited when comparing against the previous tag history entry for an image. For example, whoever had the lowest user ID (rather than the uploader) had their entry considered the initial tag list.
This commit is contained in:
parent
d7f0f17fea
commit
2a9228e244
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ class Statistics extends Extension
|
|||
{
|
||||
global $database;
|
||||
// Returns the username and tags from each tag history entry. This includes Anonymous tag histories to prevent their tagging being ignored and credited to the next user to edit.
|
||||
$tag_stats = $database->get_all("SELECT users.class,users.name,tag_histories.tags,tag_histories.image_id FROM tag_histories INNER JOIN users ON users.id = tag_histories.user_id WHERE 1=1 ORDER BY users.id;");
|
||||
$tag_stats = $database->get_all("SELECT users.class,users.name,tag_histories.tags,tag_histories.image_id FROM tag_histories INNER JOIN users ON users.id = tag_histories.user_id WHERE 1=1 ORDER BY tag_histories.id;");
|
||||
|
||||
// Group tag history entries by image id
|
||||
$tag_histories = [];
|
||||
|
|
Reference in a new issue