From d14cd9497ce6cb424cea53b955b305c433c862bd Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 20 Jul 2006 05:31:01 +0000 Subject: [PATCH] Hide select options if no acls are given git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4244 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/smarty/plugins/block.render.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/smarty/plugins/block.render.php b/include/smarty/plugins/block.render.php index c29621f2d..dbbc4a9b6 100755 --- a/include/smarty/plugins/block.render.php +++ b/include/smarty/plugins/block.render.php @@ -25,9 +25,11 @@ function smarty_block_render($params, $text, &$smarty) /* Disable objects, but keep those active that have mode=read_active */ if(!(isset($params['mode']) && $params['mode']=='readable')){ - $from = array("/name=/i"); - $to = array(" disabled name="); - $text = preg_replace($from,$to,$text); + + /* Disable options */ + $from = array("/name=/i"); + $to = array(" disabled name="); + $text = preg_replace($from,$to,$text); /* Replace picture if object is disabled */ if(isset($params['disable_picture'])){ @@ -35,7 +37,6 @@ function smarty_block_render($params, $text, &$smarty) $new = "src=\"".$params['disable_picture']."\""; $text = preg_replace($syn,$new,$text); } - } /* Read only */ @@ -50,6 +51,11 @@ function smarty_block_render($params, $text, &$smarty) $text = preg_replace("/value=['\" ].*['\" ]/","",$text); } + /* Remove select options */ + $from = array("##i"); + $to = array(" "); + $text = preg_replace($from,$to,$text); + return $text; } -- 2.30.2