gunnar: server/perl-kolab/Kolab-LDAP LDAP.pm.in,1.8,1.9

cvs at kolab.org cvs at kolab.org
Fri Jul 27 22:28:33 CEST 2007


Author: gunnar

Update of /kolabrepository/server/perl-kolab/Kolab-LDAP
In directory doto:/tmp/cvs-serv6516/perl-kolab/Kolab-LDAP

Modified Files:
	LDAP.pm.in 
Log Message:
Replaced statedir path with function argument in Kolab::LDAP::startup.

Index: LDAP.pm.in
===================================================================
RCS file: /kolabrepository/server/perl-kolab/Kolab-LDAP/LDAP.pm.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- LDAP.pm.in	26 Jul 2007 15:17:56 -0000	1.8
+++ LDAP.pm.in	27 Jul 2007 20:28:31 -0000	1.9
@@ -69,30 +69,32 @@
 
 sub startup
 {
+    my $statedir = shift;
+
     Kolab::log('L', 'Starting up');
 
     Kolab::log('L', 'Opening mailbox uid cache DB');
 
-    if (!dbmopen(%uid_db, "@kolab_statedir@/mailbox-uidcache.db", 0666)) {
+    if (!dbmopen(%uid_db, "$statedir/mailbox-uidcache.db", 0666)) {
         Kolab::log('L', 'Unable to open mailbox uid cache DB', KOLAB_ERROR);
         exit(1);
     }
 
     Kolab::log('L', 'Opening graveyard uid/timestamp cache DB');
 
-    if (!dbmopen(%gyard_db, "@kolab_statedir@/graveyard-uidcache.db", 0666)) {
+    if (!dbmopen(%gyard_db, "$statedir/graveyard-uidcache.db", 0666)) {
         Kolab::log('L', 'Unable to open graveyard uid cache DB', KOLAB_ERROR);
         exit(1);
     }
 
-    if (!dbmopen(%gyard_ts_db, "@kolab_statedir@/graveyard-tscache.db", 0666)) {
+    if (!dbmopen(%gyard_ts_db, "$statedir/graveyard-tscache.db", 0666)) {
         Kolab::log('L', 'Unable to open graveyard timestamp cache DB', KOLAB_ERROR);
         exit(1);
     }
 
     Kolab::log('L', 'Opening mailbox quota cache DB');
 
-    if (!dbmopen(%quota_db, "@kolab_statedir@/mailbox-quotacache.db", 0666)) {
+    if (!dbmopen(%quota_db, "$statedir/mailbox-quotacache.db", 0666)) {
         Kolab::log('L', 'Unable to open mailbox quota cache DB', KOLAB_ERROR);
         exit(1);
     }
@@ -351,12 +353,6 @@
 						     .' all']);		
 	      }
 	    }
-#	    if( $p ne 'sf' ) {
-#	      # Create FB dir for user
-#	      my $fbdir = '@webserver_document_root@/freebusy/'.$uid;
-#	      mkdir( $fbdir, 0750);
-#	      chown( $Kolab::config{'kolab_n_uid'},$Kolab::config{'kolab_n_gid'},$fbdir );
-#	    }
         }
     }
 
@@ -506,11 +502,6 @@
     }
 
     Kolab::Cyrus::deleteMailbox($cyrus, $uid, ($p eq 'sf' ? 1 : 0));
-#    if( $p ne 'sf' ) {
-#      # Create FB dir for user
-#      my $fbdir = '@webserver_document_root@/freebusy/'.$uid;
-#      system("rm -rf \"$fbdir\"" );
-#    }
     delete $uid_db{$guid};
     delete $quota_db{$guid};
     return 1;





More information about the commits mailing list