steffen: server/kolab-webadmin/kolab-webadmin/php/admin/include ldap.class.php, 1.13, 1.14
cvs at intevation.de
cvs at intevation.de
Fri Aug 13 03:04:18 CEST 2004
Author: steffen
Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/php/admin/include
In directory doto:/tmp/cvs-serv17649/kolab-webadmin/php/admin/include
Modified Files:
ldap.class.php
Log Message:
*sigh* mixed case ldap attribute names are broken in php -- ldap_get_entries() returns them in all lowercase and ldap_get_attributes() returns them in mixed case!
Index: ldap.class.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/php/admin/include/ldap.class.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- ldap.class.php 12 Aug 2004 10:55:39 -0000 1.13
+++ ldap.class.php 13 Aug 2004 01:04:16 -0000 1.14
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright (c) 2004 Klarälvdalens Datakonsult AB
+ * Copyright (c) 2004 KlarÃ��¤lvdalens Datakonsult AB
*
* Written by Steffen Hansen <steffen at klaralvdalens-datakonsult.se>
*
@@ -156,7 +156,7 @@
function dnForUid( $uid ) {
if( $this->search( $_SESSION['base_dn'],
- '(&(objectclass=kolabinetorgperson)(uid='.$this->escape($uid).'))' ) ) {
+ '(&(objectclass=kolabInetOrgPerson)(uid='.$this->escape($uid).'))' ) ) {
$entry = $this->firstEntry();
if( $entry ) {
return ldap_get_dn( $this->connection, $entry );
@@ -186,7 +186,7 @@
function dnForMail( $mail ) {
if( $this->search( $_SESSION['base_dn'],
- '(&(objectclass=kolabinetorgperson)(mail='.$this->escape($mail).'))' ) ) {
+ '(&(objectclass=kolabInetOrgPerson)(mail='.$this->escape($mail).'))' ) ) {
$entry = $this->firstEntry();
if( $entry ) {
return ldap_get_dn( $this->connection, $entry );
@@ -237,7 +237,7 @@
global $errors;
$privmembers = array();
$mybase = 'cn='.$group.','.$base;
- $filter = '(objectClass=kolabgroupofnames)';
+ $filter = '(objectClass=kolabGroupOfNames)';
$res = ldap_search( $this->connection, $mybase, $filter, array('member') );
if( !$res ) {
array_push($errors, _("LDAP Error: Can't read maintainers group: ")
@@ -283,7 +283,7 @@
// Now count dist. lists
$cn = substr( $mail, 0, strpos( $mail, '@' ) );
- $filter = '(&(objectClass=kolabgroupofnames)(cn='.$this->escape($cn).'))';
+ $filter = '(&(objectClass=kolabGroupOfNames)(cn='.$this->escape($cn).'))';
$res = $this->search( $base, $filter, array( 'dn' ) );
$entries = ldap_get_entries( $this->connection, $res );
@@ -314,8 +314,8 @@
$kolab_obj = $this->read( 'k=kolab,'.$_SESSION['base_dn'] );
if( !$kolab_obj ) return false;
$delete_template = array();
- $delete_template['kolabdeleteflag'] = $kolab_obj['kolabhost'];
- unset($delete_template['kolabdeleteflag']['count']);
+ $delete_template['kolabDeleteflag'] = $kolab_obj['kolabHost'];
+ unset($delete_template['kolabDeleteflag']['count']);
if( !ldap_modify($this->connection,$dn,$delete_template) ) {
return false;
}
More information about the commits
mailing list