Code

Added trust stuff - not finished yet. Save and load works.
[gosa.git] / gosa-core / plugins / admin / ogroups / class_ogroupManagement.inc
index b1d139436f5ee7d949cd379438571ed8c7131540..64899b4e4e3e97d873acbaa569cd66e9ecc7a33c 100644 (file)
@@ -170,8 +170,7 @@ class ogroupManagement extends plugin
       $o_queue = new gosaSupportDaemon();
       $o_queue->append($this->ogroup);
       if($o_queue->is_error()){
-        msg_dialog::display(_("Daemon"),sprintf(_("Something went wrong while talking to the daemon: %s."),
-              $o_queue->get_error()),ERROR_DIALOG);
+        msg_dialog::display(_("Infrastructure error"), msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
       }else{
         $this->ogroup = FALSE;
       }
@@ -261,7 +260,7 @@ class ogroupManagement extends plugin
 
           /* Normally this shouldn't be reached, send some extra
              logs to notify the administrator */
-          msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), INFO_DIALOG);
+          msg_dialog::display(_("Permission error"), msgPool::permDelete(), INFO_DIALOG);
           new log("security","ogroups/".get_class($this),$dn,array(),"Tried to trick deletion.");
         }
         /* Remove lock file after successfull deletion */
@@ -313,7 +312,7 @@ class ogroupManagement extends plugin
 
         /* Obviously the user isn't allowed to delete. Show message and
            clean session. */
-        msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), INFO_DIALOG);
+        msg_dialog::display(_("Permission error"), msgPool::permDelete(), INFO_DIALOG);
       }
     }
 
@@ -340,7 +339,7 @@ class ogroupManagement extends plugin
 
         /* Normally this shouldn't be reached, send some extra
            logs to notify the administrator */
-        msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), INFO_DIALOG);
+        msg_dialog::display(_("Permission error"), msgPool::permDelete(), INFO_DIALOG);
         new log("security","ogroups/".get_class($this),$dn,array(),"Tried to trick deletion.");
       }
 
@@ -413,6 +412,12 @@ class ogroupManagement extends plugin
           unset ($this->ogroup);
           $this->ogroup= NULL;
           session::un_set('objectinfo');
+        }else{
+
+          /* Reinitialize tab */
+          if($this->ogroup instanceof tabs){
+            $this->ogroup->re_init();
+          }
         }
       } else {
         /* Ok. There seem to be errors regarding to the tab data,
@@ -496,16 +501,16 @@ class ogroupManagement extends plugin
     $temp= "";
 
     $conv= array(   
-        "U" => array("select_user.png"        ,_("User")        , "ogroup"),
-        "G" => array("select_groups.png"      ,_("Group")       , "ogroup"),
-        "A" => array("select_application.png" ,_("Application") , "ogroup"),
-        "D" => array("select_department.png"  ,_("Department")  , "ogroup"),
-        "S" => array("select_server.png"      ,_("Server")      , "ogroup"),
-        "F" => array("select_phone.png"       ,_("Phone")       , "phonequeue"),
-        "W" => array("select_workstation.png" ,_("Workstation") , "workstartup"),
-        "O" => array("select_winstation.png" ,_("Windows Install") , "ogroup"),
-        "T" => array("select_terminal.png"    ,_("Terminal")    , "termgroup"),
-        "P" => array("select_printer.png"     ,_("Printer")     , "ogroup"));
+        "U" => array("plugins/generic/images/head.png"        ,_("User")        , "ogroup"),
+        "G" => array("plugins/groups/images/groups.png"       ,_("Group")       , "ogroup"),
+        "A" => array("plugins/ogroups/images/application.png" ,_("Application") , "ogroup"),
+        "D" => array("plugins/departments/department.png"     ,_("Department")  , "ogroup"),
+        "S" => array("plugins/ogroups/images/server.png"      ,_("Server")      , "ogroup"),
+        "F" => array("plugins/ogroups/images/asterisk.png"    ,_("Phone")       , "phonequeue"),
+        "W" => array("plugins/ogroups/images/workstation.png" ,_("Workstation") , "workstartup"),
+        "O" => array("plugins/ogroups/images/winstation.png"  ,_("Windows Install") , "ogroup"),
+        "T" => array("plugins/ogroups/images/terminal.png"    ,_("Terminal")    , "termgroup"),
+        "P" => array("plugins/ogroups/images/printer.png"     ,_("Printer")     , "ogroup"));
 
     /* Assemble picture */
     $type= $input['gosaGroupObjects'][0];
@@ -517,7 +522,7 @@ class ogroupManagement extends plugin
       $p1['lnk']= $conv[$type[0]][2];
       $html_object_1 = "<input type='image' name='".$p1['lnk']."_group_edit_%KEY' ";
     } else {
-      $p1['pic']= "empty.png";
+      $p1['pic']= "images/empty.png";
       $p1['tit']= "";
       $p1['alt']= "";
       $p1['lnk']= "";//$conv[$type[0]][2];
@@ -531,7 +536,7 @@ class ogroupManagement extends plugin
       $p2['lnk']= $conv[$type[1]][2];
       $html_object_2 = "<input type='image' name='".$p2['lnk']."_group_edit_%KEY' ";
     } else {
-      $p2['pic']= "empty.png";
+      $p2['pic']= "images/empty.png";
       $p2['alt']= "";
       $p2['tit']= "";
       $p2['lnk']= ""; //$conv[$type[0]][2];
@@ -539,9 +544,9 @@ class ogroupManagement extends plugin
     }
     
     $temp = $html_object_1." class='center' id='iconA".preg_replace("/_/","",$p1['lnk']."_group_edit_%KEY")."' 
-      src='images/".$p1['pic']."' alt='".$p1['alt']."' title='".$p1['tit']."'>";
+      src='".$p1['pic']."' alt='".$p1['alt']."' title='".$p1['tit']."'>";
     $temp.= $html_object_2." class='center' id='iconB".preg_replace("/_/","",$p2['lnk']."_group_edit_%KEY")."' 
-      src='images/".$p2['pic']."' alt='".$p2['alt']."' title='".$p2['tit']."'>";
+      src='".$p2['pic']."' alt='".$p2['alt']."' title='".$p2['tit']."'>";
     return ($temp);
   }
 
@@ -674,6 +679,9 @@ class ogroupManagement extends plugin
   function save_object()
   {
     $this->DivListOGroup->save_object();
+    if(is_object($this->CopyPasteHandler)){
+      $this->CopyPasteHandler->save_object();
+    }
   }
 
 }