Code

Removed duplicated code
[gosa.git] / gosa-plugins / mail / personal / mail / class_mail-methods.inc
index 7490d8c3fc2fdefcbc142d8f76f931d10554bdbc..7b4abf37473245aac27d15e95a0cd29205ee8815 100644 (file)
@@ -44,7 +44,6 @@ class mailMethod{
   protected $parent             = NULL;   
   protected $MailServer         = "";
 
-
   protected $acl_map = array(
       "lrsw"     => "read",
       "lrswp"    => "post",
@@ -677,6 +676,24 @@ class mailMethod{
   {
     return(TRUE);
   }
+
+
+  /*! \brief  Returns the configured mailMethod
+      @return String  the configured mail method or ""
+   */
+  static public function get_current_method($config)
+  {
+    global $class_mapping;
+    $method= $config->get_cfg_value("mailmethod");
+    $cls = get_correct_class_name("mailMethod$method");
+    foreach($class_mapping as $class => $path){
+      if($class == $cls){
+        return($class);
+      }
+    }
+    return("");
+  }
+
 }