diff --git a/contrib/smarty/plugins/block.render.php b/contrib/smarty/plugins/block.render.php index 892dff297b77371f1b942777ab41d00237963121..cbb2a2321a44128b44e531830700d26b5e9dc572 100644 --- a/contrib/smarty/plugins/block.render.php +++ b/contrib/smarty/plugins/block.render.php @@ -43,10 +43,9 @@ function smarty_block_render($params, $text) } /* Disable objects, but keep those active that have mode=read_active */ - if (!(isset($params['mode']) && ($params['mode'] == 'read_active') && preg_match('/(r|w)/', $acl))) { - if (!preg_match('/ disabled(="disabled")?( |\/?>)/', $text)) { - $text = preg_replace('/name=/i', 'disabled="disabled" name=', $text); - } + if (!(isset($params['mode']) && ($params['mode'] == 'read_active') && preg_match('/(r|w)/', $acl)) + && !preg_match('/ disabled(="disabled")?( |\/?>)/', $text)) { + $text = preg_replace('/name=/i', 'disabled="disabled" name=', $text); } /* Read only */