steffen: server/kolab-webadmin/kolab-webadmin/www/admin/domainmaintainer domainmaintainer.php, 1.1, 1.2
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/domainmaintainer
In directory doto:/tmp/cvs-serv29305/kolab-webadmin/www/admin/domainmaintainer
Modified Files:
domainmaintainer.php
Log Message:
Fix for issue886 (i18n problem)
Index: domainmaintainer.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/domainmaintainer/domainmaintainer.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- domainmaintainer.php 5 Jul 2005 10:31:51 -0000 1.1
+++ domainmaintainer.php 13 Oct 2005 01:50:01 -0000 1.2
@@ -156,7 +156,7 @@
if( $dn ) {
$ldap_object = $ldap->read( $dn );
if( !$ldap_object ) {
- array_push($errors, _("LDAP Error: No such dn: $dn: ").ldap_error($ldap->connection));
+ array_push($errors, sprintf( _("LDAP Error: No such dn: %s: %s"), $dn, ldap_error($ldap->connection)));
}
}
@@ -203,27 +203,27 @@
if( empty($ldap_object['userPassword']) )
$ldap_object['userPassword'] = $oldattrs['userPassword'][0];
if (!ldap_add($ldap->connection,$newdn, $ldap_object) )
- array_push($errors, _("LDAP Error: could not rename $dn to $newdn: ")
- .ldap_error($ldap->connection));
+ array_push($errors, sprintf( _("LDAP Error: could not rename %1\$s to %2\$s: %3\$s"), $dn, $newdn,
+ ldap_error($ldap->connection)));
if( !$errors ) {
if( !ldap_delete($ldap->connection,$dn)) {
- array_push($errors, _("LDAP Error: could not remove old entry $dn: ")
- .ldap_error($ldap->connection));
+ array_push($errors, sprintf( _("LDAP Error: could not remove old entry %s: %s"), $dn,
+ ldap_error($ldap->connection)));
}
}
if( !$errors ) {
// Update maintainer group
$groupdn = 'cn=domain-maintainer,cn=internal,'.$domain_dn;
if( !ldap_mod_add( $ldap->connection,
- $groupdn,
- array( 'member' => $newdn ) ) ) {
- $errors[] = _("LDAP Error: Could not add new group entry $newdn: ")
- .ldap_error($ldap->connection);
+ $groupdn,
+ array( 'member' => $newdn ) ) ) {
+ $errors[] = sprintf( _("LDAP Error: Could not add new group entry %s: %s"), $newdn,
+ ldap_error($ldap->connection));
}
if( !$errors && !ldap_mod_del($ldap->connection,$groupdn,
array( 'member' => $dn ) ) ) {
- $errors[] = _("LDAP Error: Could not remove old group entry $dn: ")
- .ldap_error($ldap->connection);
+ $errors[] = sprintf( _("LDAP Error: Could not remove old group entry %s: %s"), $dn,
+ ldap_error($ldap->connection));
}
if( !$errors ) {
$domains = $ldap->domainsForMaintainerDn($dn);
@@ -232,12 +232,12 @@
}
}
$dn = $newdn;
- } else array_push($errors,_("LDAP Error: could not read $dn ")
- .ldap_error($ldap->connection));
+ } else 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)));
}
if( !$errors ) {
$domains = $ldap->domainsForMaintainerDn($dn);
@@ -257,11 +257,12 @@
$dn = "cn=".$ldap_object['cn'].",cn=internal,".$domain_dn;
debug("Calling ldap_add with dn=$dn");
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)));
if( $dn && !ldap_mod_add($ldap->connection, 'cn=domain-maintainer,cn=internal,'.$domain_dn,
array( 'member' => $dn ) ) ) {
- array_push($errors, _("LDAP Error: could not add object $dn to maintainer group: ")
- .ldap_error($ldap->connection));
+ array_push($errors, sprintf(_("LDAP Error: could not add object %s to maintainer group: %s"), $dn,
+ ldap_error($ldap->connection)));
}
if( $dn && !$errors ) {
$ldap->addToDomainGroups( $dn, $_POST['domains'] );
@@ -309,20 +310,20 @@
$content = $form->outputForm();
break;
case 'kill':
- if (!$dn) array_push($errors, _("Error: need dn for delete operation"));
+ if (!$dn) array_push($errors, _("Error: need DN for delete operation"));
elseif ($auth->group() != "maintainer" && $auth->group() != "admin")
array_push($errors, _("Error: you need administrative permissions to delete domain maintainers"));
if (!$errors) {
if(!ldap_mod_del($ldap->connection, 'cn=domain-maintainer,cn=internal,'.domain_dn(), array('member' => $dn ) )) {
- $errors[] = _("LDAP Error: Could not remove $dn from maintainer group: ")
- .ldap_error($ldap->connection);
+ $errors[] = sprintf( _("LDAP Error: Could not remove %s from maintainer group: %s"), $dn,
+ ldap_error($ldap->connection));
}
if( !$errors ) {
$delete_template['kolabdeleteflag'] = 'TRUE';
if( !$ldap->deleteObject($dn)) {
- array_push($errors, _("LDAP Error: could not mark $dn for deletion ")
- .ldap_error($ldap->connection));
+ array_push($errors, sprintf( _("LDAP Error: could not mark %s for deletion: %s"), $dn,
+ ldap_error($ldap->connection)));
}
}
}
More information about the commits
mailing list