From: cajus Date: Fri, 24 Jun 2005 13:43:00 +0000 (+0000) Subject: Fixed filtering for mail dialog X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=385c34aae7951f24c79bdd4d26812677a1f38ab6;p=gosa.git Fixed filtering for mail dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@855 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/functions.inc b/include/functions.inc index ed1364b98..f586a0c66 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -178,7 +178,7 @@ function get_template_path($filename= '', $plugin= FALSE, $path= "") { global $config, $BASE_DIR; - if (!isset($config->data['MAIN']['THEME'])){ + if (!@isset($config->data['MAIN']['THEME'])){ $theme= 'default'; } else { $theme= $config->data['MAIN']['THEME']; diff --git a/include/php_setup.inc b/include/php_setup.inc index 08f75dfc1..c6769741c 100644 --- a/include/php_setup.inc +++ b/include/php_setup.inc @@ -96,8 +96,10 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline) $type= "-"; } $args= ""; - foreach ($ct['args'] as $arg){ - $args.= htmlentities("\"$arg\", "); + if (isset($ct['args'])){ + foreach ($ct['args'] as $arg){ + $args.= htmlentities("\"$arg\", "); + } } $args= preg_replace("/, $/", "", $args); if ($args == ""){ diff --git a/plugins/admin/groups/class_groupMail.inc b/plugins/admin/groups/class_groupMail.inc index fa55b9185..9829102ba 100644 --- a/plugins/admin/groups/class_groupMail.inc +++ b/plugins/admin/groups/class_groupMail.inc @@ -613,7 +613,7 @@ class mailgroup extends plugin $message[]= _("Please enter a valid email addres in 'Primary address' field."); } $ldap->cd($this->config->current['BASE']); - $ldap->search ("(&(|(mail=".$this->mail.")(gosaMailAlternateAddress=". + $ldap->search ("(&(!(objectClass=gosaUserTemplate))(|(mail=".$this->mail.")(gosaMailAlternateAddress=". $this->mail."))(!(uid=".$this->cn."))(!(cn=".$this->cn.")))"); if ($ldap->count() != 0){ $message[]= _("The primary address you've entered is already in use."); diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index 1ea0bd98f..da7a772b8 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -689,7 +689,7 @@ class mailAccount extends plugin } } $ldap->cd($this->config->current['BASE']); - $ldap->search ("(&(objectClass=gosaMailAccount)(!(objectClass=gosaUserTemplate))(|(mail=".$this->mail.")(gosaMailAlternateAddress=". + $ldap->search ("(&(!(objectClass=gosaUserTemplate))(|(mail=".$this->mail.")(gosaMailAlternateAddress=". $this->mail."))(!(uid=".$this->uid."))(!(cn=".$this->uid.")))", array("uid")); if ($ldap->count() != 0){ $message[]= _("The primary address you've entered is already in use.");