steffen: server/kolab-webadmin/kolab-webadmin/www/admin/addressbook addr.php, 1.13, 1.14
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/addressbook
In directory doto:/tmp/cvs-serv29305/kolab-webadmin/www/admin/addressbook
Modified Files:
addr.php
Log Message:
Fix for issue886 (i18n problem)
Index: addr.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/addressbook/addr.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- addr.php 29 Aug 2005 21:28:28 -0000 1.13
+++ addr.php 13 Oct 2005 01:50:01 -0000 1.14
@@ -139,7 +139,7 @@
if( $_REQUEST['dn'] ) {
$dn = $_REQUEST['dn'];
} else {
- array_push($errors, _("Error: DN required for $action operation") );
+ array_push($errors, sprintf(_("Error: DN required for %s operation"), $action ));
}
}
@@ -193,20 +193,22 @@
($oldattrs=ldap_get_attributes($ldap->connection,$entry))) {
foreach( $ldap_object as $k => $v ) if( $v == array() ) unset( $ldap_object[$k] );
if (!ldap_add($ldap->connection,$newdn, $ldap_object) || !ldap_delete($ldap->connection,$dn)) {
- array_push($errors, _("LDAP Error: could not rename ").$dn.
- " to ".$newdn." ".ldap_error($ldap->connection));
+ array_push($errors, sprintf(_("LDAP Error: could not rename %s to %s: %s"), $dn,
+ $newdn, ldap_error($ldap->connection)));
} else {
- $messages[] = _("$newdn successfully updated");
+ $messages[] = sprintf( _("%s successfully updated"), $newdn);
}
$dn = $newdn;
} else {
- array_push($errors,_("LDAP Error: could not read ").$dn." ".ldap_error($ldap->connection));
+ array_push($errors,sprintf(_("LDAP Error: could not read %s: %s"), $dn,
+ ldap_error($ldap->connection)));
}
} else {
if (!ldap_modify($ldap->connection, $dn, $ldap_object)) {
- array_push($errors, _("LDAP Error: could not modify object ").$dn.": ".ldap_error($ldap->connection));
+ array_push($errors, sprintf(_("LDAP Error: could not modify object %s: %s"),$dn,
+ ldap_error($ldap->connection)));
} else {
- $messages[] = _("$dn successfully updated");
+ $messages[] = sprintf(_("%s successfully updated"), $dn);
}
}
}
@@ -215,9 +217,10 @@
$dn = "cn=".$ldap_object['cn'].",".$addressbook_root;
foreach( $ldap_object as $k => $v ) if( $v == array() ) unset( $ldap_object[$k] );
if ($dn && !ldap_add($ldap->connection, $dn, $ldap_object)) {
- array_push($errors, _("LDAP Error: could not add object ").$dn.": ".ldap_error($ldap->connection));
+ array_push($errors, sprintf(_("LDAP Error: could not add object %s: %s"), $dn,
+ ldap_error($ldap->connection)));
} else {
- $messages[] = _("$dn successfully added");
+ $messages[] = sprintf(_("%s successfully added"), $dn);
}
}
if ($errors) {
@@ -250,7 +253,7 @@
$heading = _('Modify External Address');
$content = $form->outputForm();
} else {
- array_push($errors, _("Error: Multiple results returned for DN $dn") );
+ array_push($errors, sprintf(_("Error: Multiple results returned for DN %s"), $dn) );
}
}
break;
@@ -273,17 +276,18 @@
$heading = _('Delete External Address');
$content = $form->outputForm();
} else {
- array_push($errors, _("Error: Multiple results returned for DN $dn") );
+ array_push($errors, sprintf(_("Error: Multiple results returned for DN %s"), $dn) );
}
}
break;
case 'kill':
if (!$errors) {
if (!($ldap->deleteObject($dn))) {
- array_push($errors, _("LDAP Error: could not delete ").$dn.": ".ldap_error($ldap->connection));
+ array_push($errors, sprintf(_("LDAP Error: could not delete %s: %s"),$dn,
+ ldap_error($ldap->connection)));
} else {
$heading = _('Entry Deleted');
- $messages[] = _("Address book entry with DN $dn was deleted");
+ $messages[] = sprintf( _("Address book entry with DN %s was deleted"), $dn);
$contenttemplate = 'addrdeleted.tpl';
}
}
More information about the commits
mailing list