Files
smarty/libs/plugins/block.php.php

27 lines
589 B
PHP
Raw Normal View History

<?php
/**
2010-08-17 15:39:51 +00:00
* Smarty plugin to execute PHP code
*
* @package Smarty
* @subpackage PluginsBlock
* @author Uwe Tews
*/
/**
2010-08-17 15:39:51 +00:00
* Smarty {php}{/php} block plugin
*
* @param string $content contents of the block
* @param object $template template object
* @param boolean $ &$repeat repeat flag
2010-08-17 15:39:51 +00:00
* @return string content re-formatted
*/
function smarty_block_php($params, $content, $template, &$repeat)
{
if (!$template->allow_php_tag) {
throw new SmartyException("{php} is deprecated, set allow_php_tag = true to enable");
}
eval($content);
return '';
}
2010-08-17 15:39:51 +00:00
?>