summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-08-02 13:52:57 (GMT)
committerAleksander Machniak <alec@alec.pl>2013-08-02 13:52:57 (GMT)
commit455e973d5a537a681f0b00abe4793cf574c639d1 (patch)
treea27c7cc65d590ef7a1506d262da7d4d4aade4a5f
parent07eb58d06a2204979cbe04ba44b42404f2af9572 (diff)
downloadkolab-wap-455e973d5a537a681f0b00abe4793cf574c639d1.tar.gz
Make so system.select_domain request returns selected domain attributeskolab-webadmin-3.0
-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 a4a4b78..3c7ea84 100644
--- a/lib/kolab_api_controller.php
+++ b/lib/kolab_api_controller.php
@@ -410,11 +410,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;