Code

Readded my changes - Testing now
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Dec 2008 13:05:19 +0000 (13:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Dec 2008 13:05:19 +0000 (13:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13283 594d385d-05f5-0310-b6e9-bd551577e9d8

17 files changed:
gosa-core/html/main.php
gosa-core/include/functions.inc
gosa-core/plugins/admin/acl/class_aclManagement.inc
gosa-core/plugins/admin/acl/main.inc
gosa-core/plugins/admin/departments/class_departmentManagement.inc
gosa-core/plugins/admin/departments/main.inc
gosa-core/plugins/admin/groups/class_groupManagement.inc
gosa-core/plugins/admin/groups/main.inc
gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc
gosa-core/plugins/admin/ogroups/main.inc
gosa-core/plugins/admin/users/class_userManagement.inc
gosa-core/plugins/admin/users/main.inc
gosa-core/plugins/personal/generic/main.inc
gosa-core/plugins/personal/password/main.inc
gosa-core/plugins/personal/posix/main.inc
gosa-core/setup/class_setupStep_Config2.inc
gosa-core/setup/setup_config2.tpl

index 6c2a5e7e41fe37c9d0f02454a6fa672d3ac59dbf..a42fbe18e98c6ded2a3c43cb2d71091bddbdada3 100644 (file)
@@ -196,13 +196,17 @@ if (isset($_GET['plug']) && $plist->plugin_access_allowed($_GET['plug'])){
 }
 
 /* Check if we need to delete a lock */
-if ($old_plugin_dir != $plugin_dir && $old_plugin_dir != ""){
+if ($old_plugin_dir != $plugin_dir && $old_plugin_dir != "" || isset($_POST['delete_lock'])){
   if (is_file("$old_plugin_dir/main.inc")){
     $remove_lock= true;
+    $cleanup= true;
+    $display = "";
     require_once ("$old_plugin_dir/main.inc");
+    $display = "";
   }
 }
 $remove_lock= false;
+$cleanup= false;
 
 /* Check for sizelimits */
 eval_sizelimit();
@@ -240,19 +244,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){
     header ("Location: logout.php");
     exit;
   }
-
-  if (isset($_POST['cancel_lock'])){
-    session::un_set('dn');
-  }
 }
 
 
 /* Load department list when plugin has changed. That is some kind of
    compromise between speed and beeing up to date */
 if (isset($_GET['reset'])){
-  if (session::is_set('objectinfo')){
-    session::un_set('objectinfo');
-  }
+  set_object_info();
 }
 
 /* show web frontend */
@@ -298,13 +296,6 @@ $header= "<!-- headers.tpl-->".$smarty->fetch(get_template_path('headers.tpl'));
 
 /* React on clicks */
 if ($_SERVER["REQUEST_METHOD"] == "POST"){
-
-  /* 'delete_lock' is set by the lock removal dialog. We should remove the
-     lock at this point globally. Plugins do not need to remove it. */
-  if (isset($_POST['delete_lock']) && session::is_set('dn')){
-    del_lock (session::get('dn'));
-
-  }
   if (isset($_POST['delete_lock']) || isset($_POST['open_readonly'])){
 
     /* Set old Post data */
@@ -314,9 +305,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){
         $_POST[$name] = $value;
       } 
     }
-    session::un_set ('dn');
   }
-
 }
 
 /* check if we are using account expiration */
index 2f137ba65dcbc4e3b3ed96f804345417c1c015f7..b604e7c1ba43afe8edf8addbf2e7b94991250ef3 100644 (file)
@@ -2808,6 +2808,16 @@ function cred_decrypt($input,$password) {
   return mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $password, pack("H*", $input), MCRYPT_MODE_ECB, $iv);
 }
 
+function get_object_info()
+{
+  return(session::get('objectinfo'));
+}
+
+function set_object_info($str = "")
+{
+  session::set('objectinfo',$str);
+}
+
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
index 430382fbf1c1e9db8e6e8440efd940bdcf8a273f..1044660a3f2914c191b71b2a87d33311674b7eaf 100644 (file)
@@ -204,7 +204,7 @@ class aclManagement extends plugin
         }
 
         /* Set ACL and move DN to the headline */
-        session::set('objectinfo',$this->dn);
+        set_object_info($this->dn);
       }else{
         msg_dialog::display(_("Permission error"), msgPool::permModify(), ERROR_DIALOG);
       }
@@ -216,14 +216,14 @@ class aclManagement extends plugin
      ********************/
     if(isset($_POST['delete_lock'])){
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
     /* Reset all relevant data, if we get a _cancel request */
     if (isset($_POST['edit_cancel'])){
       $this->remove_lock();
       $this->acltabs= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -397,7 +397,7 @@ class aclManagement extends plugin
 
           unset ($this->acltabs);
           $this->acltabs= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }
       } else {
         /* Ok. There seem to be errors regarding to the tab data,
@@ -641,10 +641,11 @@ class aclManagement extends plugin
     /* Remove acl lock if a DN is marked as "currently edited" */
     if (isset($this->acltabs->dn)){
       del_lock ($this->acltabs->dn);
-    }else{
+    }elseif(!empty($this->dn)){
       del_lock ($this->dn);
+    }elseif(count($this->dns)){
+      del_lock ($this->dns);
     }
-    del_lock ($this->dns);
   }
 
 
index 7e4bce0e460d469d9f931a582482c4204124732b..edfd23da33783036af3e85b96ff006f1acb4d5e9 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('macl');
+}
+
+
 if ($remove_lock){
         if(session::is_set('macl')){
                 $macl = session::get('macl');
                 $macl->remove_lock();
-                del_lock ($ui->dn);
-                session::un_set ('macl');
         }
 } else {
        $display= "No headpage yet for this module";
@@ -41,15 +46,14 @@ if (!session::is_set('macl') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
        $output= $macl->execute();
 
        /* Page header*/
-       if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
+       if (get_object_info() != ""){
+               $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(get_object_info()));
        } else {
                $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"));
        }
 
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
-               del_lock ($ui->dn);
                session::un_set ('macl');
        }
 
index 96d0ec35353ec07806fea73388d8cc1535434178..bb0a20de8fa3a423f0c87e0f411cd71a12b2f2c1 100644 (file)
@@ -176,7 +176,7 @@ class departmentManagement extends plugin
         $this->deptabs= new deptabs($this->config,$this->config->data['TABS'][$data['TAB']], $this->dn,"department");
         $this->deptabs->set_acl_base($this->dn);
 
-        session::set('objectinfo',$this->dn);
+        set_object_info($this->dn);
       }
     }
 
@@ -359,7 +359,7 @@ class departmentManagement extends plugin
      }
      unset ($this->deptabs);
      $this->deptabs= NULL;
-     session::un_set('objectinfo');
+     set_object_info();
    }
 
 
@@ -373,7 +373,7 @@ class departmentManagement extends plugin
     if (isset($_POST['edit_cancel']) || isset($_POST['delete_cancel']) || isset($_POST['delete_department_confirm'])){
       $this->remove_lock();
       $this->deptabs= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
     /* Headpage or normal plugin screen? */
index 290c67df10f611f20315f7defa5c9cdde27393bc..35f4513545f0654d8f05901c544fa734c16c0294 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('department');
+}
+
+
 if ($remove_lock){
         if(session::is_set('department')){
                 $department = session::get('department');
                 $department->remove_lock();
-                session::un_set ('department');
         }
 } else {
        /* Create usermanagement object on demand */
@@ -38,15 +44,14 @@ if ($remove_lock){
        $output= $department->execute();
 
        /* Page header*/
-       if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
+       if (get_object_info() != ""){
+               $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(get_object_info()));
        } else {
                $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"));
        }
 
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
-               del_lock ($ui->dn);
                session::un_set ('department');
        }
 
index da14a33fe4be224e4d416a31c484501b220799e2..81c8bb8f9b826cd101051c553b9ca7dbbc23acdb 100644 (file)
@@ -268,7 +268,7 @@ class groupManagement extends plugin
           //$this->reload ();
           unset ($this->grouptab);
           $this->grouptab= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
 
           /* Reinitialize tab */
@@ -303,7 +303,7 @@ class groupManagement extends plugin
       $tmp->lock_entries($this->ui->dn);
       if($tmp->multiple_available()){
         $this->grouptab = $tmp;
-        session::set('objectinfo',$this->grouptab->get_object_info());
+        set_object_info($this->grouptab->get_object_info());
       }
     }
 
@@ -328,7 +328,7 @@ class groupManagement extends plugin
       /* Register grouptab to trigger edit dialog */
       $this->grouptab= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $this->dn);
       $this->grouptab->set_acl_base($this->dn);
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
 
@@ -495,7 +495,7 @@ class groupManagement extends plugin
 
       /* Remove lock file after successfull deletion */
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -506,7 +506,7 @@ class groupManagement extends plugin
     /* Delete group canceled? */
     if (isset($_POST['delete_cancel'])){
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
     
 
@@ -520,7 +520,7 @@ class groupManagement extends plugin
         $this->remove_lock();
       }
       $this->grouptab= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
index 6f6630ea180a7de83eeb99a2cf5de56645bb8f38..4f9aaf72f0e51e36b2cf1c2964ce3e9305129062 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('groupManagement');
+}
+
+
 if ($remove_lock){
   if(session::is_set('groupManagement')){
     $groupManagement = session::get('groupManagement');
     $groupManagement->remove_lock();
-    session::un_set ('groupManagement');
   }
 } else {
   /* Create groupManagement object on demand */
@@ -36,11 +42,11 @@ if ($remove_lock){
   $output= $groupManagement->execute();
 
   /* Page header*/
-  if (session::is_set('objectinfo')){
+  if (get_object_info() != ""){
     $display= print_header(get_template_path('plugins/groups/images/plugin.png'),
                            _("Group administration"), "<img alt=\"\" align=\"middle\" src=\"".
                             get_template_path('images/lists/locked.png')."\"> ".
-                            LDAP::fix(session::get('objectinfo')));
+                            LDAP::fix(get_object_info()));
   } else {
     $display= print_header(get_template_path('plugins/groups/images/plugin.png'), _("Group administration"));
   }
@@ -49,7 +55,6 @@ if ($remove_lock){
 
   /* Reset requested? */
   if (isset($_GET['reset']) && $_GET['reset'] == 1){
-    del_lock ($ui->dn);
     session::un_set ('groupManagement');
   }
 
index 634d863c9d3fb7e2e7d8d488c62901703b37b32e..048c12c4529557794dad437221205458eeec5e8f 100644 (file)
@@ -368,7 +368,7 @@ class ogroupManagement extends plugin
 
       /* Remove lock file after successfull deletion */
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -379,7 +379,7 @@ class ogroupManagement extends plugin
     /* Delete group canceled? */
     if (isset($_POST['delete_cancel'])){
       $this->remove_lock();
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -405,7 +405,7 @@ class ogroupManagement extends plugin
       /* Register grouptab to trigger edit dialog */
       $this->ogroup= new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'], $this->dn, "ogroups");
       $this->ogroup->set_acl_base($this->dn);
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
 
@@ -434,7 +434,7 @@ class ogroupManagement extends plugin
 
           unset ($this->ogroup);
           $this->ogroup= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
 
           /* Reinitialize tab */
@@ -458,7 +458,7 @@ class ogroupManagement extends plugin
     if ((isset($_POST['edit_cancel']))  && (isset($this->ogroup->dn))){
       $this->remove_lock();
       $this->ogroup= NULL;
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
index 918c970aaf5f70714e55f565bc675a4a0c15e668..856adacffe6b9eb166a31bb32e8984b556c94255 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('ogroup');
+}
 
 
 if ($remove_lock){
   if(session::is_set('ogroup')){
     $ogroup = session::get('ogroup');
     $ogroup->remove_lock();
-    session::un_set ('ogroup');
   }
 } else {
 
@@ -41,12 +45,12 @@ if ($remove_lock){
   $output= $ogroup->execute ();
 
   /* Page header*/
-  if (session::is_set('objectinfo')){
+  if (get_object_info() != ""){
     $display= print_header(get_template_path('plugins/ogroups/images/plugin.png'),
                           _("Object groups"),
                           "<img alt=\"\" align=\"middle\" src=\"".
                           get_template_path('images/lists/locked.png').
-                          "\"> ".LDAP::fix(session::get('objectinfo')));
+                          "\"> ".LDAP::fix(get_object_info()));
   } else {
     $display= print_header(get_template_path('plugins/ogroups/images/plugin.png'), _("Object groups"));
   }
index 9bf6ea459397f7dd5fdd00d1b43a1de3b0257c72..6b12c6dac88cc7c4bcd0396acd43f1551c2afd09 100644 (file)
@@ -323,7 +323,7 @@ class userManagement extends plugin
       $this->sn= "";
       $this->givenName= "";
       $this->uid= "";
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -372,7 +372,7 @@ class userManagement extends plugin
 
         /* User is allowed to change passwords, save 'dn' and 'acl' for next
            dialog. */
-        session::set('objectinfo',$this->dn);
+        set_object_info($this->dn);
         return ($smarty->fetch(get_template_path('password.tpl', TRUE)));
       } else {
         /* User is not allowed. Show message and cancel. */
@@ -395,6 +395,7 @@ class userManagement extends plugin
 
       /* Check locking, save current plugin in 'back_plugin', so
          the dialog knows where to return. */
+
       if (($user= get_lock($this->dn)) != ""){
         return(gen_locked_message ($user, $this->dn,TRUE));
       }
@@ -412,7 +413,7 @@ class userManagement extends plugin
 
       /* Set ACL and move DN to the headline */
       $this->usertab->set_acl_base($this->dn);
-      session::set('objectinfo',$this->dn);
+      set_object_info($this->dn);
     }
 
 
@@ -436,7 +437,7 @@ class userManagement extends plugin
       if($tmp->multiple_available()){
         $this->usertab = $tmp;
         $this->usertab->set_active_tab($s_tab);
-        session::set('objectinfo',$this->usertab->get_object_info());
+        set_object_info($this->usertab->get_object_info());
       }
     }
 
@@ -455,7 +456,7 @@ class userManagement extends plugin
       $this->sn= "";
       $this->givenName= "";
       $this->uid= "";
-      session::un_set('objectinfo');
+      set_object_info();
     }
 
 
@@ -735,7 +736,7 @@ class userManagement extends plugin
 
           unset ($this->usertab);
           $this->usertab= NULL;
-          session::un_set('objectinfo');
+          set_object_info();
         }else{
         
           /* Reinitialize tab */
index 5e75fe18d9891a33ba848a54373f49d4235c23fc..05d3eddf9eaac7b18f83611b24d1c5b302f5dec1 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('userManagement');
+}
+
+
 if ($remove_lock){
   if(session::is_set('userManagement')){
     $userManagement = session::get('userManagement');
     $userManagement->remove_lock();
-    session::un_set ('userManagement');
   }
 } else {
   /* Create usermanagement object on demand */
@@ -39,12 +45,12 @@ if ($remove_lock){
   $output= $userManagement->execute();
 
   /* Page header*/
-  if (session::is_set('objectinfo')){
+  if (get_object_info() != ""){
     $display= print_header(get_template_path($userManagement->plIcon),
                            _("User administration"),
                            "<img alt=\"\" class=\"center\" src=\"".
                            get_template_path('images/lists/locked.png').
-                           "\"> ".LDAP::fix(session::get('objectinfo')));
+                           "\"> ".LDAP::fix(get_object_info()));
   } else {
     $display= print_header(get_template_path($userManagement->plIcon),
                           _("User administration"));
@@ -55,7 +61,6 @@ if ($remove_lock){
 
   /* Reset requested? */
   if (isset($_GET['reset']) && $_GET['reset'] == 1){
-    del_lock ($ui->dn);
     session::un_set ('userManagement');
   }
 
index 63c770065806401900167470aaeeb36db9b3bab1..2f1376e615005b226efe0c8e2a22eeced271852d 100644 (file)
 /* Preset display */
 $display  = "";
 $lock_msg = "";
-if (!$remove_lock){
+
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('user');
+  session::un_set('edit');
+}
+
+if ( $remove_lock){
+  if(session::is_set('user') && session::is_set('edit')){
+    del_lock ($ui->dn);
+  }
+}else{
+
   /* Reset requested? */
   if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel']) || 
       (isset($_GET['reset']) && $_GET['reset'] == 1)){
@@ -60,7 +73,7 @@ if (!$remove_lock){
       session::set('back_plugin',$plug);
       session::set('LOCK_VARS_TO_USE',array("/^edit$/","/^plug$/"));
       $lock_msg =  gen_locked_message ($username, $ui->dn);
-  
+
     }else{
 
       /* Lock the current entry */
@@ -133,7 +146,7 @@ if (!$remove_lock){
         $display.= $smarty->fetch(get_template_path('password.tpl', TRUE));
         return ($display);
       } else {
-       session::un_set ('user');
+        session::un_set ('user');
       }
 
     } else {
@@ -167,7 +180,7 @@ if (!$remove_lock){
       $display.= "<input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">\n";
 
       $info= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png').
-             "\"> ".$ui->dn."&nbsp;";
+        "\"> ".$ui->dn."&nbsp;";
     } else {
       /* 'viewid' may be set by i.e. the phonelist plugin. This
          means that we want to go back... */
@@ -178,7 +191,7 @@ if (!$remove_lock){
         $str= msgPool::editButton();
         $fn = "edit";
         $info= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/unlocked.png').
-               "\"> ".$ui->dn."&nbsp;";
+          "\"> ".$ui->dn."&nbsp;";
       }
 
       /* Only display edit button if there is at least one attribute editable */
@@ -197,7 +210,7 @@ if (!$remove_lock){
 
   /* Page header*/
   $display= print_header(get_template_path('plugins/generic/images/plugin.png'),
-                         _("Generic user information"), $info).$display;
+      _("Generic user information"), $info).$display;
 
 }
 
index 568aafa40be440a3fcb7925acfedc843bd075d0d..9b5c981cae83fbf465edc19b4fad29c35a0da241 100644 (file)
 /* Clear display */
 $display= "";
 
+if ( $cleanup ){
+  session::un_set('password');
+  session::un_set('edit');
+}
+
 if (!$remove_lock){
 
   /* Reset requested? */
index ffbd769fbc80e8965b99df9705a761c518e43d35..710d33a6c23493406aa95673857045188bba90d0 100644 (file)
 /* Clear display */
 $display  = "";
 $lock_msg = "";
-if (!$remove_lock){
+
+/* Remove classes and variables from session 
+ */
+if ( $cleanup ){
+  session::un_set('posixAccount');
+  session::un_set('edit');
+}
+
+if ( $remove_lock){
+  if(session::is_set('posixAccount') && session::is_set('edit')){
+    del_lock ($ui->dn);
+  }
+
+}else{
 
   /* Reset requested? */
   if (isset($_POST['edit_cancel']) ||  (isset($_GET['reset']) && $_GET['reset'] == 1)){
@@ -65,7 +78,6 @@ if (!$remove_lock){
 
       /* Lock the current entry */
       add_lock ($ui->dn, $ui->dn);
-      session::set('dn',$ui->dn);
       session::set('edit',TRUE);
     }
   }
index 9f8397119834a6660042295c834784801d7ce3d5..7a9a1cb8e02edc4dc7ff8637b3d6d2ca0b5657ac 100644 (file)
@@ -272,11 +272,6 @@ class Step_Config2 extends setup_step
         $this->samba_settings['samba_sid_active'] = TRUE;
         $this->samba_settings['samba_rid_active'] = TRUE;
       }
-
-      /* Reload mail naming attribute */
-      if($old_mail != $this->mail && isset($this->mail_methods[$this->mail]['uattrib'])){
-        $this->mail_attrib = $this->mail_methods[$this->mail]['uattrib'];
-      }
     }
 
     $tmp = $this->check();
@@ -315,24 +310,12 @@ class Step_Config2 extends setup_step
     if(!class_available("mailMethod")){
       return(array());
     }
-
-    $default_uattrib = "";
-    $m_class_vars = get_class_vars("mailMethod");
-    if(isset($m_class_vars['uattrib'])){
-      $default_uattrib = $m_class_vars['uattrib'];
-    }
-
+    $methods = array();
     foreach($class_mapping as $name => $file){
-      if(preg_match("/^mailMethod[a-z]*$/i",$name)){
+      if(preg_match("/^mailMethod.*$/i",$name)){
         $name = preg_replace("/^mailMethod/","",$name);
         if(!empty($name)){
           $methods[$name]['name'] = $name;
-          $m_class_vars = get_class_vars("mailMethod".$methods[$name]['name']);
-          if(isset($m_class_vars['uattrib'])){
-            $methods[$name]['uattrib'] = $m_class_vars['uattrib'];
-          }else{
-            $methods[$name]['uattrib'] = $default_uattrib;
-          }
         }
       }
     }
index 3ed7daec9ac28659f395fbacb8b60fcb0d44bf86..b6d806b310c3d217ba95285573a14609bf10c2cd 100644 (file)
             <select name="mail" size="1" title="" onChange="document.mainform.submit();">
                 <option  value="disabled">{t}disabled{/t}</option>
                 {foreach from=$mail_methods item=item}
-                    <option value="{$item.name}" {if $mail == $item.name} selected {/if}>{$item.name}&nbsp;({$item.uattrib})</option>
+                    <option value="{$item.name}" {if $mail == $item.name} selected {/if}>{$item.name}</option>
                 {/foreach}
             </select>
         </div>