summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hoffend <dh@dotlan.net>2015-02-25 22:35:25 (GMT)
committerDaniel Hoffend <dh@dotlan.net>2015-02-25 22:35:25 (GMT)
commite951e4657a7fa527166d6fc814ffb3484576217e (patch)
tree2178092f97140709af2ec5d5831b178462410697
parent062c8eb97bed4ff3d505f10f6a7cf0fe8c3fa66c (diff)
downloadkolab-wap-e951e4657a7fa527166d6fc814ffb3484576217e.tar.gz
Hotfix to validate sharedfolders #4731
-rw-r--r--lib/api/kolab_api_service_form_value.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php
index 320acf9..10dd39c 100644
--- a/lib/api/kolab_api_service_form_value.php
+++ b/lib/api/kolab_api_service_form_value.php
@@ -1611,7 +1611,7 @@ class kolab_api_service_form_value extends kolab_api_service
Log::trace("__get_valid_domains( " . $my_primary_domain . ")");
Log::trace("\$all_domains includes: " . var_export($all_domains, TRUE) . " (must include domain for \$my_primary_domain)");
- $valid_domains = array();
+ $valid_domains = $my_primary_domain ? array($my_primary_domain) : array();
foreach ($all_domains as $domain_id => $domain_attrs) {
if (!is_array($domain_attrs[$dna])) {
$domain_attrs[$dna] = (array)($domain_attrs[$dna]);
@@ -1622,7 +1622,7 @@ class kolab_api_service_form_value extends kolab_api_service
}
}
- return $valid_domains;
+ return array_unique($valid_domains);
}
private function _validate_email_address_in_any_of_my_domains($mail_address)