mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Profiler/Localization
* TCs guild and arena_team tables as encoded as utf8mb4_general_ci, which is not accent-aware. So we have to get all results and filter for the correct one in php. * fixes an issue where direcly accessing a guild/arena-team whith a name simiar to an already known guild/team would lookup the wrong subject on the server and then fail to create a local stub with already existing key. (Shâdów vs Shadow)
This commit is contained in:
@@ -57,8 +57,10 @@ class ArenateamBaseResponse extends TemplateResponse
|
||||
}
|
||||
|
||||
// 2) not yet synced but exists on realm (wont work if we get passed an urlized name, but there is nothing we can do about it)
|
||||
else if ($subject = DB::Characters($this->realmId)->selectRow('SELECT at.`arenaTeamId` AS "realmGUID", at.`name`, at.`type` FROM arena_team at WHERE at.`name` = ?', Util::ucFirst($this->subjectName)))
|
||||
$subjects = DB::Characters($this->realmId)->select('SELECT at.`arenaTeamId` AS "realmGUID", at.`name`, at.`type` FROM arena_team at WHERE at.`name` = ?', $this->subjectName);
|
||||
if ($subject = array_filter($subjects, fn($x) => Util::lower($x['name']) == Util::lower($this->subjectName)))
|
||||
{
|
||||
$subject = $subject[0];
|
||||
$subject['realm'] = $this->realmId;
|
||||
$subject['cuFlags'] = PROFILER_CU_NEEDS_RESYNC;
|
||||
$subject['nameUrl'] = Profiler::urlize($subject['name']);
|
||||
|
||||
Reference in New Issue
Block a user