mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 09:18:54 +00:00
24 lines
540 B
PHP
Executable File
24 lines
540 B
PHP
Executable File
<?php
|
|
/**
|
|
* Smarty plugin to execute PHP code.
|
|
*
|
|
* @author Uwe Tews
|
|
*/
|
|
/**
|
|
* Smarty {php}{/php} block plugin.
|
|
*
|
|
* @param string $content contents of the block
|
|
* @param object $template template object
|
|
* @param bool $ &$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 '';
|
|
}
|