From: cajus Date: Thu, 17 Sep 2009 12:43:47 +0000 (+0000) Subject: Added filter possibility for buttons X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=22e3da6acb440dafbf42696d9fbbf47f686d13b1;p=gosa.git Added filter possibility for buttons git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14269 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index 315226131..8139214df 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -772,9 +772,20 @@ class listing { foreach($actions as $action) { // Skip the entry completely if there's no permission to execute it if (!$this->hasActionPermission($action, $dn)) { + $result.= " "; continue; } + // Skip entry if the pseudo filter does not fit + if (isset($action['filter']) && preg_match('/^[a-z0-9_]+=[a-z0-9_]+$/i', $action['filter'])) { + list($fa, $fv)= split('=', $action['filter']); + if (!isset($this->entries[$row][$fa]) && !$this->entries[$row][$fa][0] == $fv) { + $result.= " "; + continue; + } + } + + // If there's an objectclass definition and we don't have it // add an empty picture here. if (isset($action['objectclass'])){