Code

Updated class definition for glpiManagement
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Sep 2007 06:21:34 +0000 (06:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Sep 2007 06:21:34 +0000 (06:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7365 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_glpiDeviceManagement.inc

index e7d53a9a9ec49b352f6630821e192c1850721522..0f24300d800375a24d1e9bf285cc3bff4c654d74 100644 (file)
@@ -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{