From a6a13bd3d536c43bf817da3e003d0e30c01fbb0a Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 3 Mar 2010 15:27:46 +0000 Subject: [PATCH] Updated smarty image function git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15996 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/smarty/plugins/function.image.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gosa-core/include/smarty/plugins/function.image.php b/gosa-core/include/smarty/plugins/function.image.php index 62573a279..3d120737f 100644 --- a/gosa-core/include/smarty/plugins/function.image.php +++ b/gosa-core/include/smarty/plugins/function.image.php @@ -8,6 +8,13 @@ function smarty_function_image($params, &$smarty) $align = (isset($params['align']))? $params['align'] :""; //print_a(array($path,$label,$action,$title,$align)); + if(isset($params['acl'])){ + if(!preg_match("/w/", $params['acl'])){ + $path = preg_replace("/\.png/","-grey.png", $path); + $action = ""; + } + } + if(!empty($align)){ echo image($path,$action,$title,$align); }else{ -- 2.30.2