mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-17 22:45:20 +02:00
change linefeed style to native on all files
This commit is contained in:
@@ -1,39 +1,39 @@
|
||||
<?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 $smarty Smarty object
|
||||
* @param boolean $ &$repeat repeat flag
|
||||
* @param object $template template object
|
||||
* @return string content re-formatted
|
||||
*/
|
||||
function smarty_block_php($params, $content, $smarty, &$repeat, $template)
|
||||
{
|
||||
// get security settings
|
||||
if ($template->security && isset($smarty->security_handler)) {
|
||||
$sec_obj = $smarty->security_policy;
|
||||
} else {
|
||||
$sec_obj = $smarty;
|
||||
}
|
||||
if (is_null($content)) {
|
||||
if (!$smarty->allow_php_tag) {
|
||||
trigger_error("{php} is deprecated, set allow_php_tag = true to enable", E_USER_WARNING);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
eval($content);
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
?>
|
||||
<?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 $smarty Smarty object
|
||||
* @param boolean $ &$repeat repeat flag
|
||||
* @param object $template template object
|
||||
* @return string content re-formatted
|
||||
*/
|
||||
function smarty_block_php($params, $content, $smarty, &$repeat, $template)
|
||||
{
|
||||
// get security settings
|
||||
if ($template->security && isset($smarty->security_handler)) {
|
||||
$sec_obj = $smarty->security_policy;
|
||||
} else {
|
||||
$sec_obj = $smarty;
|
||||
}
|
||||
if (is_null($content)) {
|
||||
if (!$smarty->allow_php_tag) {
|
||||
trigger_error("{php} is deprecated, set allow_php_tag = true to enable", E_USER_WARNING);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
eval($content);
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user