Code

Updated systems ans its row colouring
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 30 Apr 2010 12:15:34 +0000 (12:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 30 Apr 2010 12:15:34 +0000 (12:15 +0000)
-If we've concurrent states with 'error' and 'locked', then let error win.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17998 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc

index d4f66f2cbc1b37a0e7e7685df839f7795bb13bdb..ce1f7625723f66734b4cc2c1ea5542f2aa7d450e 100644 (file)
@@ -86,9 +86,7 @@ class filterSYSTEMS {
             foreach(array('gotoWorkstation','gotoTerminal','goServer') as $type){
                 if(in_array($type, $entry['objectClass'])){
 
-                    if(isset($entry['gotoMode'][0]) && preg_match("/locked/i", $entry['gotoMode'][0])){
-                        $state = "locked";
-                    }elseif(isset($entry['FAIstate'][0])){
+                    if(isset($entry['FAIstate'][0])){
                         switch (preg_replace('/:.*$/', '', $entry['FAIstate'][0])) {
                             case 'error':
                                 $state= 'error';
@@ -101,6 +99,8 @@ class filterSYSTEMS {
                                 $state= 'busy';
                                 break;
                         }
+                    }elseif(isset($entry['gotoMode'][0]) && preg_match("/locked/i", $entry['gotoMode'][0])){
+                        $state = "locked";
                     }
                 }
             }