diff options
Diffstat (limited to 'modules-available/locations/baseconfig')
-rw-r--r-- | modules-available/locations/baseconfig/getconfig.inc.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/modules-available/locations/baseconfig/getconfig.inc.php b/modules-available/locations/baseconfig/getconfig.inc.php index 2643ced6..d4a4f40b 100644 --- a/modules-available/locations/baseconfig/getconfig.inc.php +++ b/modules-available/locations/baseconfig/getconfig.inc.php @@ -9,13 +9,7 @@ if ($locationId === false) { $matchingLocations = array(); if ($locationId !== false) { // Get all parents - settype($locationId, 'integer'); - $locations = Location::getLocationsAssoc(); - $find = $locationId; - while (isset($locations[$find]) && !in_array($find, $matchingLocations)) { - $matchingLocations[] = $find; - $find = (int)$locations[$find]['parentlocationid']; - } + $matchingLocations = Location::getLocationRootChain($locationId); $configVars["SLX_LOCATIONS"] = implode(' ', $matchingLocations); } |