You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
589 B
PHTML
27 lines
589 B
PHTML
14 years ago
|
<?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 '';
|
||
|
}
|
||
|
|
||
|
?>
|