Code

Updated Quota progress bar.
[gosa.git] / gosa-plugins / mail / personal / mail / main.inc
index 1c559490e3caaf4721961733e3d24638d7e4027e..df0e7495e491f2ffd9d2955d395ef768b5372d48 100644 (file)
@@ -24,7 +24,12 @@ if (!$remove_lock){
   /* Reset requested? */
   if (isset($_POST['edit_cancel']) || 
       (isset($_GET['reset']) && $_GET['reset'] == 1)){
-    del_lock ($ui->dn);
+
+    /* Only remove lock if object was opened 
+     */
+    if(session::is_set('mailAccount') && session::is_set('edit')){
+      del_lock ($ui->dn);
+    }
     session::un_set ('edit');
     session::un_set ('mailAccount');
   }
@@ -45,7 +50,7 @@ if (!$remove_lock){
   }
 
   /* Enter edit mode? */
-  if (isset($_POST['edit']) && preg_match("/w/",$ui->get_permissions($ui->dn,"users/mailAccount"))){
+  if (isset($_POST['edit']) && preg_match("/r/",$ui->get_permissions($ui->dn,"users/mailAccount"))){
 
     /* Check locking */
     if (($username= get_lock($ui->dn)) != ""){
@@ -104,16 +109,16 @@ if (!$remove_lock){
       $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
       $display.= "&nbsp;";
       $display.= "<input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">\n";
-      $info= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png').
+      $info= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png').
              "\"> ".$ui->dn."&nbsp;";
     } else {
-      $info= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/openlock.png').
+      $info= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/unlocked.png').
              "\"> ".$ui->dn."&nbsp;";
       
-        $info.= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lamp.png').
+        $info.= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/on.png').
             "\"> ".msgPool::clickEditToChange();
 
-        if(preg_match("/w/",$ui->get_permissions($ui->dn,"users/mailAccount"))){
+        if(preg_match("/r/",$ui->get_permissions($ui->dn,"users/mailAccount"))){
           $display.= "<input type=submit name=\"edit\" value=\"".msgPool::editButton()."\">\n";
         }
 
@@ -123,7 +128,7 @@ if (!$remove_lock){
   }
 
   /* Page header*/
-  $display= print_header(get_template_path('images/email.png'), _("User mail settings"), $info).$display;
+  $display= print_header(get_template_path('plugins/mail/images/plugin.png'), _("User mail settings"), $info).$display;
 
 }