Profiler/Completions

* removed old workaround for js date object creation
This commit is contained in:
Sarjuuk
2024-07-13 19:22:25 +02:00
parent a9f1832b6d
commit 99a95f3995
2 changed files with 3 additions and 4 deletions

View File

@@ -620,8 +620,8 @@ class AjaxProfile extends AjaxHandler
// titleId => 1
$profile['titles'] = DB::Aowow()->selectCol('SELECT `titleId` AS ARRAY_KEY, 1 FROM ?_profiler_completion_titles WHERE `id` = ?d', $pBase['id']);
// achievementId => date
$profile['achievements'] = DB::Aowow()->selectCol('SELECT `achievementId` AS ARRAY_KEY, `date` FROM ?_profiler_completion_achievements WHERE `id` = ?d', $pBase['id']);
// achievementId => js date object
$profile['achievements'] = DB::Aowow()->selectCol('SELECT `achievementId` AS ARRAY_KEY, CONCAT("$new Date(", `date` * 1000, ")") FROM ?_profiler_completion_achievements WHERE `id` = ?d', $pBase['id']);
// just points
$profile['achievementpoints'] = $profile['achievements'] ? DB::Aowow()->selectCell('SELECT SUM(`points`) FROM ?_achievement WHERE `id` IN (?a)', array_keys($profile['achievements'])) : 0;