r5103 Do not fetch locations list and build location tree each time request is processed
[racktables-incomplete-works] / wwwroot / inc / ajax-interface.php
index 797240ad72e40ab3a775e812e0d63e53b18bbe61..909948fd2d32822593b04e6a5cd1d3e392bb31a1 100644 (file)
@@ -138,7 +138,8 @@ function getTagSelectAJAX()
 
 function getLocationSelectAJAX()
 {
-       global $locationlist;
+       $locationlist = listCells ('location');
+       $locationtree = treeFromList ($locationlist); // adds ['trace'] keys into $locationlist items
        $options = array();
        $selected_id = '';
        if (! isset($_REQUEST['locationid']))