Misc/Fixups

* colAddins should be null if not in use
 * fix index warnings in search + profiler
 * cast url param 'locale' to int for all uses
 * fix breadcrumbs for sounds page
 * fix determining actionOwner for SmartAI
This commit is contained in:
Sarjuuk
2022-04-05 16:13:56 +02:00
parent 6594d6fa42
commit c0e9159c1e
9 changed files with 22 additions and 15 deletions

View File

@@ -360,7 +360,7 @@ class AjaxProfile extends AjaxHandler
$cuProfile['sourceId'] = $_;
}
if ($cuProfile['sourceId'])
if (!empty($cuProfile['sourceId']))
$cuProfile['sourceName'] = DB::Aowow()->selectCell('SELECT name FROM ?_profiler_profiles WHERE id = ?d', $cuProfile['sourceId']);
$charId = -1;
@@ -420,7 +420,7 @@ class AjaxProfile extends AjaxHandler
$itemData[2] = 0;
// item sockets are fubar
$nSockets = $items->json[$itemData[1]]['nsockets'];
$nSockets = $items->json[$itemData[1]]['nsockets'] ?? 0;
$nSockets += in_array($slot, [SLOT_WAIST, SLOT_WRISTS, SLOT_HANDS]) ? 1 : 0;
for ($i = 5; $i < 9; $i++)
if ($itemData[$i] > 0 && (!$items->getEntry($itemData[$i]) || $i >= (5 + $nSockets)))