steffen: server/kolab-webadmin/kolab-webadmin/www/admin/service index.php, 1.25, 1.26

cvs at intevation.de cvs at intevation.de
Thu Oct 13 03:50:03 CEST 2005


Author: steffen

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

Modified Files:
	index.php 
Log Message:
Fix for issue886 (i18n problem)

Index: index.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/service/index.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- index.php	3 Oct 2005 01:08:36 -0000	1.25
+++ index.php	13 Oct 2005 01:50:01 -0000	1.26
@@ -94,7 +94,7 @@
   $mail = trim($_REQUEST['systemaliasmail']);
   $dn = $ldap->dnForMailOrAlias( $mail );
   if( !$dn ) {
-	$errors[] = _("No account found for email address $mail");
+	$errors[] = sprintf(_("No account found for email address %s"), $mail);
   } else {
 	foreach( array( 'postmaster', 'hostmaster', 'abuse', 'virusalert', 'MAILER-DAEMON' ) as $group ) {
 	  $attrs = array( 'objectClass' => array( 'top', 'kolabGroupOfNames' ),
@@ -102,9 +102,9 @@
 					  'mail' => $group.'@'.$postfixmydomain,
 					  'member' => $dn );
 	  if( !ldap_add( $ldap->connection, "cn=$group,".$_SESSION['base_dn'], $attrs ) ) {
-		$errors[] = _("LDAP Error: Failed to add distribution list $group: ").$ldap->error();
+		$errors[] = sprintf(_("LDAP Error: Failed to add distribution list %s: %s"), $group, $ldap->error());
 	  } else {
-		$messages[] = "Successfully created distribution list $group";
+		$messages[] = sprintf( _("Successfully created distribution list %s"), $group);
 	  }
 	}
   }
@@ -122,8 +122,8 @@
   if( postvalue( 'amavis' ) != $amavis )  $attrs['postfix-enable-virus-scan'] = postvalue( 'amavis' );
   
   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);
+	$errors[] = sprintf( _("LDAP Error: failed to modify kolab configuration object: %s"),
+						 ldap_error($ldap->connection));
   }
 }
 
@@ -131,8 +131,8 @@
   $attrs = array();
   $attrs['cyrus-quotawarn'] = trim( $_REQUEST['quotawarn'] );
   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);
+	$errors[] = sprintf(_("LDAP Error: failed to modify kolab configuration object: %s"),
+						ldap_error($ldap->connection));
   }
 }
 
@@ -140,8 +140,8 @@
   $attrs = array();
   $attrs['apache-allow-unauthenticated-fb'] = postvalue( 'httpallowunauthfb' );
   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);
+	$errors[] = sprintf(_("LDAP Error: failed to modify kolab configuration object: %s"),
+						ldap_error($ldap->connection));
   }
 }
 
@@ -149,8 +149,8 @@
   $attrs = array();
   $attrs['kolabFreeBusyPast'] = trim( $_REQUEST['freebusypast'] );
   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);
+	$errors[] = sprintf(_("LDAP Error: failed to modify kolab configuration object: %s"),
+						ldap_error($ldap->connection));
   }
 }
 
@@ -159,8 +159,8 @@
   $attrs['postfix-mynetworks'] = preg_split( "/[\s,]+/", trim( $_REQUEST['postfixmynetworks'] ) );
   //if( $attrs['postfix-mynetworks'] == '' ) $attrs['postfix-mynetworks'] = array();
   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);
+	$errors[] = sprintf(_("LDAP Error: failed to modify kolab configuration object: %s"),
+						ldap_error($ldap->connection));
   }
 }
 
@@ -168,8 +168,8 @@
   $attrs = array();
   $attrs['postfix-allow-unauthenticated'] = postvalue( 'postfixallowunauth' );
   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);
+	$errors[] = sprintf(_("LDAP Error: failed to modify kolab configuration object: %s"),
+						ldap_error($ldap->connection));
   }
 }
 
@@ -179,8 +179,8 @@
 				 'kolabfilter-allow-sender-header'       => postvalue( 'kolabfilterallowsender' ),
 				 'kolabfilter-reject-forged-from-header' => $_REQUEST['kolabfilterrejectforgedfrom']=='TRUE'?'TRUE':'FALSE' );
   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);
+	$errors[] = sprintf(_("LDAP Error: failed to modify kolab configuration object: %s"),
+						ldap_error($ldap->connection));
   }
  }
 
@@ -193,8 +193,8 @@
   $attrs['postfix-relayhost'] = $host_val;
   $attrs['postfix-relayport'] = $port_val;
   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);
+	$errors[] = sprintf(_("LDAP Error: failed to modify kolab configuration object: %s"),
+						ldap_error($ldap->connection));
   }
 }
 
@@ -211,14 +211,14 @@
   $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);
+	$errors[] = sprintf(_("LDAP Error: failed to modify kolab configuration object: %s"),
+						ldap_error($ldap->connection));
   }
   $domain_obj_dn = 'cn='.$ldap->escape(trim($_REQUEST['adestination'])).',cn=domains,cn=internal,'.$_SESSION['base_dn'];
   debug("Trying to delete $domain_obj_dn");
   if( !$errors && $ldap->read($domain_obj_dn) && !ldap_delete($ldap->connection, $domain_obj_dn ) ) {
-	$errors[] = _("LDAP Error: Failed to delete domain object $domain_obj_dn: ")
-	  .ldap_error($ldap->connection);	
+	$errors[] = sprintf(_("LDAP Error: Failed to delete domain object %s: %s"), $domain_obj_dn,
+						ldap_error($ldap->connection));
   }
 }
 // Add domain
@@ -229,7 +229,8 @@
 	$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);
+	  $errors[] = sprintf(_("LDAP Error: failed to modify kolab configuration object: %s"),
+						  ldap_error($ldap->connection));
 	}
   }
 }
@@ -245,8 +246,8 @@
   $attrs = array();
   $attrs['kolabhost'] = $kolabhost;
   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);
+	$errors[] = sprintf(_("LDAP Error: failed to modify kolab configuration object: %s"),
+						ldap_error($ldap->connection));
   }
 }
 
@@ -258,7 +259,8 @@
 	$attrs = array();
 	$attrs['kolabhost'] = $kolabhost;
 	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);
+	  $errors[] = sprintf(_("LDAP Error: failed to modify kolab configuration object: %s"),
+						  ldap_error($ldap->connection));
 	}
   }
 }





More information about the commits mailing list