From f10ef12246d9ec5c40e157dc8cb3134ce28c930d Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 21 Sep 2007 06:21:34 +0000 Subject: [PATCH] Updated class definition for glpiManagement git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7365 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_glpiDeviceManagement.inc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/plugins/admin/systems/class_glpiDeviceManagement.inc b/plugins/admin/systems/class_glpiDeviceManagement.inc index e7d53a9a9..0f24300d8 100644 --- a/plugins/admin/systems/class_glpiDeviceManagement.inc +++ b/plugins/admin/systems/class_glpiDeviceManagement.inc @@ -159,12 +159,12 @@ class glpiDeviceManagement extends plugin if(isset($_POST['SaveDeviceChanges'])){ /* First check if all changes made are allowed */ - if(count($this->check($this->EditEntry))==0){ - $this->save($this->EditEntry); + if(count($this->check())==0){ + $this->save(); $this->editMode = false; $this->reload(); }else{ - foreach($this->check($this->EditEntry) as $msg){ + foreach($this->check() as $msg){ print_red($msg); } } @@ -331,14 +331,17 @@ class glpiDeviceManagement extends plugin return($this->Selected); } - /* This function cehck all created devices if you wan't to create device specific check - use >>if($attr['device_type']=="moboard")<< to create a device type depending check + /* This function checks all created devices. + If you wan't to use device specific checks, + use >>if($attr['device_type']=="moboard")<< to create a device type depending check */ - function check($attr) + function check() { /* Call common method to give check the hook */ $message= plugin::check(); + $attr = $this->EditEntry; + if(isset($attr['designation'])){ $str2 = "designation"; }else{ -- 2.30.2