From: cajus Date: Tue, 31 May 2005 05:18:20 +0000 (+0000) Subject: Fixed errors that appear to happen when specifiying a non existant DN and X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3ef12317d5ac369926f0e03c83f2bf305db28540;p=gosa.git Fixed errors that appear to happen when specifiying a non existant DN and load this via class_plugin. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@504 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_plugin.inc b/include/class_plugin.inc index f6b453acb..2a50b4737 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -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; } diff --git a/include/functions.inc b/include/functions.inc index 62ee0c1df..44bf12927 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -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); diff --git a/plugins/admin/systems/class_servKolab.inc b/plugins/admin/systems/class_servKolab.inc index 8c7f5b336..edf3d65fd 100644 --- a/plugins/admin/systems/class_servKolab.inc +++ b/plugins/admin/systems/class_servKolab.inc @@ -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;