Files
PrestaShop/tools/smarty/plugins/block.php.php
aFolletete 10445ad61d // 1.5 branche creation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@5881 b9a71923-0436-4b27-9f14-aed3839534dd
2011-04-12 18:24:40 +00:00

27 lines
589 B
PHP

<?php
/**
* Smarty plugin to execute PHP code
*
* @package Smarty
* @subpackage PluginsBlock
* @author Uwe Tews
*/
/**
* Smarty {php}{/php} block plugin
*
* @param string $content contents of the block
* @param object $template template object
* @param boolean $ &$repeat repeat flag
* @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 '';
}
?>