summaryrefslogtreecommitdiffstats
path: root/lib/kolab_api_controller.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-08-02 15:52:57 +0200
committerAleksander Machniak <alec@alec.pl>2013-08-02 15:54:14 +0200
commitffe3fbf5c027b695c2b0f3335fae28c6826ac0fc (patch)
tree2dee07cdb11408a157573fde5076895bc9c3bca2 /lib/kolab_api_controller.php
parentb7c06cbc6efc609b10d8a7863359d669d9b54db6 (diff)
downloadwebadmin-ffe3fbf5c027b695c2b0f3335fae28c6826ac0fc.tar.gz
Make so system.select_domain request returns selected domain attributes
Diffstat (limited to 'lib/kolab_api_controller.php')
-rw-r--r--lib/kolab_api_controller.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/kolab_api_controller.php b/lib/kolab_api_controller.php
index 8b9526e..650fbdf 100644
--- a/lib/kolab_api_controller.php
+++ b/lib/kolab_api_controller.php
@@ -413,11 +413,16 @@ class kolab_api_controller
*
* @param array $request GET request parameters
*
- * @return bool
+ * @return bool|array Domain attributes or False on failure
*/
- private function select_domain($request) {
+ private function select_domain($request)
+ {
if (!empty($request['domain']) && is_string($request['domain'])) {
- return $_SESSION['user']->set_domain($request['domain']);
+ if ($_SESSION['user']->set_domain($request['domain'])) {
+ $service = $this->get_service('domain');
+ $domain = $service->domain_info(array('domain' => $request['domain']), null);
+ return $domain;
+ }
}
return false;