summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-01-17 14:50:45 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-01-17 14:50:45 (GMT)
commit7d0962ff1c4f143d7a8553a7da4e00126b53811b (patch)
tree15c43cb8e1190ab431e83f3d69d22e19ca10c26a /lib
parent2d8591089c85e85da1e0f0c3f719afff4949e1d5 (diff)
downloadkolab-freebusy-7d0962ff1c4f143d7a8553a7da4e00126b53811b.tar.gz
Always use %s placeholders instead of %u; return UTF-8 plaintext
Diffstat (limited to 'lib')
-rw-r--r--lib/Kolab/FreeBusy/DirectoryLDAP.php4
-rw-r--r--lib/Kolab/FreeBusy/DirectoryStatic.php2
-rw-r--r--lib/Kolab/FreeBusy/Source.php3
3 files changed, 5 insertions, 4 deletions
diff --git a/lib/Kolab/FreeBusy/DirectoryLDAP.php b/lib/Kolab/FreeBusy/DirectoryLDAP.php
index 54709f2..55a59df 100644
--- a/lib/Kolab/FreeBusy/DirectoryLDAP.php
+++ b/lib/Kolab/FreeBusy/DirectoryLDAP.php
@@ -78,11 +78,11 @@ class DirectoryLDAP extends Directory
*/
public function resolve($user)
{
- $result = array('u' => $user);
+ $result = array('s' => $user);
if ($this->ready) {
// search with configured filter
- $filter = preg_replace('/%u/i', $user, $this->config['filter']);
+ $filter = preg_replace('/%s/i', $user, $this->config['filter']);
$ldapresult = $this->ldap->search($this->config['base_dn'], $filter, 'sub');
// got a valid result
diff --git a/lib/Kolab/FreeBusy/DirectoryStatic.php b/lib/Kolab/FreeBusy/DirectoryStatic.php
index ff55e0e..8424332 100644
--- a/lib/Kolab/FreeBusy/DirectoryStatic.php
+++ b/lib/Kolab/FreeBusy/DirectoryStatic.php
@@ -23,7 +23,7 @@ class DirectoryStatic extends Directory
*/
public function resolve($user)
{
- $result = array('u' => $user);
+ $result = array('s' => $user);
// check if user matches the filter property (if configured)
if (!empty($this->config['filter'])) {
diff --git a/lib/Kolab/FreeBusy/Source.php b/lib/Kolab/FreeBusy/Source.php
index 2d12ebc..96bb547 100644
--- a/lib/Kolab/FreeBusy/Source.php
+++ b/lib/Kolab/FreeBusy/Source.php
@@ -20,7 +20,8 @@ abstract class Source
$config['url'] = $url;
switch ($config['scheme']) {
case 'file': return new SourceFile($config);
- case 'imap': return new SourceIMAP($config);
+ case 'imap':
+ case 'imaps': return new SourceIMAP($config);
case 'http':
case 'https': return new SourceURL($config);
}