Code

Allow to set multiple dependencies for listing actions :
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Jan 2010 10:11:14 +0000 (10:11 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Jan 2010 10:11:14 +0000 (10:11 +0000)
 - e.g.
{{{

    <action>
      <name>createISO</name>
      <type>entry</type>

      <objectclass>gotoWorkstation</objectclass>
      <objectclass>FAIobject</objectclass>

      <image>plugins/systems/images/cdrom.png</image>
      <acl>workstation/workgeneric[createFAICD:w]</acl>
      <label>Create ISO</label>
    </action>

}}}

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

gosa-core/include/class_listing.inc

index 3b83e0811adcc73b06f1a2e398003d61833b6611..8802c2523962363adc9186a0581741114a999e76 100644 (file)
@@ -854,11 +854,16 @@ class listing {
             $result.= "<img src='images/empty.png' alt=' ' class='center' style='padding:1px'>";
             continue;
           }
-        } else {
+        } elseif (is_string($objectclass)) {
           if(!in_array($objectclass, $classes)) {
             $result.= "<img src='images/empty.png' alt=' ' class='center' style='padding:1px'>";
             continue;
           }
+        } elseif (is_array($objectclass)) {
+          if(count(array_intersect($objectclass, $classes)) == count($objectclass)){
+            $result.= "<img src='images/empty.png' alt=' ' class='center' style='padding:1px'>";
+            continue;
+          }
         }
       }