steffen: server/kolab-webadmin/kolab-webadmin/www/admin/service index.php, 1.22, 1.23

cvs at intevation.de cvs at intevation.de
Tue Jul 5 12:31:53 CEST 2005


Author: steffen

Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/service
In directory doto:/tmp/cvs-serv9721/kolab-webadmin/www/admin/service

Modified Files:
	index.php 
Log Message:
multi-domain config (working) + per-domain maintainer config (not working yet)

Index: index.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/service/index.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- index.php	10 Jun 2005 23:54:37 -0000	1.22
+++ index.php	5 Jul 2005 10:31:51 -0000	1.23
@@ -42,6 +42,7 @@
   global $quotawarn;
   global $freebusypast;
   global $postfixmydomain;
+  global $postfixmydestination;
   global $postfixmynetworks;
   global $postfixallowunauth;
   global $postfixrelayhost;
@@ -67,6 +68,8 @@
 	$quotawarn = $attrs['cyrus-quotawarn'][0];
 	$freebusypast = $attrs['kolabFreeBusyPast'][0];
 	$postfixmydomain = $attrs['postfix-mydomain'][0];
+	$postfixmydestination = $attrs['postfix-mydestination'];
+	unset($postfixmydestination['count']);
 	unset( $attrs['postfix-mynetworks']['count'] );
 	$postfixmynetworks = join(', ',$attrs['postfix-mynetworks']);
 	$postfixallowunauth = $attrs['postfix-allow-unauthenticated'][0];
@@ -202,10 +205,37 @@
   }
 }
 
+// Delete domain
+if( $_REQUEST['deletedestination'] ) {
+  extract_ldap_values();
+  $key = array_search( trim($_REQUEST['adestination']),$postfixmydestination);
+  if( $key !== false ) {
+	unset( $postfixmydestination[ $key ] );
+  }
+  $attrs = array();
+  $attrs['postfix-mydestination'] = $postfixmydestination;
+  if( !($result = ldap_modify($ldap->connection, "k=kolab,".$_SESSION['base_dn'], $attrs)) ) {
+	$errors[] = _("LDAP Error: failed to modify kolab configuration object: ")
+	  .ldap_error($ldap->connection);
+  }
+}
+// Add domain
+if( $_REQUEST['adddestination'] ) {
+  extract_ldap_values();
+  if( trim($_REQUEST['adestination']) ) {
+	$postfixmydestination[] = trim($_REQUEST['adestination']);
+	$attrs = array();
+	$attrs['postfix-mydestination'] = $postfixmydestination;
+	if( !($result = ldap_modify($ldap->connection, "k=kolab,".$_SESSION['base_dn'], $attrs)) ) {
+	  $errors[] = _("LDAP Error: failed to modify kolab configuration object: ").ldap_error($ldap->connection);
+	}
+  }
+}
 
+// Delete kolabhost
 if( $_REQUEST['deletekolabhost'] ) {
   extract_ldap_values();
-  $key = array_search($_REQUEST['akolabhost'],$kolabhost);
+  $key = array_search( trim($_REQUEST['akolabhost']),$kolabhost);
   if( $key !== false ) {
 	unset( $kolabhost[ $key ] );
   }
@@ -216,6 +246,8 @@
 	  .ldap_error($ldap->connection);
   }
 }
+
+// Add kolabhost
 if( $_REQUEST['addkolabhost'] ) {
   extract_ldap_values();
   if( trim($_REQUEST['akolabhost']) ) {
@@ -260,6 +292,7 @@
 $smarty->assign( 'quotawarn', $quotawarn );
 $smarty->assign( 'httpallowunauthfb', toboolstr($httpallowunauthfb) );
 $smarty->assign( 'freebusypast', $freebusypast );
+$smarty->assign( 'postfixmydestination', $postfixmydestination );
 $smarty->assign( 'postfixmynetworks', $postfixmynetworks );
 $smarty->assign( 'postfixallowunauth', toboolstr($postfixallowunauth) );
 $smarty->assign( 'postfixrelayhost', $postfixrelayhost );





More information about the commits mailing list