diff --git a/resources/classes/destinations.php b/resources/classes/destinations.php
index b53bb6c3d9..8aa5d1714d 100644
--- a/resources/classes/destinations.php
+++ b/resources/classes/destinations.php
@@ -46,9 +46,12 @@ class destinations {
public function select($destination_type, $destination_name, $destination_value) {
//set the global variables
- global $db_type;
+ global $db_type;
- //get the array from the app_config.php files
+ //get the destinations
+ if (!is_array($this->destinations)) {
+
+ //get the array from the app_config.php files
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
$x = 0;
foreach ($config_list as &$config_path) {
@@ -61,14 +64,14 @@ class destinations {
$this->destinations[] = $row;
}
}
-
- //put the array in order
+
+ //put the array in order
foreach ($this->destinations as $row) {
$option_groups[] = $row['label'];
}
array_multisort($option_groups, SORT_ASC, $this->destinations);
-
- //add the sql and data to the array
+
+ //add the sql and data to the array
$x = 0;
foreach ($this->destinations as $row) {
if ($row['type'] = 'sql') {
@@ -134,150 +137,151 @@ class destinations {
$this->destinations[$x]['result']['data'][$y]['name'] = '*732';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*732 XML ${context}';
$y++;
+ }
//remove special characters from the name
- $destination_id = str_replace("]", "", $destination_name);
- $destination_id = str_replace("[", "_", $destination_id);
+ $destination_id = str_replace("]", "", $destination_name);
+ $destination_id = str_replace("[", "_", $destination_id);
//set the css style
- $select_style = 'width: 200px;';
+ $select_style = 'width: 200px;';
//add additional
- if (if_group("superadmin")) {
- $response = "\n";
- $response .= "\n";
+ if (if_group("superadmin")) {
+ $response = "\n";
+ $response .= "\n";
+ }
+
+ //set default to false
+ $select_found = false;
+
+ $response .= " \n";
+ if (if_group("superadmin")) {
+ $response .= "";
+ }
//return the formatted destinations
- return $response;
+ return $response;
}
/**