Profiler/Custom

* fixed deleted profiles counting towards the user cap of 10
This commit is contained in:
Sarjuuk
2020-04-05 12:31:59 +02:00
parent 9f8c643cf4
commit 0f9a3e8cb6

View File

@@ -371,7 +371,7 @@ class AjaxProfile extends AjaxHandler
} }
else // new else // new
{ {
$nProfiles = DB::Aowow()->selectCell('SELECT COUNT(*) FROM ?_profiler_profiles WHERE user = ?d AND realmGUID IS NULL', User::$id); $nProfiles = DB::Aowow()->selectCell('SELECT COUNT(*) FROM ?_profiler_profiles WHERE user = ?d AND (cuFlags & ?d) = 0 AND realmGUID IS NULL', User::$id, PROFILER_CU_DELETED);
if ($nProfiles < 10 || User::isPremium()) if ($nProfiles < 10 || User::isPremium())
if ($newId = DB::Aowow()->query('INSERT INTO ?_profiler_profiles (?#) VALUES (?a)', array_keys($cuProfile), array_values($cuProfile))) if ($newId = DB::Aowow()->query('INSERT INTO ?_profiler_profiles (?#) VALUES (?a)', array_keys($cuProfile), array_values($cuProfile)))
$charId = $newId; $charId = $newId;