[tag_list] make logarithms consistent across databases

This commit is contained in:
Shish 2024-01-18 15:31:10 +00:00
parent b60646e98d
commit 376b2c6ac6
2 changed files with 2 additions and 2 deletions

View file

@ -146,7 +146,7 @@ function _log($a, $b = null): float
if (is_null($b)) {
return log($a);
} else {
return log($a, $b);
return log($b, $a);
}
}
function _isnull($a): bool

View file

@ -390,7 +390,7 @@ class TagList extends Extension
}
$tag_data = $database->get_all("
SELECT tag, count, FLOOR(LOG(count)) AS scaled
SELECT tag, count, FLOOR(LOG(10, count)) AS scaled
FROM tags
WHERE count >= :tags_min
ORDER BY count DESC, tag ASC