steffen: server/kolab-resource-handlers/kolab-resource-handlers/freebusy freebusy.class.php.in, 1.6, 1.7 freebusyimapcache.class.php, 1.1, 1.2 pfb.php.in, 1.6, 1.7
cvs at kolab.org
cvs at kolab.org
Tue Oct 31 05:14:57 CET 2006
Author: steffen
Update of /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/freebusy
In directory doto:/tmp/cvs-serv15636
Modified Files:
freebusy.class.php.in freebusyimapcache.class.php pfb.php.in
Log Message:
include domain in path for cache files
Index: freebusy.class.php.in
===================================================================
RCS file: /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/freebusy/freebusy.class.php.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- freebusy.class.php.in 25 Oct 2006 02:28:57 -0000 1.6
+++ freebusy.class.php.in 31 Oct 2006 04:14:55 -0000 1.7
@@ -51,6 +51,7 @@
class FreeBusy {
function FreeBusy( $cache_dir,
+ $owner_email,
$username,
$password,
$imaphost,
@@ -58,6 +59,7 @@
$fbfuture=60,
$fbpast=0 ) {
$this->cache_dir = $cache_dir;
+ $this->owner_email = $owner_email;
$this->username = $username;
$this->password = $password;
$this->imaphost = $imaphost;
@@ -186,7 +188,7 @@
if (!isset($_SERVER["SERVER_NAME"]))
$_SERVER["SERVER_NAME"] = "localhost";
- $imapcache = new FreeBusyIMAPCache($this->cache_dir."/", $this->username, $this->foldername);
+ $imapcache = new FreeBusyIMAPCache($this->cache_dir."/", $this->owner_email, $this->foldername);
$imapcache->cache_load();
$uids = imap_search($this->imap, "UNDELETED", SE_UID);
Index: freebusyimapcache.class.php
===================================================================
RCS file: /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/freebusy/freebusyimapcache.class.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- freebusyimapcache.class.php 25 Oct 2006 02:28:57 -0000 1.1
+++ freebusyimapcache.class.php 31 Oct 2006 04:14:55 -0000 1.2
@@ -129,15 +129,21 @@
function compute_filename() {
- $folder_parts = explode('/', $this->foldername);
- unset($folder_parts[0]);
- $folder_storename = join('/', $folder_parts);
-
- $folder_storename = str_replace(".", "^", $folder_storename);
- $folder_storename = str_replace("\0", "", $folder_storename);
+ $folder_parts = explode('/', $this->foldername);
+ unset($folder_parts[0]);
+ $folder_storename = join('/', $folder_parts);
+
+ $folder_storename = str_replace(".", "^", $folder_storename);
+ $folder_storename = str_replace("\0", "", $folder_storename);
- $full_path = $this->store_prefix.$folder_storename.".imapcache";
- return $full_path;
+ if( ereg( '(.*)@(.*)', $this->owner, $regs ) ) {
+ $domain = $regs[2].'/';
+ $domain = str_replace(".", "^", $domain);
+ $domain = str_replace("\0", "", $domain);
+ } else $domain = '';
+
+ $full_path = $this->store_prefix.$domain.$folder_storename.".imapcache";
+ return $full_path;
}
function cache_load() {
Index: pfb.php.in
===================================================================
RCS file: /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/freebusy/pfb.php.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pfb.php.in 25 Oct 2006 02:28:57 -0000 1.6
+++ pfb.php.in 31 Oct 2006 04:14:55 -0000 1.7
@@ -161,7 +161,7 @@
unset($folder[0]);
$folder = join('/', $folder);
$fbpast = $ldap->freeBusyPast();
- $fb =& new FreeBusy( $full_cache_dir, $imapuser, $imappw, 'localhost', $params['imap_options'], $uinfo['FBFUTURE'], $fbpast );
+ $fb =& new FreeBusy( $full_cache_dir, $owner, $imapuser, $imappw, 'localhost', $params['imap_options'], $uinfo['FBFUTURE'], $fbpast );
$fb->default_domain = $params['email_domain'];
$rc = $fb->imapConnect();
@@ -181,6 +181,10 @@
if( PEAR::isError( $vfb ) ) {
unauthorized($vfb->toString());
return false;
+ }
+
+ if(ereg('(.*)@(.*)',$owner,$regs)) {
+ $owner = $regs[2].'/'.$regs[1];
}
$acl = $fb->getACL();
More information about the commits
mailing list