summaryrefslogtreecommitdiffstats
path: root/lib/kolab_client_task.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-27 11:18:22 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-27 11:18:22 +0200
commite2054aa50bd5ca07b6cc95e045d9178862ca511f (patch)
tree56307227a7b918c7d89b66cd75d207b1353ecef4 /lib/kolab_client_task.php
parentc706af610ca487dfb6acea0b9147367603d7642d (diff)
downloadwebadmin-e2054aa50bd5ca07b6cc95e045d9178862ca511f.tar.gz
Update domain selector after adding/removing domain (Bug #1761)
Diffstat (limited to 'lib/kolab_client_task.php')
-rw-r--r--lib/kolab_client_task.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index 789a743..4f3cce0 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -661,13 +661,14 @@ class kolab_client_task
/**
* Returns list of system capabilities.
*
- * @param bool $all If enabled capabilities for all domains will be returned
+ * @param bool $all If enabled capabilities for all domains will be returned
+ * @param bool $refresh Disable session cache
*
* @return array List of system capabilities
*/
- protected function capabilities($all = false)
+ protected function capabilities($all = false, $refresh = false)
{
- if (isset($_SESSION['capabilities']) && !$this->devel_mode) {
+ if (!$refresh && isset($_SESSION['capabilities']) && !$this->devel_mode) {
$list = $_SESSION['capabilities'];
}
else {
@@ -701,11 +702,13 @@ class kolab_client_task
/**
* Returns domains list (based on capabilities response)
*
+ * @param bool $refresh Refresh session cache
+ *
* @return array List of domains
*/
- protected function get_domains()
+ protected function get_domains($refresh = false)
{
- $caps = $this->capabilities(true);
+ $caps = $this->capabilities(true, $refresh);
return is_array($caps) ? array_keys($caps) : array();
}