steffen: server/kolab-resource-handlers/kolab-resource-handlers/freebusy freebusy.php, 1.5, 1.6
cvs at intevation.de
cvs at intevation.de
Sun Jul 11 21:46:56 CEST 2004
Author: steffen
Update of /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/freebusy
In directory doto:/tmp/cvs-serv23766/kolab-resource-handlers/freebusy
Modified Files:
freebusy.php
Log Message:
fixes
Index: freebusy.php
===================================================================
RCS file: /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/freebusy/freebusy.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- freebusy.php 11 Jul 2004 16:04:11 -0000 1.5
+++ freebusy.php 11 Jul 2004 19:46:54 -0000 1.6
@@ -339,27 +339,31 @@
$vfb = false;
if( $_SERVER['REQUEST_METHOD'] != 'PUT' && ($imapuser || $extended) ) {
// Open an IMAP connection to the requested users' calendar
- $imap = @imap_open($fullmbox, $imapuser, $imappw);
+ $imap = @imap_open($fullmbox, $imapuser, $imappw, OP_READONLY|OP_HALFOPEN );
if ( !$imap ) {
// Login error, check the cache
} else {
testIMAPError();
-
- // Enumerate our calendar events
- $messages = @imap_sort($imap, SORTDATE, 0, SE_UID);
- testIMAPError();
-
- // Generate the VFB file
- $vfb = &generateFreeBusy();
- $ts = mktime();
- if( $vfb ) {
- if( $extended ) {
- // Don't cache
- } else {
- store_freebusy( $fbdir, $fbfilename, $vfb );
+ $imap = @imap_reopen( $imap, $mailbox, OP_READONLY );
+ if ( $imap === false || imap_last_error() ) {
+ // Login error, check the cache
+ } else {
+ // Enumerate our calendar events
+ $messages = @imap_sort($imap, SORTDATE, 0, SE_UID);
+ testIMAPError();
+
+ // Generate the VFB file
+ $vfb = &generateFreeBusy();
+ $ts = mktime();
+ if( $vfb ) {
+ if( $extended ) {
+ // Don't cache
+ } else {
+ store_freebusy( $fbdir, $fbfilename, $vfb );
+ }
}
}
- }
+ }
}
if( !$vfb ) {
More information about the commits
mailing list