Code

Added property class to get_cfg_requests
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 May 2010 10:04:45 +0000 (10:04 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 May 2010 10:04:45 +0000 (10:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18131 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc
gosa-plugins/mail/personal/mail/class_mail-methods.inc
gosa-plugins/mail/personal/mail/class_mailAccount.inc

index a1b27a910b2f1186c813147480b8ee52c136da52..e5cb042379842ef7bcb923b33e40a52d68476047 100644 (file)
@@ -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,
           "<b>IMAP: Setting imap connect timeout to</b> (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);
index 5c96f674b88838c5af5a9101b2efb08be3b3c9f8..cf49960065e8b038328e3c387c3c1c1c828c94bd 100644 (file)
@@ -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__, "","<b>MAIL:</b> cyrusUseSlashes: <b>Enabled</b>");
     }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__, "<i>".$tmp."</i>",
           "<b>MAIL:</b> 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__, "<i>".$tmp."</i>",
           "<b>MAIL:</b> 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__, "<i>".$tmp."</i>",
           "<b>MAIL:</b> 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__,"", "<b>MAIL:</b> Selected mailMethod: <b>".$cls."</b>");
@@ -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){
index 06a7212a80ff52e32d910966edd357f9e9152cd0..6783e1a3aeeb16fa5416dc9679b7d1161ac33bc4 100644 (file)
@@ -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)){