summaryrefslogtreecommitdiff
path: root/plugins/libkolab
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-08-25 07:06:50 (GMT)
committerAleksander Machniak <alec@alec.pl>2014-08-25 07:06:50 (GMT)
commit5c895e27a17c89e54eec11fc4532e1b85dea9d59 (patch)
tree65dd8d1e90dc1158eb867bfba5baa967edb570a6 /plugins/libkolab
parentc15bec9ae60eb60f2e11c5cfc79b7bf1de66e5eb (diff)
downloadroundcubemail-plugins-kolab-5c895e27a17c89e54eec11fc4532e1b85dea9d59.tar.gz
Support relative URLs in kolab_freebusy_server setting (#3487)
Diffstat (limited to 'plugins/libkolab')
-rw-r--r--plugins/libkolab/lib/kolab_storage.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/libkolab/lib/kolab_storage.php b/plugins/libkolab/lib/kolab_storage.php
index 7287fc2..144655c 100644
--- a/plugins/libkolab/lib/kolab_storage.php
+++ b/plugins/libkolab/lib/kolab_storage.php
@@ -245,13 +245,16 @@ class kolab_storage
}
/**
- *
+ * Returns Free-busy server URL
*/
public static function get_freebusy_server()
{
- return unslashify(self::$config->get('kolab_freebusy_server', 'https://' . $_SESSION['imap_host'] . '/freebusy'));
- }
+ $url = 'https://' . $_SESSION['imap_host'] . '/freebusy';
+ $url = self::$config->get('kolab_freebusy_server', $url);
+ $url = rcube_utils::resolve_url($url);
+ return unslashify($url);
+ }
/**
* Compose an URL to query the free/busy status for the given user
@@ -261,7 +264,6 @@ class kolab_storage
return self::get_freebusy_server() . '/' . $email . '.ifb';
}
-
/**
* Creates folder ID from folder name
*
@@ -276,7 +278,6 @@ class kolab_storage
asciiwords(strtr($folder, '/.-', '___'));
}
-
/**
* Encode the given ID to a safe ascii representation
*
@@ -300,7 +301,6 @@ class kolab_storage
return base64_decode(str_pad(strtr($id, '-_', '+/'), strlen($id) % 4, '=', STR_PAD_RIGHT));
}
-
/**
* Return the (first) path of the requested IMAP namespace
*