Code

Fixed errors that appear to happen when specifiying a non existant DN and
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 May 2005 05:18:20 +0000 (05:18 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 May 2005 05:18:20 +0000 (05:18 +0000)
load this via class_plugin.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@504 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_plugin.inc
include/functions.inc
plugins/admin/systems/class_servKolab.inc

index f6b453acb18953eb946d22d2439de271059bcbc1..2a50b4737782c01792e2158440346ecbfde2f531 100644 (file)
@@ -151,7 +151,7 @@ class plugin
         if (preg_match('/top/i', $obj)){
           continue;
         }
-        if (!in_array_ics ($obj, $this->attrs['objectClass'])){
+        if (!isset($this->attrs['objectClass']) || !in_array_ics ($obj, $this->attrs['objectClass'])){
           $found= FALSE;
           break;
         }
index 62ee0c1dff12f4884c997ae548348a99589a303a..44bf12927aa04ded1cffe45c0d0deaba4e1c3ce3 100644 (file)
@@ -1445,6 +1445,10 @@ function to_byte($value) {
 
 function in_array_ics($value, $items)
 {
+  if (!is_array($items)){
+    return (FALSE);
+  }
+  
   foreach ($items as $item){
     if (strtolower($item) == strtolower($value)) {
       return (TRUE);
index 8c7f5b3365104c279bb4019e69347f6103bd24b5..edf3d65fd601a0fe37c60893a97744d377feb951 100644 (file)
@@ -6,24 +6,24 @@ class servkolab extends plugin {
   var $cli_description = "Some longer text\nfor help";
   var $cli_parameters = array("eins"=>"Eins ist toll", "zwei"=>"Zwei ist noch besser");
 
-  var $postfix_mydomain                 = "\$domain";//<<<<<<<<<<<<<
-  var $postfix_mydestination            = "\$domain";//<<<<<<<<<<<<<
-  var $postfix_mynetworks               = "127.0.0.1/8";//ok
-  var $postfix_enable_virus_scan        = "TRUE";//ok
+  var $postfix_mydomain                 = "\$domain";
+  var $postfix_mydestination            = "\$domain";
+  var $postfix_mynetworks               = "127.0.0.1/8";
+  var $postfix_enable_virus_scan        = "TRUE";
   var $postfix_relayhost                = "";
   var $postfix_mxrelayenabled           =  true;
   var $postfix_allow_unauthenticated     = "false";
-  var $cyrus_quotawarn                  = "80";//ok
-  var $kolabFreeBusyFuture              = "1";// ok 
-  var $cyrus_admins                     = "TRUE";//<<<<<<<<<<<<<<<<
-  var $cyrus_imap                       = "TRUE";//ok
-  var $cyrus_pop3                       = "TRUE";//ok
-  var $cyrus_imaps                      = "TRUE";//ok
-  var $cyrus_pop3s                      = "TRUE";//ok
-  var $cyrus_sieve                      = "TRUE";//ok
-  var $apache_allow_unauthenticated_fb  = "TRUE";//<<<<<<<<<<<<
-  var $proftpd_ftp                      = "TRUE";//pk
-  var $apache_http                      = "TRUE";//ok
+  var $cyrus_quotawarn                  = "80";
+  var $kolabFreeBusyFuture              = "1";
+  var $cyrus_admins                     = "TRUE";
+  var $cyrus_imap                       = "TRUE";
+  var $cyrus_pop3                       = "TRUE";
+  var $cyrus_imaps                      = "TRUE";
+  var $cyrus_pop3s                      = "TRUE";
+  var $cyrus_sieve                      = "TRUE";
+  var $apache_allow_unauthenticated_fb  = "TRUE";
+  var $proftpd_ftp                      = "TRUE";
+  var $apache_http                      = "TRUE";
   var $kolabHost                        = array();
   var $added                            = false; 
   var $remove                           = false;
@@ -57,7 +57,7 @@ class servkolab extends plugin {
     }
   
     /* Is this Server a member of the Kolab extension or not ?*/ 
-    if(in_array($this->hostname,$this->attrs['kolabHost'])) {
+    if(isset($this->attrs['kolabHost']) && in_array($this->hostname, $this->attrs['kolabHost'])) {
       $this->is_account=true;
     }    else    {   
       $this->is_account=false;