Code

Added some comments
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 17 Jan 2006 06:27:10 +0000 (06:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 17 Jan 2006 06:27:10 +0000 (06:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2495 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_glpiAttachmentPool.inc
plugins/admin/systems/class_glpiDeviceManagement.inc
plugins/admin/systems/class_glpiManufacturer.inc

index 853d2190ef640b40f389c8307290dce48735ed0c..4cfd7f46e470d4887c2d0ef3f93316e0dcc177bf 100644 (file)
@@ -229,7 +229,6 @@ class glpiAttachmentPool extends plugin
       name='new_attach' alt='"._("New Attachment"). "'>&nbsp;".
       "</div>";
 
-
     $smarty->assign("attachments",      $divlist->DrawList());
     $smarty->assign("attachmenthead",   $listhead);
     $smarty->assign("search_image",     get_template_path('images/search.png'));
@@ -241,7 +240,6 @@ class glpiAttachmentPool extends plugin
     $smarty->assign("alphabet",         generate_alphabet());
     $smarty->assign("attachment_regex", $_SESSION['GlpiAttachmentFilter']['filter']);
 
-
     $display.= $smarty->fetch(get_template_path('glpiAttachmentPool.tpl', TRUE));
     return($display);
   }
index 126ac4ad3c0d79a9cb81f26092bb14af184c7cd0..dc54bdb6d19db6ff2002009841ecde6ceda90f0d 100644 (file)
@@ -212,6 +212,7 @@ class glpiDeviceManagement extends plugin
       " <input class='center' type='image' align='middle' 
       src='mages/list_back.png' title='"._("New misc device")."' alt='"._("OC")."' name='new_pci'>&nbsp;".
       "</div>";
+    
     $filter= $_SESSION['glpiDeviceRegex'];
     $smarty->assign("devicehead", $listhead);
     $smarty->assign("devices", $divlist->DrawList());
@@ -224,7 +225,6 @@ class glpiDeviceManagement extends plugin
     $smarty->assign("alphabet", generate_alphabet());
     $smarty->assign("device_regex", $filter['device_regex']);
 
-
     $display.= $smarty->fetch(get_template_path('glpiDeviceManagement.tpl', TRUE));
     return($display);
   }
@@ -335,8 +335,8 @@ class glpiDeviceManagement extends plugin
     return($message);
   }
 
-  /* This funtions displays the tempalte for all available devices 
-   * This funtion is also used if we create a new device
+  /* This functions displays the template for all available devices 
+   * This function is also used if we create a new device
    */
   function editDevice($entry)
   {
index eaaaaa94185ce06c67a40fba3494b9e1783bdd3e..0c950d366a2837c35bbfc09f4249a9aa35564d9a 100644 (file)
@@ -40,10 +40,12 @@ class glpiManufacturer extends plugin
     $smarty  = get_smarty();
     $display = "";
 
+    /* Remove enterprise from db */
     if((isset($_POST['remove_manu']))&&(isset($_POST['manufacturer']))){
       $this->parent->handle->removeEnterprise($_POST['manufacturer']);
     }
 
+    /* Add new Manufactuer : Open dialog with empty fields */
     if(isset($_POST['add_manu'])){
       $this->editMode = true;
       $this->Edit_Add = "add";
@@ -52,6 +54,7 @@ class glpiManufacturer extends plugin
       }
     }
 
+    /* Edit existing manuatctuerer data */
     if((isset($_POST['edit_manu']))&&(isset($_POST['manufacturer']))){
       $this->editMode = true;
       $this->Edit_Add = "edit";
@@ -68,12 +71,13 @@ class glpiManufacturer extends plugin
       $this->ID = $_POST['manufacturer'];
     }
 
+    /* close Dialog without saving */
     if(isset($_POST['close_manufacturer'])){
       $this->editMode=false;
     }
 
+    /* close dialog an save all changes / adds */
     if(isset($_POST['save_manufacturer'])){
-
       $tmp = array();
       foreach($this->attributes as $attrs){
         $tmp[$attrs]=$this->$attrs;
@@ -85,6 +89,7 @@ class glpiManufacturer extends plugin
         $allok = false;
       }
 
+      /* all checks are ok , so save changes */
       if($allok){
         if($this->Edit_Add == "add"){
           $this->parent->handle->addEnterprise($tmp);
@@ -96,6 +101,7 @@ class glpiManufacturer extends plugin
       }
     }
 
+    /* As long as this war is true, we have to display the edit dialog */
     if($this->editMode == true){
       $this->save_object();
       foreach($this->attributes as $attrs){