Code

Fixed filtering for mail dialog
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 24 Jun 2005 13:43:00 +0000 (13:43 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 24 Jun 2005 13:43:00 +0000 (13:43 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@855 594d385d-05f5-0310-b6e9-bd551577e9d8

include/functions.inc
include/php_setup.inc
plugins/admin/groups/class_groupMail.inc
plugins/personal/mail/class_mailAccount.inc

index ed1364b9816bc06e46aef2bc4d3153925d42c1ed..f586a0c66fe067134896b646ed45ddf23feb5009 100644 (file)
@@ -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'];
index 08f75dfc1360279ca3ebdbc03822d41e030631f7..c6769741cf2e655bdff4ada2bd1594980f1d9443 100644 (file)
@@ -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 == ""){
index fa55b9185946e3467b57a65e5835c9bc59185690..9829102ba6f147165f59fe29579a555bbcfdf1c6 100644 (file)
@@ -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.");
index 1ea0bd98f46ea56ee5e455b040432d56d924a276..da7a772b802ac03b38aef7788a2fdb68180afa72 100644 (file)
@@ -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.");