From 1430b94b5af3fcb6e69e0427f4af6ef565604de8 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 19 Sep 2007 15:27:07 +0000 Subject: [PATCH] Fixed NULL occurencies git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7336 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/mail/class_mailAccount.inc | 5 +++-- plugins/personal/posix/class_posixAccount.inc | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index c66caf4bb..9d3e07510 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -61,6 +61,8 @@ class mailAccount extends plugin 'dn' from LDAP */ function mailAccount (&$config, $dn= NULL) { + global $class_mapping; + /* Load bases attributes */ plugin::plugin($config, $dn); @@ -79,8 +81,7 @@ class mailAccount extends plugin /* Set mailMethod to the one defined in gosa.conf */ if (isset($this->config->current['MAILMETHOD'])){ $method= $this->config->current['MAILMETHOD']; - __autoload("mailMethod$method"); - if (class_exists("mailMethod$method")){ + if (isset($class_mapping["mailMethod$method"])){ $this->method= "mailMethod$method"; } else { print_red(sprintf(_("There is no mail method '%s' specified in your gosa.conf available."), $method)); diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index cbdfbee15..427b4a433 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -97,7 +97,7 @@ class posixAccount extends plugin $ldap= $this->config->get_ldap_link(); - if ($dn != NULL){ + if ($dn !== NULL){ /* Correct is_account. shadowAccount is not required. */ if (isset($this->attrs['objectClass']) && @@ -249,7 +249,7 @@ class posixAccount extends plugin } /* Do we represent a valid posixAccount? */ - if (!$this->is_account && $this->parent == NULL ){ + if (!$this->is_account && $this->parent === NULL ){ $display= "\"\" ". _("This account has no unix extensions.").""; $display.= back_to_main(); @@ -258,7 +258,7 @@ class posixAccount extends plugin /* Show tab dialog headers */ - if ($this->parent != NULL){ + if ($this->parent !== NULL){ if ($this->is_account){ if (isset($this->parent->by_object['sambaAccount'])){ $obj= $this->parent->by_object['sambaAccount']; @@ -807,7 +807,7 @@ class posixAccount extends plugin } /* Fill gecos */ - if (isset($this->parent) && $this->parent != NULL){ + if (isset($this->parent) && $this->parent !== NULL){ $this->gecos= rewrite($this->parent->by_object['user']->cn); if (!preg_match('/^[a-z0-9 -]+$/i', $this->gecos)){ $this->gecos= ""; -- 2.30.2