diff options
author | Simon Rettberg | 2016-06-08 13:00:39 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-06-08 13:00:39 +0200 |
commit | 62f218da95ac407c69cc0956c257ddc2ae9293c3 (patch) | |
tree | 4eb8b5a95752920a2fc8de80b01b640caf690451 /modules-available/locations/baseconfig | |
parent | PhpStorm stuff (diff) | |
download | slx-admin-62f218da95ac407c69cc0956c257ddc2ae9293c3.tar.gz slx-admin-62f218da95ac407c69cc0956c257ddc2ae9293c3.tar.xz slx-admin-62f218da95ac407c69cc0956c257ddc2ae9293c3.zip |
[location] Move getLocationRootChain to heler class
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); } |