From 042053fff5733f6830f8f623cd1d126c71eea1f0 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 17 Jan 2006 06:27:10 +0000 Subject: [PATCH] Added some comments git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2495 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_glpiAttachmentPool.inc | 2 -- plugins/admin/systems/class_glpiDeviceManagement.inc | 6 +++--- plugins/admin/systems/class_glpiManufacturer.inc | 8 +++++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/plugins/admin/systems/class_glpiAttachmentPool.inc b/plugins/admin/systems/class_glpiAttachmentPool.inc index 853d2190e..4cfd7f46e 100644 --- a/plugins/admin/systems/class_glpiAttachmentPool.inc +++ b/plugins/admin/systems/class_glpiAttachmentPool.inc @@ -229,7 +229,6 @@ class glpiAttachmentPool extends plugin name='new_attach' alt='"._("New Attachment"). "'> ". ""; - $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); } diff --git a/plugins/admin/systems/class_glpiDeviceManagement.inc b/plugins/admin/systems/class_glpiDeviceManagement.inc index 126ac4ad3..dc54bdb6d 100644 --- a/plugins/admin/systems/class_glpiDeviceManagement.inc +++ b/plugins/admin/systems/class_glpiDeviceManagement.inc @@ -212,6 +212,7 @@ class glpiDeviceManagement extends plugin "  ". ""; + $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) { diff --git a/plugins/admin/systems/class_glpiManufacturer.inc b/plugins/admin/systems/class_glpiManufacturer.inc index eaaaaa941..0c950d366 100644 --- a/plugins/admin/systems/class_glpiManufacturer.inc +++ b/plugins/admin/systems/class_glpiManufacturer.inc @@ -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){ -- 2.30.2