diff --git a/change_log.txt b/change_log.txt index 982a7e8e2..f82c9ee46 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,11 @@ -===== 3.1.33-dev-4 ===== +===== 3.1.33-dev-6 ===== +19.08.2018 + - fix PSR-2 coding standards and PHPDoc blocks https://github.com/smarty-php/smarty/pull/452 + https://github.com/smarty-php/smarty/pull/475 + https://github.com/smarty-php/smarty/pull/473 + - bugfix PHP5.2 compatibility https://github.com/smarty-php/smarty/pull/472 + +===== 3.1.33-dev-4 ===== 17.05.2018 - bugfix strip-block produces different output in Smarty v3.1.32 https://github.com/smarty-php/smarty/issues/436 - bugfix Smarty::compileAllTemplates ignores `$extension` parameter https://github.com/smarty-php/smarty/issues/437 diff --git a/lexer/smarty_internal_configfilelexer.plex b/lexer/smarty_internal_configfilelexer.plex index 67887a4a1..5e61f3389 100644 --- a/lexer/smarty_internal_configfilelexer.plex +++ b/lexer/smarty_internal_configfilelexer.plex @@ -124,7 +124,7 @@ class Smarty_Internal_Configfilelexer * @param string $data template source * @param Smarty_Internal_Config_File_Compiler $compiler */ - function __construct($data, Smarty_Internal_Config_File_Compiler $compiler) + public function __construct($data, Smarty_Internal_Config_File_Compiler $compiler) { $this->data = $data . "\n"; //now all lines are \n-terminated $this->dataLength = strlen($data); diff --git a/lexer/smarty_internal_configfileparser.y b/lexer/smarty_internal_configfileparser.y index f5e707372..c981b58e9 100644 --- a/lexer/smarty_internal_configfileparser.y +++ b/lexer/smarty_internal_configfileparser.y @@ -89,7 +89,7 @@ class Smarty_Internal_Configfileparser * @param Smarty_Internal_Configfilelexer $lex * @param Smarty_Internal_Config_File_Compiler $compiler */ - function __construct(Smarty_Internal_Configfilelexer $lex, Smarty_Internal_Config_File_Compiler $compiler) + public function __construct(Smarty_Internal_Configfilelexer $lex, Smarty_Internal_Config_File_Compiler $compiler) { $this->lex = $lex; $this->smarty = $compiler->smarty; diff --git a/lexer/smarty_internal_templatelexer.plex b/lexer/smarty_internal_templatelexer.plex index 52ee2d7bb..64a393109 100644 --- a/lexer/smarty_internal_templatelexer.plex +++ b/lexer/smarty_internal_templatelexer.plex @@ -215,7 +215,7 @@ class Smarty_Internal_Templatelexer * @param string $source template source * @param Smarty_Internal_TemplateCompilerBase $compiler */ - function __construct($source, Smarty_Internal_TemplateCompilerBase $compiler) + public function __construct($source, Smarty_Internal_TemplateCompilerBase $compiler) { $this->data = $source; $this->dataLength = strlen($this->data); diff --git a/lexer/smarty_internal_templateparser.y b/lexer/smarty_internal_templateparser.y index d53cdf2dc..8fcd5f34d 100644 --- a/lexer/smarty_internal_templateparser.y +++ b/lexer/smarty_internal_templateparser.y @@ -147,7 +147,7 @@ class Smarty_Internal_Templateparser * @param Smarty_Internal_Templatelexer $lex * @param Smarty_Internal_TemplateCompilerBase $compiler */ - function __construct(Smarty_Internal_Templatelexer $lex, Smarty_Internal_TemplateCompilerBase $compiler) + public function __construct(Smarty_Internal_Templatelexer $lex, Smarty_Internal_TemplateCompilerBase $compiler) { $this->lex = $lex; $this->compiler = $compiler; diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 1352d8154..a0e5fbd4f 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -112,7 +112,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.33-dev-5'; + const SMARTY_VERSION = '3.1.33-dev-6'; /** * define variable scopes */ @@ -166,133 +166,157 @@ class Smarty extends Smarty_Internal_TemplateBase const PLUGIN_COMPILER = 'compiler'; const PLUGIN_MODIFIER = 'modifier'; const PLUGIN_MODIFIERCOMPILER = 'modifiercompiler'; + /** * assigned global tpl vars */ public static $global_tpl_vars = array(); + /** * Flag denoting if Multibyte String functions are available */ public static $_MBSTRING = SMARTY_MBSTRING; + /** * The character set to adhere to (e.g. "UTF-8") */ public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET; + /** * The date format to be used internally * (accepts date() and strftime()) */ public static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT; + /** * Flag denoting if PCRE should run in UTF-8 mode */ public static $_UTF8_MODIFIER = 'u'; + /** * Flag denoting if operating system is windows */ public static $_IS_WINDOWS = false; + /** * auto literal on delimiters with whitespace * * @var boolean */ public $auto_literal = true; + /** * display error on not assigned variables * * @var boolean */ public $error_unassigned = false; + /** * look up relative file path in include_path * * @var boolean */ public $use_include_path = false; + /** * flag if template_dir is normalized * * @var bool */ public $_templateDirNormalized = false; + /** * joined template directory string used in cache keys * * @var string */ public $_joined_template_dir = null; + /** * flag if config_dir is normalized * * @var bool */ public $_configDirNormalized = false; + /** * joined config directory string used in cache keys * * @var string */ public $_joined_config_dir = null; + /** * default template handler * * @var callable */ public $default_template_handler_func = null; + /** * default config handler * * @var callable */ public $default_config_handler_func = null; + /** * default plugin handler * * @var callable */ public $default_plugin_handler_func = null; + /** * flag if template_dir is normalized * * @var bool */ public $_compileDirNormalized = false; + /** * flag if plugins_dir is normalized * * @var bool */ public $_pluginsDirNormalized = false; + /** * flag if template_dir is normalized * * @var bool */ public $_cacheDirNormalized = false; + /** * force template compiling? * * @var boolean */ public $force_compile = false; - /** - * use sub dirs for compiled/cached files? - * - * @var boolean - */ + + /** + * use sub dirs for compiled/cached files? + * + * @var boolean + */ public $use_sub_dirs = false; + /** * allow ambiguous resources (that are made unique by the resource handler) * * @var boolean */ public $allow_ambiguous_resources = false; + /** * merge compiled includes * * @var boolean */ public $merge_compiled_includes = false; + /* * flag for behaviour when extends: resource and {extends} tag are used simultaneous * if false disable execution of {extends} in templates called by extends resource. @@ -301,30 +325,35 @@ class Smarty extends Smarty_Internal_TemplateBase * @var boolean */ public $extends_recursion = true; + /** * force cache file creation * * @var boolean */ public $force_cache = false; + /** * template left-delimiter * * @var string */ public $left_delimiter = "{"; + /** * template right-delimiter * * @var string */ public $right_delimiter = "}"; + /** * array of strings which shall be treated as literal by compiler * * @var array string */ public $literals = array(); + /** * class name * This should be instance of Smarty_Security. @@ -333,24 +362,28 @@ class Smarty extends Smarty_Internal_TemplateBase * @see Smarty_Security */ public $security_class = 'Smarty_Security'; + /** * implementation of security class * * @var Smarty_Security */ public $security_policy = null; + /** * controls handling of PHP-blocks * * @var integer */ public $php_handling = self::PHP_PASSTHRU; + /** * controls if the php template file resource is allowed * * @var bool */ public $allow_php_templates = false; + /** * debug mode * Setting this to true enables the debug-console. @@ -358,6 +391,7 @@ class Smarty extends Smarty_Internal_TemplateBase * @var boolean */ public $debugging = false; + /** * This determines if debugging is enable-able from the browser. *