From d14a406d5c7cd14bcf4af0f6c55b42a00a24c176 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 5 May 2010 10:04:45 +0000 Subject: [PATCH] Added property class to get_cfg_requests git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18131 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/mail/class_mail-methods-cyrus.inc | 6 +++--- .../mail/personal/mail/class_mail-methods.inc | 18 +++++++++--------- .../mail/personal/mail/class_mailAccount.inc | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc index a1b27a910..e5cb04237 100644 --- a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc +++ b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc @@ -57,7 +57,7 @@ class mailMethodCyrus extends mailMethod{ /* Setting connect timeout to 10 seconds, else the GOsa UI may freeze for 60 seconds. (PHP default is 'default_socket_timeout = 60') */ - $timeout = $this->config->get_cfg_value("imapTimeout",10); + $timeout = $this->config->get_cfg_value("core","imapTimeout",10); @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__,$timeout, "IMAP: Setting imap connect timeout to (seconds)"); imap_timeout(1, $timeout); @@ -253,7 +253,7 @@ class mailMethodCyrus extends mailMethod{ } /* Autocreate configured default folders */ - $folders= $this->config->get_cfg_value("cyrusAutocreateFolders", null); + $folders= $this->config->get_cfg_value("core","cyrusAutocreateFolders", null); if ($folders) { $foldersToCreate= explode(",", $folders); $cyrus_delim= $this->cyrusUseSlashes?"/":"."; @@ -289,7 +289,7 @@ class mailMethodCyrus extends mailMethod{ $cfg= $this->ServerList[$this->MailServer]; @imap_setacl ($this->imap_handle, $this->account_id, $cfg["admin"], "lrswipcda"); - if ($this->config->get_cfg_value("cyrusDeleteMailbox", "true") == "true"){ + if ($this->config->get_cfg_value("core","cyrusDeleteMailbox", "true") == "true"){ if (!imap_deletemailbox($this->imap_handle, $cfg["connect"].$this->account_id)){ $this->error = imap_last_error(); return (FALSE); diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods.inc b/gosa-plugins/mail/personal/mail/class_mail-methods.inc index 5c96f674b..cf4996006 100644 --- a/gosa-plugins/mail/personal/mail/class_mail-methods.inc +++ b/gosa-plugins/mail/personal/mail/class_mail-methods.inc @@ -121,7 +121,7 @@ class mailMethod{ { /* Get config value for cyrusUseSlashes */ - if ($this->config->get_cfg_value("cyrusUseSlashes") == "true"){ + if ($this->config->get_cfg_value("core","cyrusUseSlashes") == "true"){ $this->cyrusUseSlashes = TRUE; @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, "","MAIL: cyrusUseSlashes: Enabled"); }else{ @@ -131,8 +131,8 @@ class mailMethod{ /* Check if the mail account identification attribute is overridden in the configuration file */ - if($this->config->get_cfg_value("mailAttribute","mail") != ""){ - $new_uattrib= strtolower($this->config->get_cfg_value("mailAttribute")); + if($this->config->get_cfg_value("core","mailAttribute","mail") != ""){ + $new_uattrib= strtolower($this->config->get_cfg_value("core","mailAttribute")); if(in_array($new_uattrib,array("mail","uid"))){ $this->uattrib = $new_uattrib; }else{ @@ -150,19 +150,19 @@ class mailMethod{ /* Check if we have an individual user/folder creation syntax */ - $tmp = $this->config->get_cfg_value("mailUserCreation"); + $tmp = $this->config->get_cfg_value("core","mailUserCreation"); if(!empty($tmp)){ @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, "".$tmp."", "MAIL: User creation set to"); $this->user_id = $tmp; } - $tmp = $this->config->get_cfg_value("mailFolderCreation"); + $tmp = $this->config->get_cfg_value("core","mailFolderCreation"); if(!empty($tmp)){ @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, "".$tmp."", "MAIL: Shared folder creation set to"); $this->share_id = $tmp; } - $tmp = $this->config->get_cfg_value("gosaSharedPrefix"); + $tmp = $this->config->get_cfg_value("core","gosaSharedPrefix"); if(!empty($tmp)){ @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, "".$tmp."", "MAIL: Shared folder prefix set to"); @@ -469,8 +469,8 @@ class mailMethod{ public function get_method() { $methods = mailMethod::get_methods(); - if ($this->config->get_cfg_value("mailmethod") != ""){ - $method= $this->config->get_cfg_value("mailmethod"); + if ($this->config->get_cfg_value("core","mailmethod") != ""){ + $method= $this->config->get_cfg_value("core","mailmethod"); $cls = get_correct_class_name("mailMethod$method"); if(isset($methods[$cls])){ @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__,"", "MAIL: Selected mailMethod: ".$cls.""); @@ -786,7 +786,7 @@ class mailMethod{ static public function get_current_method($config) { global $class_mapping; - $method= $config->get_cfg_value("mailmethod"); + $method= $config->get_cfg_value("core","mailmethod"); $cls = get_correct_class_name("mailMethod$method"); foreach($class_mapping as $class => $path){ if($class == $cls){ diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc index 06a7212a8..6783e1a3a 100644 --- a/gosa-plugins/mail/personal/mail/class_mailAccount.inc +++ b/gosa-plugins/mail/personal/mail/class_mailAccount.inc @@ -604,8 +604,8 @@ class mailAccount extends plugin function get_vacation_templates() { $vct = array(); - if ($this->config->get_cfg_value("vacationTemplateDirectory") != ""){ - $dir= $this->config->get_cfg_value("vacationTemplateDirectory"); + if ($this->config->get_cfg_value("core","vacationTemplateDirectory") != ""){ + $dir= $this->config->get_cfg_value("core","vacationTemplateDirectory"); if (is_dir($dir) && is_readable($dir)){ $dh = opendir($dir); while($file = readdir($dh)){ -- 2.30.2