Code

Updated render fucntion again
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Nov 2006 09:13:06 +0000 (09:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Nov 2006 09:13:06 +0000 (09:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4994 594d385d-05f5-0310-b6e9-bd551577e9d8

include/smarty/plugins/block.render.php

index df8c6e7006aafa4d5f105dd1243b3d7b269d0e69..dd26c6fd2bad76f4a8c8e454fae037455d5ffae3 100755 (executable)
@@ -20,6 +20,8 @@ function smarty_block_render($params, $text, &$smarty)
                return ($text);
        }
 
+       $text = preg_replace ("/\n/","GOSA_LINE_BREAK",$text);
+
        /* Disable objects, but keep those active that have mode=read_active */
        if(!(isset($params['mode']) && $params['mode']=='read_active')){
 
@@ -48,7 +50,7 @@ function smarty_block_render($params, $text, &$smarty)
 
        /* Read only */
        if(preg_match("/r/i",$acl)){
-               return($text);  
+               return(preg_replace("/GOSA_LINE_BREAK/","\n",$text));   
        }
 
        /* No acls */   
@@ -67,7 +69,7 @@ function smarty_block_render($params, $text, &$smarty)
                        "\\1\\2",
                        "\\1 \\2");
        $text   = preg_replace($from,$to,$text);
-
+       $text = preg_replace("/GOSA_LINE_BREAK/","\n",$text);
        return $text;
 }