summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2007-07-13 06:51:29 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2007-07-13 06:51:29 (GMT)
commite4740036d322f6af54ecb64efa4bc76f70e744ad (patch)
tree7f84686caaa515549741a475f7dfae2f1c03ff72
parent553fe9ad5d868902b1bfd5090f892707fc26ee56 (diff)
downloadkolab-webadmin-e4740036d322f6af54ecb64efa4bc76f70e744ad.tar.gz
Fixed possible notices.
-rw-r--r--ChangeLog6
-rw-r--r--php/admin/include/ldap.class.php8
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ef622d2..4564a67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-13 Gunnar Wrobel <p@rdus.de>
+
+ * php/admin/include/ldap.class.php:
+
+ fixed possible PHP notices.
+
2007-07-12 Gunnar Wrobel <p@rdus.de>
* www/admin/domainmaintainer/domainmaintainer.php.in:
diff --git a/php/admin/include/ldap.class.php b/php/admin/include/ldap.class.php
index 748fb6f..1ab31a2 100644
--- a/php/admin/include/ldap.class.php
+++ b/php/admin/include/ldap.class.php
@@ -117,7 +117,7 @@ class KolabLDAP {
$dn = $_SESSION['php_dn'];
$pw = $_SESSION['php_pw'];
}
- $this->is_bound = ldap_bind( $this->connection, $dn, $pw );
+ $this->is_bound = @ldap_bind( $this->connection, $dn, $pw );
if( $this->is_bound ) {
$this->bind_dn = $dn;
} else {
@@ -415,6 +415,9 @@ class KolabLDAP {
}
function addToDomainGroups( $member, $domains ) {
+ if (empty($domains)) {
+ return true;
+ }
foreach( $domains as $domain ) {
$domgrpdn = 'cn='.$this->dn_escape($domain).',cn=domains,cn=internal,'.$_SESSION['base_dn'];
$dom_obj = $this->read( $domgrpdn );
@@ -441,6 +444,9 @@ class KolabLDAP {
}
function removeFromDomainGroups( $member, $domains ) {
+ if (empty($domains)) {
+ return true;
+ }
foreach( $domains as $domain ) {
$domgrpdn = 'cn='.$this->dn_escape($domain).',cn=domains,cn=internal,'.$_SESSION['base_dn'];
$dom_obj = $this->read( $domgrpdn );