summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 97d4d7f)
raw | patch | inline | side by side (parent: 97d4d7f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 Jan 2006 06:38:24 +0000 (06:38 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 Jan 2006 06:38:24 +0000 (06:38 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2508 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_glpiDeviceManagement.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_glpiDeviceManagement.inc b/plugins/admin/systems/class_glpiDeviceManagement.inc
index dc54bdb6d19db6ff2002009841ecde6ceda90f0d..84c50362c05faa9072176ff4de0cee6ed491a88f 100644 (file)
var $Selected = array();
+ var $delete = array();
+
function glpiDeviceManagement ($config, $dn= NULL,$used=NULL)
{
plugin::plugin ($config, $dn);
if((isset($_GET['act']))&&($_GET['act']=="del_device")){
$id = base64_decode($_GET['id']);
$tmp = $this->devices[$id];
- $this->parent->handle->deleteDevice($tmp);
+
+ $this->delete = $tmp;
+
+ if(isset($tmp['name'])){
+ $smarty->assign("warning", sprintf(_("You're about to delete the glpi device '%s'."), $tmp['name']));
+ }elseif(isset($tmp['designation'])){
+ $smarty->assign("warning", sprintf(_("You're about to delete the glpi device '%s'."), $tmp['designation']));
+ }else{
+ print_a(_("Can't detect object name."));
+ }
+
+ return($smarty->fetch(get_template_path('remove_glpi.tpl', TRUE)));
+ }
+
+
+ if(isset($_POST['delete_glpi_confirm'])){
+ $this->parent->handle->deleteDevice($this->delete);
$this->reload();
}