diff --git a/change_log.txt b/change_log.txt index 39b4392c..321933ef 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== +15.7.2013 +- update code generated by PSR-2 standards fixer which introduced PHP 5.4 incompatibilities of 14.7.2013 + 14.7.2013 - bugfix increase of internal maximum parser stacksize to allow more complex tag code {forum topic 24426} - update for PHP 5.4 compatibility diff --git a/demo/plugins/cacheresource.mysql.php b/demo/plugins/cacheresource.mysql.php index 29a24176..73771e7b 100644 --- a/demo/plugins/cacheresource.mysql.php +++ b/demo/plugins/cacheresource.mysql.php @@ -35,7 +35,7 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom public function __construct() { try { - $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty", "smarty"); + $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty"); } catch (PDOException $e) { throw new SmartyException('Mysql Resource failed: ' . $e->getMessage()); } diff --git a/demo/plugins/resource.mysql.php b/demo/plugins/resource.mysql.php index 909059b3..af78394c 100644 --- a/demo/plugins/resource.mysql.php +++ b/demo/plugins/resource.mysql.php @@ -32,7 +32,7 @@ class Smarty_Resource_Mysql extends Smarty_Resource_Custom public function __construct() { try { - $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty", "smarty"); + $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty"); } catch (PDOException $e) { throw new SmartyException('Mysql Resource failed: ' . $e->getMessage()); } diff --git a/demo/plugins/resource.mysqls.php b/demo/plugins/resource.mysqls.php index a7d5be95..d16ad4b5 100644 --- a/demo/plugins/resource.mysqls.php +++ b/demo/plugins/resource.mysqls.php @@ -33,7 +33,7 @@ class Smarty_Resource_Mysqls extends Smarty_Resource_Custom public function __construct() { try { - $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty", "smarty"); + $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty"); } catch (PDOException $e) { throw new SmartyException('Mysql Resource failed: ' . $e->getMessage()); } diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 482c45a3..030c3392 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -167,38 +167,38 @@ class Smarty extends Smarty_Internal_TemplateBase /** * assigned global tpl vars */ - static $global_tpl_vars = array(); + public static $global_tpl_vars = array(); /** * error handler returned by set_error_hanlder() in Smarty::muteExpectedErrors() */ - static $_previous_error_handler = null; + public static $_previous_error_handler = null; /** * contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors() */ - static $_muted_directories = array(); + public static $_muted_directories = array(); /** * Flag denoting if Multibyte String functions are available */ - static $_MBSTRING = SMARTY_MBSTRING; + public static $_MBSTRING = SMARTY_MBSTRING; /** * The character set to adhere to (e.g. "UTF-8") */ - static $_CHARSET = SMARTY_RESOURCE_CHAR_SET; + public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET; /** * The date format to be used internally * (accepts date() and strftime()) */ - static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT; + public static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT; /** * Flag denoting if PCRE should run in UTF-8 mode */ - static $_UTF8_MODIFIER = 'u'; + public static $_UTF8_MODIFIER = 'u'; /** * Flag denoting if operating system is windows */ - static $_IS_WINDOWS = false; + public static $_IS_WINDOWS = false; /**#@+ * variables @@ -564,7 +564,7 @@ class Smarty extends Smarty_Internal_TemplateBase * global internal smarty vars * @var array */ - static $_smarty_vars = array(); + public static $_smarty_vars = array(); /** * start time for execution time calculation * @var int @@ -1406,7 +1406,7 @@ class Smarty extends Smarty_Internal_TemplateBase * @param integer $errno Error level * @return boolean */ - static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext) + public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext) { $_is_muted_directory = false; @@ -1458,7 +1458,7 @@ class Smarty extends Smarty_Internal_TemplateBase * * @return void */ - static function muteExpectedErrors() + public static function muteExpectedErrors() { /* error muting is done because some people implemented custom error_handlers using @@ -1490,7 +1490,7 @@ class Smarty extends Smarty_Internal_TemplateBase * * @return void */ - static function unmuteExpectedErrors() + public static function unmuteExpectedErrors() { restore_error_handler(); } @@ -1510,7 +1510,7 @@ if (Smarty::$_CHARSET !== 'UTF-8') { */ class SmartyException extends Exception { - static $escape = true; + public static $escape = true; public function __construct($message) { $this->message = self::$escape ? htmlentities($message) : $message; @@ -1531,7 +1531,7 @@ class SmartyCompilerException extends SmartyException function smartyAutoload($class) { $_class = strtolower($class); - $_classes = array( + static $_classes = array( 'smarty_config_source' => true, 'smarty_config_compiled' => true, 'smarty_security' => true, diff --git a/libs/sysplugins/smarty_internal_compile_block.php b/libs/sysplugins/smarty_internal_compile_block.php index c3177c3c..53ab31bb 100644 --- a/libs/sysplugins/smarty_internal_compile_block.php +++ b/libs/sysplugins/smarty_internal_compile_block.php @@ -160,7 +160,7 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase * @param string $_name optional name of child block * @return string compiled code of schild block */ - static function compileChildBlock($compiler, $_name = null) + public static function compileChildBlock($compiler, $_name = null) { $_output = ''; // if called by {$smarty.block.child} we must search the name of enclosing {block} diff --git a/libs/sysplugins/smarty_internal_configfilelexer.php b/libs/sysplugins/smarty_internal_configfilelexer.php index 93b74e7a..4bc2b9e8 100644 --- a/libs/sysplugins/smarty_internal_configfilelexer.php +++ b/libs/sysplugins/smarty_internal_configfilelexer.php @@ -33,7 +33,7 @@ class Smarty_Internal_Configfilelexer $this->smarty = $smarty; $this->mbstring_overload = ini_get('mbstring.func_overload') & 2; } - static function &instance($new_instance = null) + public static function &instance($new_instance = null) { static $instance = null; if (isset($new_instance) && is_object($new_instance)) diff --git a/libs/sysplugins/smarty_internal_configfileparser.php b/libs/sysplugins/smarty_internal_configfileparser.php index be8d420c..99cd2e18 100644 --- a/libs/sysplugins/smarty_internal_configfileparser.php +++ b/libs/sysplugins/smarty_internal_configfileparser.php @@ -102,7 +102,7 @@ class Smarty_Internal_Configfileparser#line 79 "smarty_internal_configfileparser $this->smarty = $compiler->smarty; $this->compiler = $compiler; } - static function &instance($new_instance = null) + public static function &instance($new_instance = null) { static $instance = null; if (isset($new_instance) && is_object($new_instance)) @@ -219,7 +219,7 @@ static public $yy_action = array( /* 20 */ 15, 17, 23, 18, 27, 26, 4, 5, 6, 32, /* 30 */ 2, 11, 28, 22, 16, 9, 7, 10, ); - static $yy_lookahead = array( + public static $yy_lookahead = array( /* 0 */ 7, 8, 9, 10, 11, 12, 5, 27, 15, 16, /* 10 */ 20, 21, 23, 23, 17, 18, 13, 14, 17, 18, /* 20 */ 15, 2, 17, 4, 25, 26, 6, 3, 3, 14, @@ -227,17 +227,17 @@ static public $yy_action = array( ); const YY_SHIFT_USE_DFLT = -8; const YY_SHIFT_MAX = 19; - static $yy_shift_ofst = array( + public static $yy_shift_ofst = array( /* 0 */ -8, 1, 1, 1, -7, -3, -3, 30, -8, -8, /* 10 */ -8, 19, 5, 3, 15, 16, 24, 25, 32, 20, ); const YY_REDUCE_USE_DFLT = -21; const YY_REDUCE_MAX = 10; - static $yy_reduce_ofst = array( + public static $yy_reduce_ofst = array( /* 0 */ -10, -1, -1, -1, -20, 10, 12, 8, 14, 7, /* 10 */ -11, ); - static $yyExpectedTokens = array( + public static $yyExpectedTokens = array( /* 0 */ array(), /* 1 */ array(5, 17, 18, ), /* 2 */ array(5, 17, 18, ), @@ -275,7 +275,7 @@ static public $yy_action = array( /* 34 */ array(), /* 35 */ array(), ); - static $yy_default = array( + public static $yy_default = array( /* 0 */ 44, 37, 41, 40, 58, 58, 58, 36, 39, 44, /* 10 */ 44, 58, 58, 58, 58, 58, 58, 58, 58, 58, /* 20 */ 55, 54, 57, 56, 50, 45, 43, 42, 38, 46, @@ -288,9 +288,9 @@ static public $yy_action = array( const YYERRORSYMBOL = 19; const YYERRSYMDT = 'yy0'; const YYFALLBACK = 0; - static $yyFallback = array( + public static $yyFallback = array( ); - static function Trace($TraceFILE, $zTracePrompt) + public static function Trace($TraceFILE, $zTracePrompt) { if (!$TraceFILE) { $zTracePrompt = 0; @@ -301,14 +301,14 @@ static public $yy_action = array( self::$yyTracePrompt = $zTracePrompt; } - static function PrintTrace() + public static function PrintTrace() { self::$yyTraceFILE = fopen('php://output', 'w'); self::$yyTracePrompt = '
'; } - static $yyTraceFILE; - static $yyTracePrompt; + public static $yyTraceFILE; + public static $yyTracePrompt; public $yyidx; /* Index of top element in stack */ public $yyerrcnt; /* Shifts left before out of the error */ public $yystack = array(); /* The parser's stack */ @@ -323,7 +323,7 @@ static public $yy_action = array( 'section', 'newline', 'var', 'value', ); - static $yyRuleName = array( + public static $yyRuleName = array( /* 0 */ "start ::= global_vars sections", /* 1 */ "global_vars ::= var_list", /* 2 */ "sections ::= sections section", @@ -360,7 +360,7 @@ static public $yy_action = array( } } - static function yy_destructor($yymajor, $yypminor) + public static function yy_destructor($yymajor, $yypminor) { switch ($yymajor) { default: break; /* If no destructor action specified: do nothing */ @@ -633,7 +633,7 @@ static public $yy_action = array( } } - static $yyRuleInfo = array( + public static $yyRuleInfo = array( array( 'lhs' => 20, 'rhs' => 2 ), array( 'lhs' => 21, 'rhs' => 1 ), array( 'lhs' => 22, 'rhs' => 2 ), @@ -658,7 +658,7 @@ static public $yy_action = array( array( 'lhs' => 25, 'rhs' => 3 ), ); - static $yyReduceMap = array( + public static $yyReduceMap = array( 0 => 0, 2 => 0, 3 => 0, diff --git a/libs/sysplugins/smarty_internal_debug.php b/libs/sysplugins/smarty_internal_debug.php index 50a0a7f7..ccb6a5fc 100644 --- a/libs/sysplugins/smarty_internal_debug.php +++ b/libs/sysplugins/smarty_internal_debug.php @@ -22,14 +22,14 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data * * @var array */ - static $template_data = array(); + public static $template_data = array(); /** * Start logging of compile time * * @param object $template */ - static function start_compile($template) + public static function start_compile($template) { $key = self::get_key($template); self::$template_data[$key]['start_time'] = microtime(true); @@ -40,7 +40,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data * * @param object $template */ - static function end_compile($template) + public static function end_compile($template) { $key = self::get_key($template); self::$template_data[$key]['compile_time'] += microtime(true) - self::$template_data[$key]['start_time']; @@ -51,7 +51,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data * * @param object $template */ - static function start_render($template) + public static function start_render($template) { $key = self::get_key($template); self::$template_data[$key]['start_time'] = microtime(true); @@ -62,7 +62,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data * * @param object $template */ - static function end_render($template) + public static function end_render($template) { $key = self::get_key($template); self::$template_data[$key]['render_time'] += microtime(true) - self::$template_data[$key]['start_time']; @@ -73,7 +73,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data * * @param object $template cached template */ - static function start_cache($template) + public static function start_cache($template) { $key = self::get_key($template); self::$template_data[$key]['start_time'] = microtime(true); @@ -84,7 +84,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data * * @param object $template cached template */ - static function end_cache($template) + public static function end_cache($template) { $key = self::get_key($template); self::$template_data[$key]['cache_time'] += microtime(true) - self::$template_data[$key]['start_time']; @@ -95,7 +95,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data * * @param Smarty_Internal_Template|Smarty $obj object to debug */ - static function display_debug($obj) + public static function display_debug($obj) { // prepare information of assigned variables $ptr = self::get_debug_vars($obj); @@ -141,7 +141,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data * @param Smarty_Internal_Template|Smarty_Data $obj object to debug * @return StdClass */ - static function get_debug_vars($obj) + public static function get_debug_vars($obj) { $config_vars = $obj->config_vars; $tpl_vars = array(); diff --git a/libs/sysplugins/smarty_internal_filter_handler.php b/libs/sysplugins/smarty_internal_filter_handler.php index 8576e7a4..3f25883c 100644 --- a/libs/sysplugins/smarty_internal_filter_handler.php +++ b/libs/sysplugins/smarty_internal_filter_handler.php @@ -30,7 +30,7 @@ class Smarty_Internal_Filter_Handler * @param Smarty_Internal_Template $template template object * @return string the filtered content */ - static function runFilter($type, $content, Smarty_Internal_Template $template) + public static function runFilter($type, $content, Smarty_Internal_Template $template) { $output = $content; // loop over autoload filters of specified type diff --git a/libs/sysplugins/smarty_internal_function_call_handler.php b/libs/sysplugins/smarty_internal_function_call_handler.php index b5981926..9c0ba5ae 100644 --- a/libs/sysplugins/smarty_internal_function_call_handler.php +++ b/libs/sysplugins/smarty_internal_function_call_handler.php @@ -25,7 +25,7 @@ class Smarty_Internal_Function_Call_Handler * @param string $_hash nocache hash value * @param bool $_nocache nocache flag */ - static function call($_name, Smarty_Internal_Template $_template, $_params, $_hash, $_nocache) + public static function call($_name, Smarty_Internal_Template $_template, $_params, $_hash, $_nocache) { if ($_nocache) { $_function = "smarty_template_function_{$_name}_nocache"; diff --git a/libs/sysplugins/smarty_internal_get_include_path.php b/libs/sysplugins/smarty_internal_get_include_path.php index 1efd4d99..4638a174 100644 --- a/libs/sysplugins/smarty_internal_get_include_path.php +++ b/libs/sysplugins/smarty_internal_get_include_path.php @@ -21,7 +21,7 @@ class Smarty_Internal_Get_Include_Path * @param string $filepath filepath * @return string|boolean full filepath or false */ - static function getIncludePath($filepath) + public static function getIncludePath($filepath) { static $_include_path = null; diff --git a/libs/sysplugins/smarty_internal_nocache_insert.php b/libs/sysplugins/smarty_internal_nocache_insert.php index dc73b9b9..5b378409 100644 --- a/libs/sysplugins/smarty_internal_nocache_insert.php +++ b/libs/sysplugins/smarty_internal_nocache_insert.php @@ -27,7 +27,7 @@ class Smarty_Internal_Nocache_Insert * @param string $_assign optional variable name * @return string compiled code */ - static function compile($_function, $_attr, $_template, $_script, $_assign = null) + public static function compile($_function, $_attr, $_template, $_script, $_assign = null) { $_output = 'current_buffer = $this->root_buffer = new _smarty_template_buffer($this); } - static function escape_start_tag($tag_text) + public static function escape_start_tag($tag_text) { $tag = preg_replace('/\A<\?(.*)\z/', '<?\1', $tag_text, -1 , $count); //Escape tag return $tag; } - static function escape_end_tag($tag_text) + public static function escape_end_tag($tag_text) { return '?>'; } @@ -469,7 +469,7 @@ static public $yy_action = array( /* 2370 */ 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, /* 2380 */ 329, 329, 206, ); - static $yy_lookahead = array( + public static $yy_lookahead = array( /* 0 */ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, /* 10 */ 12, 13, 16, 98, 16, 19, 17, 17, 113, 114, /* 20 */ 22, 23, 16, 97, 18, 19, 28, 112, 29, 29, @@ -712,7 +712,7 @@ static public $yy_action = array( ); const YY_SHIFT_USE_DFLT = -5; const YY_SHIFT_MAX = 256; - static $yy_shift_ofst = array( + public static $yy_shift_ofst = array( /* 0 */ -2, 1271, 1157, 1157, 1271, 1157, 1328, 1328, 1100, 1157, /* 10 */ 1157, 1157, 1157, 1157, 1157, 1157, 1499, 1157, 1157, 1157, /* 20 */ 1157, 1157, 1556, 1157, 1157, 1157, 1157, 1157, 1157, 1157, @@ -742,7 +742,7 @@ static public $yy_action = array( ); const YY_REDUCE_USE_DFLT = -96; const YY_REDUCE_MAX = 208; - static $yy_reduce_ofst = array( + public static $yy_reduce_ofst = array( /* 0 */ 5, -7, 489, 566, 1630, 856, 70, 1117, 1865, 1854, /* 10 */ 1831, 1812, 1891, 1902, 1977, 1951, 1940, 1921, 1789, 1762, /* 20 */ 1402, 1345, 1288, 1231, 1459, 1516, 1751, 1728, 1709, 1573, @@ -765,7 +765,7 @@ static public $yy_action = array( /* 190 */ 597, 552, 552, 596, 594, 594, 594, 599, -33, 356, /* 200 */ 296, 360, -33, 356, 395, 404, 376, 416, 368, ); - static $yyExpectedTokens = array( + public static $yyExpectedTokens = array( /* 0 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 22, 23, 28, 32, 33, 34, ), /* 1 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 2 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), @@ -1158,7 +1158,7 @@ static public $yy_action = array( /* 389 */ array(), /* 390 */ array(), ); - static $yy_default = array( + public static $yy_default = array( /* 0 */ 394, 578, 549, 549, 595, 549, 595, 595, 595, 595, /* 10 */ 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, /* 20 */ 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, @@ -1207,9 +1207,9 @@ static public $yy_action = array( const YYERRORSYMBOL = 81; const YYERRSYMDT = 'yy0'; const YYFALLBACK = 0; - static $yyFallback = array( + public static $yyFallback = array( ); - static function Trace($TraceFILE, $zTracePrompt) + public static function Trace($TraceFILE, $zTracePrompt) { if (!$TraceFILE) { $zTracePrompt = 0; @@ -1220,14 +1220,14 @@ static public $yy_action = array( self::$yyTracePrompt = $zTracePrompt; } - static function PrintTrace() + public static function PrintTrace() { self::$yyTraceFILE = fopen('php://output', 'w'); self::$yyTracePrompt = '
'; } - static $yyTraceFILE; - static $yyTracePrompt; + public static $yyTraceFILE; + public static $yyTracePrompt; public $yyidx; /* Index of top element in stack */ public $yyerrcnt; /* Shifts left before out of the error */ public $yystack = array(); /* The parser's stack */ @@ -1266,7 +1266,7 @@ static public $yy_action = array( 'arrayelement', 'doublequoted', 'doublequotedcontent', ); - static $yyRuleName = array( + public static $yyRuleName = array( /* 0 */ "start ::= template", /* 1 */ "template ::= template_element", /* 2 */ "template ::= template template_element", @@ -1485,7 +1485,7 @@ static public $yy_action = array( } } - static function yy_destructor($yymajor, $yypminor) + public static function yy_destructor($yymajor, $yypminor) { switch ($yymajor) { default: break; /* If no destructor action specified: do nothing */ @@ -1758,7 +1758,7 @@ static public $yy_action = array( } } - static $yyRuleInfo = array( + public static $yyRuleInfo = array( array( 'lhs' => 82, 'rhs' => 1 ), array( 'lhs' => 83, 'rhs' => 1 ), array( 'lhs' => 83, 'rhs' => 2 ), @@ -1965,7 +1965,7 @@ static public $yy_action = array( array( 'lhs' => 96, 'rhs' => 0 ), ); - static $yyReduceMap = array( + public static $yyReduceMap = array( 0 => 0, 1 => 1, 2 => 1, diff --git a/libs/sysplugins/smarty_internal_utility.php b/libs/sysplugins/smarty_internal_utility.php index a62ea687..140fdaf7 100644 --- a/libs/sysplugins/smarty_internal_utility.php +++ b/libs/sysplugins/smarty_internal_utility.php @@ -57,7 +57,7 @@ class Smarty_Internal_Utility * @param Smarty $smarty Smarty instance * @return integer number of template files compiled */ - static function compileAllTemplates($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty) + public static function compileAllTemplates($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty) { // switch off time limit if (function_exists('set_time_limit')) { @@ -121,7 +121,7 @@ class Smarty_Internal_Utility * @param Smarty $smarty Smarty instance * @return integer number of config files compiled */ - static function compileAllConfig($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty) + public static function compileAllConfig($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty) { // switch off time limit if (function_exists('set_time_limit')) { @@ -180,7 +180,7 @@ class Smarty_Internal_Utility * @param Smarty $smarty Smarty instance * @return integer number of template files deleted */ - static function clearCompiledTemplate($resource_name, $compile_id, $exp_time, Smarty $smarty) + public static function clearCompiledTemplate($resource_name, $compile_id, $exp_time, Smarty $smarty) { $_compile_dir = $smarty->getCompileDir(); $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null; @@ -275,7 +275,7 @@ class Smarty_Internal_Utility * @param Smarty_Internal_Template $templae template object * @return array of tag/attributes */ - static function getTags(Smarty_Internal_Template $template) + public static function getTags(Smarty_Internal_Template $template) { $template->smarty->get_used_tags = true; $template->compileTemplateSource(); @@ -292,7 +292,7 @@ class Smarty_Internal_Utility * @param array $errors array to push results into rather than outputting them * @return bool status, true if everything is fine, false else */ - static function testInstall(Smarty $smarty, &$errors=null) + public static function testInstall(Smarty $smarty, &$errors=null) { $status = true; diff --git a/libs/sysplugins/smarty_internal_write_file.php b/libs/sysplugins/smarty_internal_write_file.php index 42ccf8a0..a62fa947 100644 --- a/libs/sysplugins/smarty_internal_write_file.php +++ b/libs/sysplugins/smarty_internal_write_file.php @@ -23,7 +23,7 @@ class Smarty_Internal_Write_File * @param Smarty $smarty smarty instance * @return boolean true */ - static function writeFile($_filepath, $_contents, Smarty $smarty) + public static function writeFile($_filepath, $_contents, Smarty $smarty) { $_error_reporting = error_reporting(); error_reporting($_error_reporting & ~E_NOTICE & ~E_WARNING); diff --git a/libs/sysplugins/smarty_resource.php b/libs/sysplugins/smarty_resource.php index d08eed5d..63b63b43 100644 --- a/libs/sysplugins/smarty_resource.php +++ b/libs/sysplugins/smarty_resource.php @@ -21,17 +21,17 @@ abstract class Smarty_Resource * cache for Smarty_Template_Source instances * @var array */ - static $sources = array(); + public static $sources = array(); /** * cache for Smarty_Template_Compiled instances * @var array */ - static $compileds = array(); + public static $compileds = array(); /** * cache for Smarty_Resource instances * @var array */ - static $resources = array(); + public static $resources = array(); /** * resource types provided by the core * @var array @@ -372,7 +372,7 @@ abstract class Smarty_Resource * @param string $type name of the resource * @return Smarty_Resource Resource Handler */ - static function load(Smarty $smarty, $type) + public static function load(Smarty $smarty, $type) { // try smarty's cache if (isset($smarty->_resource_handlers[$type])) { @@ -490,7 +490,7 @@ abstract class Smarty_Resource * @param string $template_resource template_resource to extracate resource handler and name of * @return string unique resource name */ - static function getUniqueTemplateName($smarty, $template_resource) + public static function getUniqueTemplateName($smarty, $template_resource) { self::parseResourceName($template_resource, $smarty->default_resource_type, $name, $type); // TODO: optimize for Smarty's internal resource types @@ -509,7 +509,7 @@ abstract class Smarty_Resource * @param string $template_resource resource identifier * @return Smarty_Template_Source Source Object */ - static function source(Smarty_Internal_Template $_template=null, Smarty $smarty=null, $template_resource=null) + public static function source(Smarty_Internal_Template $_template=null, Smarty $smarty=null, $template_resource=null) { if ($_template) { $smarty = $_template->smarty; @@ -546,7 +546,7 @@ abstract class Smarty_Resource * @param Smarty_Internal_Config $_config config object * @return Smarty_Config_Source Source Object */ - static function config(Smarty_Internal_Config $_config) + public static function config(Smarty_Internal_Config $_config) { static $_incompatible_resources = array('eval' => true, 'string' => true, 'extends' => true, 'php' => true); $config_resource = $_config->config_resource;