|
|
@@ -353,22 +353,6 @@ function zimbraSingleClientArea($userData)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function recursiveFindAll($haystack, $needle)
|
|
|
-{
|
|
|
- $values = array();
|
|
|
- $iterator = new RecursiveArrayIterator($haystack);
|
|
|
- $recursive = new RecursiveIteratorIterator(
|
|
|
- $iterator,
|
|
|
- RecursiveIteratorIterator::SELF_FIRST
|
|
|
- );
|
|
|
- foreach ($recursive as $key => $value) {
|
|
|
- if ($key === $needle) {
|
|
|
- array_push($values, $value);
|
|
|
- }
|
|
|
- }
|
|
|
- return $values;
|
|
|
-}
|
|
|
-
|
|
|
function zimbraSingleConfigOptions() {
|
|
|
$accessData = zimbraSingleGetAccess();
|
|
|
|
|
|
@@ -396,23 +380,31 @@ function zimbraSingleConfigOptions() {
|
|
|
);
|
|
|
return false;
|
|
|
}
|
|
|
+ $cosNames = recursiveFindAll($response, 'NAME');
|
|
|
logModuleCall(
|
|
|
'zimbrasingle',
|
|
|
__FUNCTION__,
|
|
|
$params,
|
|
|
"All COS Array",
|
|
|
- $response
|
|
|
+ $cosNames
|
|
|
);
|
|
|
- $configOptions = array ( [
|
|
|
- "test" => [
|
|
|
- "FriendlyName" => "Test",
|
|
|
- "Type" => "text", # Text Box
|
|
|
- "Size" => "25", # Defines the Field Width
|
|
|
- "Description" => "Textbox",
|
|
|
- "Default" => "Example",
|
|
|
- ],
|
|
|
- ]);
|
|
|
- return $configOptions;
|
|
|
+ return $cosNames;
|
|
|
+}
|
|
|
+
|
|
|
+function recursiveFindAll($haystack, $needle)
|
|
|
+{
|
|
|
+ $values = array();
|
|
|
+ $iterator = new RecursiveArrayIterator($haystack);
|
|
|
+ $recursive = new RecursiveIteratorIterator(
|
|
|
+ $iterator,
|
|
|
+ RecursiveIteratorIterator::SELF_FIRST
|
|
|
+ );
|
|
|
+ foreach ($recursive as $key => $value) {
|
|
|
+ if ($key === $needle) {
|
|
|
+ array_push($values, $value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return $values;
|
|
|
}
|
|
|
|
|
|
function zimbraSingleCheckPassword($pwd)
|