Code

Updated smarty to recent 3.0.8
[gosa.git] / gosa-core / include / smarty / plugins / block.php.php
1 <?php
2 /**
3  * Smarty plugin to execute PHP code
4  * 
5  * @package Smarty
6  * @subpackage PluginsBlock
7  * @author Uwe Tews 
8  */
10 /**
11  * Smarty {php}{/php} block plugin
12  * 
13  * @param string $content contents of the block
14  * @param object $template template object
15  * @param boolean $ &$repeat repeat flag
16  * @return string content re-formatted
17  */
18 function smarty_block_php($params, $content, $template, &$repeat)
19
20     if (!$template->allow_php_tag) {
21         throw new SmartyException("{php} is deprecated, set allow_php_tag = true to enable");
22     } 
23     eval($content);
24     return '';
25 }
27 ?>