mirror of
https://github.com/smarty-php/smarty.git
synced 2025-12-03 15:59:32 +01:00
- update for PHP 5.4 compatibility
- reformat source to PSR-2 standard
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
*/
|
||||
class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase {
|
||||
|
||||
class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase
|
||||
{
|
||||
/**
|
||||
* Attribute definition: Overwrites base class.
|
||||
*
|
||||
@@ -42,8 +42,8 @@ class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase {
|
||||
/**
|
||||
* Compiles code for the {include_php} tag
|
||||
*
|
||||
* @param array $args array with attributes from parser
|
||||
* @param object $compiler compiler object
|
||||
* @param array $args array with attributes from parser
|
||||
* @param object $compiler compiler object
|
||||
* @return string compiled code
|
||||
*/
|
||||
public function compile($args, $compiler)
|
||||
@@ -68,7 +68,7 @@ class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase {
|
||||
$_dir = $compiler->smarty->trusted_dir;
|
||||
}
|
||||
if (!empty($_dir)) {
|
||||
foreach((array)$_dir as $_script_dir) {
|
||||
foreach ((array) $_dir as $_script_dir) {
|
||||
$_script_dir = rtrim($_script_dir, '/\\') . DS;
|
||||
if (file_exists($_script_dir . $_file)) {
|
||||
$_filepath = $_script_dir . $_file;
|
||||
@@ -104,5 +104,3 @@ class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user