diff --git a/includes/types/areatrigger.class.php b/includes/types/areatrigger.class.php index 3b2e164b..e7e33577 100644 --- a/includes/types/areatrigger.class.php +++ b/includes/types/areatrigger.class.php @@ -17,8 +17,8 @@ class AreaTriggerList extends BaseType protected $queryBase = 'SELECT a.*, a.id AS ARRAY_KEY FROM ?_areatrigger a'; protected $queryOpts = array( - 'a' => [['s']], - 's' => ['j' => ['?_spawns s ON s.type = 503 AND s.typeId = a.id', true], 's' => ', s.areaId'] + 'a' => [['s']], // guid < 0 are teleporter targets, so exclude them here + 's' => ['j' => ['?_spawns s ON s.`type` = 503 AND s.`typeId` = a.`id` AND s.`guid` > 0', true], 's' => ', GROUP_CONCAT(s.`areaId`) AS "areaId"', 'g' => 'a.`id`'] ); public function __construct(array $conditions = [], array $miscData = []) @@ -43,7 +43,7 @@ class AreaTriggerList extends BaseType ); if ($_ = $this->curTpl['areaId']) - $data[$this->id]['location'] = [$_]; + $data[$this->id]['location'] = explode(',', $_); } return $data; diff --git a/localization/lang.class.php b/localization/lang.class.php index afdf9107..846c1128 100644 --- a/localization/lang.class.php +++ b/localization/lang.class.php @@ -128,6 +128,9 @@ class Lang reset($args); + if (count($args) < 2) + return $callback(current($args), key($args)); + do { $item = $callback(current($args), key($args)); diff --git a/static/js/Summary.js b/static/js/Summary.js index e618942d..5a28a6a6 100644 --- a/static/js/Summary.js +++ b/static/js/Summary.js @@ -2425,7 +2425,7 @@ Summary.prototype = { this.currentScale = $('option:selected', this.sortWeighted)[0].scale; } - lv.setSort([1], true, false); + lv.setSort(this.currentScale ? [4] : [1], true, false); lv.setData(this.calcScores(lv.data, this.currentScale)); if (this.currentScale) { diff --git a/static/js/global.js b/static/js/global.js index 2d64f0bb..9be5888a 100644 --- a/static/js/global.js +++ b/static/js/global.js @@ -5341,7 +5341,7 @@ function Listview(opt) { this.sort = []; } - if (this.debug || g_user.debug) { + if (this.debug) { this.columns.splice(0, 0, { id: 'debug-id', compute: function(data, td) {