From 4b3e1eb89d1a61788df0c8f0e93c4dbfbacdbe50 Mon Sep 17 00:00:00 2001 From: "monte.ohrt" Date: Tue, 1 Jul 2014 19:33:25 +0000 Subject: [PATCH 01/22] fix url in comment --- libs/plugins/modifier.escape.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/plugins/modifier.escape.php b/libs/plugins/modifier.escape.php index f2537260..9fdb0702 100644 --- a/libs/plugins/modifier.escape.php +++ b/libs/plugins/modifier.escape.php @@ -12,7 +12,7 @@ * Name: escape
* Purpose: escape string for output * - * @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual) + * @link http://www.smarty.net/docs/en/language.modifier.escape * @author Monte Ohrt * * @param string $string input string From c2bba29216bba214734f98cfdd894d6699f2239c Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Thu, 3 Jul 2014 23:16:23 +0000 Subject: [PATCH 02/22] - bugfix the bufix of 02.06.2014 broke correct handling of child templates with same name but different template folders in extends resource (issue 194 and topic 25099) --- change_log.txt | 5 ++++- libs/sysplugins/smarty_internal_resource_extends.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/change_log.txt b/change_log.txt index 7eb58320..6e7ae7d1 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,7 +1,10 @@ ===== 3.1.20-dev ===== (xx.xx.2014) + 04.07.2014 + - bugfix the bufix of 02.06.2014 broke correct handling of child templates with same name but different template folders in extends resource (issue 194 and topic 25099) + ===== 3.1.19 ===== (06.30.2014) 20.06.2014 - - bugfix template variables could not be passed as paramter in {include} when the include was in a {nocache} section (topic 25131) + - bugfix template variables could not be passed as parameter in {include} when the include was in a {nocache} section (topic 25131) 17.06.2014 - bugfix large template text of some charsets could cause parsing errors (topic 24630) diff --git a/libs/sysplugins/smarty_internal_resource_extends.php b/libs/sysplugins/smarty_internal_resource_extends.php index 2079f2bc..c78dba51 100644 --- a/libs/sysplugins/smarty_internal_resource_extends.php +++ b/libs/sysplugins/smarty_internal_resource_extends.php @@ -44,14 +44,14 @@ class Smarty_Internal_Resource_Extends extends Smarty_Resource throw new SmartyException("Resource type {$s->type} cannot be used with the extends resource type"); } $sources[$s->uid] = $s; - $uid .= $s->filepath; + $uid .= realpath($s->filepath); if ($_template && $_template->smarty->compile_check) { $exists = $exists && $s->exists; } } $source->components = $sources; $source->filepath = $s->filepath; - $source->uid = sha1(realpath($uid)); + $source->uid = sha1($uid); if ($_template && $_template->smarty->compile_check) { $source->timestamp = $s->timestamp; $source->exists = $exists; From 77292d394a98e844266b85bfa56a7bfe4b57947b Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Wed, 16 Jul 2014 18:21:25 +0000 Subject: [PATCH 03/22] - enhancement remove BOM automatically from template source (topic 25161) --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_configfilelexer.php | 3 +++ libs/sysplugins/smarty_internal_templatelexer.php | 3 +++ libs/sysplugins/smarty_internal_templateparser.php | 3 ++- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 6e7ae7d1..fc6703a9 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== 3.1.20-dev ===== (xx.xx.2014) + 16.07.2014 + - enhancement remove BOM automatically from template source (topic 25161) + 04.07.2014 - bugfix the bufix of 02.06.2014 broke correct handling of child templates with same name but different template folders in extends resource (issue 194 and topic 25099) diff --git a/libs/sysplugins/smarty_internal_configfilelexer.php b/libs/sysplugins/smarty_internal_configfilelexer.php index e5019773..d5b50775 100644 --- a/libs/sysplugins/smarty_internal_configfilelexer.php +++ b/libs/sysplugins/smarty_internal_configfilelexer.php @@ -33,6 +33,9 @@ class Smarty_Internal_Configfilelexer self::instance($this); $this->data = $data . "\n"; //now all lines are \n-terminated $this->counter = 0; + if (preg_match('/\xEF\xBB\xBF/', $this->data, $match)) { + $this->counter += strlen($match[0]); + } $this->line = 1; $this->compiler = $compiler; $this->smarty = $compiler->smarty; diff --git a/libs/sysplugins/smarty_internal_templatelexer.php b/libs/sysplugins/smarty_internal_templatelexer.php index a94b5f1e..45583d9b 100644 --- a/libs/sysplugins/smarty_internal_templatelexer.php +++ b/libs/sysplugins/smarty_internal_templatelexer.php @@ -82,6 +82,9 @@ class Smarty_Internal_Templatelexer // $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data); $this->data = $data; $this->counter = 0; + if (preg_match('/\xEF\xBB\xBF/', $this->data, $match)) { + $this->counter += strlen($match[0]); + } $this->line = 1; $this->smarty = $compiler->smarty; $this->compiler = $compiler; diff --git a/libs/sysplugins/smarty_internal_templateparser.php b/libs/sysplugins/smarty_internal_templateparser.php index c781e4c1..d09f16c2 100644 --- a/libs/sysplugins/smarty_internal_templateparser.php +++ b/libs/sysplugins/smarty_internal_templateparser.php @@ -2662,7 +2662,8 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph if (isset(self::$yyExpectedTokens[$nextstate])) { $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]); if (in_array($token, - self::$yyExpectedTokens[$nextstate], true)) { + self::$yyExpectedTokens[$nextstate], true) + ) { $this->yyidx = $yyidx; $this->yystack = $stack; From 071f9af42f061bf36664dd8e944b4e7ec82e3bac Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Wed, 16 Jul 2014 21:40:57 +0000 Subject: [PATCH 04/22] anchor BOM regex to front of file --- libs/sysplugins/smarty_internal_configfilelexer.php | 2 +- libs/sysplugins/smarty_internal_templatelexer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/sysplugins/smarty_internal_configfilelexer.php b/libs/sysplugins/smarty_internal_configfilelexer.php index d5b50775..f0292196 100644 --- a/libs/sysplugins/smarty_internal_configfilelexer.php +++ b/libs/sysplugins/smarty_internal_configfilelexer.php @@ -33,7 +33,7 @@ class Smarty_Internal_Configfilelexer self::instance($this); $this->data = $data . "\n"; //now all lines are \n-terminated $this->counter = 0; - if (preg_match('/\xEF\xBB\xBF/', $this->data, $match)) { + if (preg_match('/^\xEF\xBB\xBF/', $this->data, $match)) { $this->counter += strlen($match[0]); } $this->line = 1; diff --git a/libs/sysplugins/smarty_internal_templatelexer.php b/libs/sysplugins/smarty_internal_templatelexer.php index 45583d9b..5a04d0b6 100644 --- a/libs/sysplugins/smarty_internal_templatelexer.php +++ b/libs/sysplugins/smarty_internal_templatelexer.php @@ -82,7 +82,7 @@ class Smarty_Internal_Templatelexer // $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data); $this->data = $data; $this->counter = 0; - if (preg_match('/\xEF\xBB\xBF/', $this->data, $match)) { + if (preg_match('/^\xEF\xBB\xBF/', $this->data, $match)) { $this->counter += strlen($match[0]); } $this->line = 1; From fcece850629e1ba114d7b028e4ef8b0edd9a28e7 Mon Sep 17 00:00:00 2001 From: "monte.ohrt" Date: Thu, 24 Jul 2014 15:08:32 +0000 Subject: [PATCH 05/22] fix issue where cache dir does not exist -This line, and those below, will be ignored-- M distribution/libs/sysplugins/smarty_internal_cacheresource_file.php --- libs/sysplugins/smarty_internal_cacheresource_file.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/sysplugins/smarty_internal_cacheresource_file.php b/libs/sysplugins/smarty_internal_cacheresource_file.php index 17c6e4bf..b8e99cc6 100644 --- a/libs/sysplugins/smarty_internal_cacheresource_file.php +++ b/libs/sysplugins/smarty_internal_cacheresource_file.php @@ -147,7 +147,10 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null; $_dir_sep = $smarty->use_sub_dirs ? '/' : '^'; $_compile_id_offset = $smarty->use_sub_dirs ? 3 : 0; - $_dir = realpath($smarty->getCacheDir()) . '/'; + if (($_dir = realpath($smarty->getCacheDir())) === false) { + return 0; + } + $_dir .= '/'; $_dir_length = strlen($_dir); if (isset($_cache_id)) { $_cache_id_parts = explode('|', $_cache_id); From 9b06625c74ceedf1faf4e77a014c6a67c3cb2c28 Mon Sep 17 00:00:00 2001 From: "monte.ohrt" Date: Thu, 24 Jul 2014 15:10:55 +0000 Subject: [PATCH 06/22] update changelog --- change_log.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/change_log.txt b/change_log.txt index fc6703a9..c5b996bf 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== 3.1.20-dev ===== (xx.xx.2014) + 24.07.2014 + - bugfix cache clear when cache folder does not exist + 16.07.2014 - enhancement remove BOM automatically from template source (topic 25161) From 9307f0cfcb419196eb6f55323b1b203b8232151e Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Sat, 2 Aug 2014 15:24:28 +0000 Subject: [PATCH 07/22] - bugfix modifier wordwrap did output break string wrong if first word was exceeding lenght with cut = true (topic 25193) --- change_log.txt | 3 +++ libs/plugins/shared.mb_wordwrap.php | 30 ++++++++++------------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/change_log.txt b/change_log.txt index c5b996bf..e0dfdb94 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== 3.1.20-dev ===== (xx.xx.2014) + 02.08.2014 + - bugfix modifier wordwrap did output break string wrong if first word was exceeding lenght with cut = true (topic 25193) + 24.07.2014 - bugfix cache clear when cache folder does not exist diff --git a/libs/plugins/shared.mb_wordwrap.php b/libs/plugins/shared.mb_wordwrap.php index 09f14b9e..31f4acf0 100644 --- a/libs/plugins/shared.mb_wordwrap.php +++ b/libs/plugins/shared.mb_wordwrap.php @@ -28,20 +28,14 @@ if (!function_exists('smarty_mb_wordwrap')) { $length = 0; $t = ''; $_previous = false; + $_space = false; foreach ($tokens as $_token) { $token_length = mb_strlen($_token, Smarty::$_CHARSET); $_tokens = array($_token); if ($token_length > $width) { - // remove last space - $t = mb_substr($t, 0, - 1, Smarty::$_CHARSET); - $_previous = false; - $length = 0; - - if ($cut) { + if ($cut) { $_tokens = preg_split('!(.{' . $width . '})!S' . Smarty::$_UTF8_MODIFIER, $_token, - 1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE); - // broken words go on a new line - $t .= $break; } } @@ -52,27 +46,23 @@ if (!function_exists('smarty_mb_wordwrap')) { if ($length > $width) { // remove space before inserted break - if ($_previous && $token_length < $width) { + if ($_previous) { $t = mb_substr($t, 0, - 1, Smarty::$_CHARSET); } - // add the break before the token - $t .= $break; - $length = $token_length; - - // skip space after inserting a break - if ($_space) { - $length = 0; - continue; + if (!$_space) { + // add the break before the token + if (!empty($t)) { + $t .= $break; + } + $length = $token_length; } } elseif ($token == "\n") { // hard break must reset counters $_previous = 0; $length = 0; - } else { - // remember if we had a space or not - $_previous = $_space; } + $_previous = $_space; // add the token $t .= $token; } From 95760bb5370495d0fca14299e9a6ccb217f09829 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Sat, 2 Aug 2014 15:39:02 +0000 Subject: [PATCH 08/22] fixed spelling --- change_log.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index e0dfdb94..906a1d30 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,6 @@ ===== 3.1.20-dev ===== (xx.xx.2014) 02.08.2014 - - bugfix modifier wordwrap did output break string wrong if first word was exceeding lenght with cut = true (topic 25193) + - bugfix modifier wordwrap did output break string wrong if first word was exceeding length with cut = true (topic 25193) 24.07.2014 - bugfix cache clear when cache folder does not exist From 254230a5d5a9ce72d4cc43a8355982289e779f7c Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Wed, 6 Aug 2014 17:29:53 +0000 Subject: [PATCH 09/22] Correct wording --- INHERITANCE_RELEASE_NOTES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INHERITANCE_RELEASE_NOTES.txt b/INHERITANCE_RELEASE_NOTES.txt index 4a351fa5..a7d285f0 100644 --- a/INHERITANCE_RELEASE_NOTES.txt +++ b/INHERITANCE_RELEASE_NOTES.txt @@ -23,9 +23,9 @@ If $smarty->inheritance_merge_compiled_includes = false; {include} subtemplate w You must now manually merge all {include} subtemplate which do contain {block} tags. This is done by setting the "inline" option. {include file='foo.bar' inline} -1. In case of a variable file name like {include file=$foo inline} you must you the variable in a compile_id $smarty->compile_id = $foo; +1. In case of a variable file name like {include file=$foo inline} you must use the variable in a compile_id $smarty->compile_id = $foo; 2. If you use individual compile_id in {include file='foo.tpl' compile_id=$bar inline} it must be used in the - global compile_id as well $smarty->compile_id = $foo; + global compile_id as well $smarty->compile_id = $bar; 3. If call templates with different template_dir configurations and a parent could same named child template from different folders you must make the folder name part of the compile_id. From 68b83f591d357666eaebede929c132ba995c88e5 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Tue, 30 Sep 2014 23:20:56 +0000 Subject: [PATCH 10/22] - bugfix template resource of inheritance blocks could get invalid if the default resource type is not 'file'(Issue 202) --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_compile_block.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 906a1d30..ef0c3347 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== 3.1.20-dev ===== (xx.xx.2014) + 01.10.2014 + - bugfix template resource of inheritance blocks could get invalid if the default resource type is not 'file'(Issue 202) + 02.08.2014 - bugfix modifier wordwrap did output break string wrong if first word was exceeding length with cut = true (topic 25193) diff --git a/libs/sysplugins/smarty_internal_compile_block.php b/libs/sysplugins/smarty_internal_compile_block.php index 921d807e..52062090 100644 --- a/libs/sysplugins/smarty_internal_compile_block.php +++ b/libs/sysplugins/smarty_internal_compile_block.php @@ -377,7 +377,7 @@ class Smarty_Internal_Compile_Private_Child_Block extends Smarty_Internal_Compil // update template with original template resource of {block} if (trim($_attr['type'], "'") == 'file') { - $compiler->template->template_resource = realpath(trim($_attr['file'], "'")); + $compiler->template->template_resource = 'file:' . realpath(trim($_attr['file'], "'")); } else { $compiler->template->template_resource = trim($_attr['resource'], "'"); } From bbf0e428479a895da59d6b61bcda08c6570b4b41 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Wed, 1 Oct 2014 17:15:24 +0000 Subject: [PATCH 11/22] Fix typo's in Smarty_Security class comment and documentation --- libs/sysplugins/smarty_security.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sysplugins/smarty_security.php b/libs/sysplugins/smarty_security.php index 75d8756e..9f7183bd 100644 --- a/libs/sysplugins/smarty_security.php +++ b/libs/sysplugins/smarty_security.php @@ -79,7 +79,7 @@ class Smarty_Security /** * This is an array of trusted PHP modifiers. * If empty all modifiers are allowed. - * To disable all modifier set $modifiers = null. + * To disable all modifier set $php_modifiers = null. * * @var array */ From 2d3a853bce3602622c5dd6184885c5bcf0e54f19 Mon Sep 17 00:00:00 2001 From: "monte.ohrt" Date: Wed, 1 Oct 2014 18:50:11 +0000 Subject: [PATCH 12/22] move composer file --- composer.json | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..b4e34617 --- /dev/null +++ b/composer.json @@ -0,0 +1,51 @@ +{ + "name": "smarty/smarty", + "type": "library", + "description": "Smarty - the compiling PHP template engine", + "keywords": ["templating"], + "homepage": "http://www.smarty.net", + "license": "LGPL-3.0", + "authors": [ + { + "name": "Monte Ohrt", + "email": "monte@ohrt.com" + }, + { + "name": "Uwe Tews", + "email": "uwe.tews@googlemail.com" + }, + { + "name": "Rodney Rehm", + "email": "rodney.rehm@medialize.de" + } + ], + "support": { + "irc": "irc://irc.freenode.org/smarty", + "issues": "http://code.google.com/p/smarty-php/issues/list", + "forum": "http://www.smarty.net/forums/", + "source": "http://code.google.com/p/smarty-php/source/browse/" + }, + "require": { + "php": ">=5.2" + }, + "autoload": { + "classmap": [ + "distribution/libs/Smarty.class.php", + "distribution/libs/SmartyBC.class.php", + "distribution/libs/sysplugins/smarty_security.php" + ] + }, + "repositories": [ + { + "type": "package", + "package": { + "name": "smarty/smarty", + "version": "3.1.19", + "dist": { + "url": "http://www.smarty.net/files/Smarty-3.1.19.zip", + "type": "zip" + } + } + } + ] +} From f57bb66746fd5799217d23024f3a0e910e2d9702 Mon Sep 17 00:00:00 2001 From: "monte.ohrt" Date: Wed, 1 Oct 2014 18:52:28 +0000 Subject: [PATCH 13/22] revert move --- composer.json | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 composer.json diff --git a/composer.json b/composer.json deleted file mode 100644 index b4e34617..00000000 --- a/composer.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "smarty/smarty", - "type": "library", - "description": "Smarty - the compiling PHP template engine", - "keywords": ["templating"], - "homepage": "http://www.smarty.net", - "license": "LGPL-3.0", - "authors": [ - { - "name": "Monte Ohrt", - "email": "monte@ohrt.com" - }, - { - "name": "Uwe Tews", - "email": "uwe.tews@googlemail.com" - }, - { - "name": "Rodney Rehm", - "email": "rodney.rehm@medialize.de" - } - ], - "support": { - "irc": "irc://irc.freenode.org/smarty", - "issues": "http://code.google.com/p/smarty-php/issues/list", - "forum": "http://www.smarty.net/forums/", - "source": "http://code.google.com/p/smarty-php/source/browse/" - }, - "require": { - "php": ">=5.2" - }, - "autoload": { - "classmap": [ - "distribution/libs/Smarty.class.php", - "distribution/libs/SmartyBC.class.php", - "distribution/libs/sysplugins/smarty_security.php" - ] - }, - "repositories": [ - { - "type": "package", - "package": { - "name": "smarty/smarty", - "version": "3.1.19", - "dist": { - "url": "http://www.smarty.net/files/Smarty-3.1.19.zip", - "type": "zip" - } - } - } - ] -} From 7add711ea0e6eec52c15b25e6ec499cb277b24ca Mon Sep 17 00:00:00 2001 From: "monte.ohrt" Date: Wed, 1 Oct 2014 18:57:34 +0000 Subject: [PATCH 14/22] add composer.json to dist folder --- composer.json | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..b4e34617 --- /dev/null +++ b/composer.json @@ -0,0 +1,51 @@ +{ + "name": "smarty/smarty", + "type": "library", + "description": "Smarty - the compiling PHP template engine", + "keywords": ["templating"], + "homepage": "http://www.smarty.net", + "license": "LGPL-3.0", + "authors": [ + { + "name": "Monte Ohrt", + "email": "monte@ohrt.com" + }, + { + "name": "Uwe Tews", + "email": "uwe.tews@googlemail.com" + }, + { + "name": "Rodney Rehm", + "email": "rodney.rehm@medialize.de" + } + ], + "support": { + "irc": "irc://irc.freenode.org/smarty", + "issues": "http://code.google.com/p/smarty-php/issues/list", + "forum": "http://www.smarty.net/forums/", + "source": "http://code.google.com/p/smarty-php/source/browse/" + }, + "require": { + "php": ">=5.2" + }, + "autoload": { + "classmap": [ + "distribution/libs/Smarty.class.php", + "distribution/libs/SmartyBC.class.php", + "distribution/libs/sysplugins/smarty_security.php" + ] + }, + "repositories": [ + { + "type": "package", + "package": { + "name": "smarty/smarty", + "version": "3.1.19", + "dist": { + "url": "http://www.smarty.net/files/Smarty-3.1.19.zip", + "type": "zip" + } + } + } + ] +} From 2a311c54736eafd7d27d3440e07c9f3b51d3ed69 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Wed, 1 Oct 2014 21:03:40 +0000 Subject: [PATCH 15/22] - bugfix existing child {block} tag must override parent {block} tag append / prepend setting (topic 25259) --- change_log.txt | 1 + libs/sysplugins/smarty_internal_compile_block.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/change_log.txt b/change_log.txt index ef0c3347..d311f55c 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ ===== 3.1.20-dev ===== (xx.xx.2014) 01.10.2014 - bugfix template resource of inheritance blocks could get invalid if the default resource type is not 'file'(Issue 202) + - bugfix existing child {block} tag must override parent {block} tag append / prepend setting (topic 25259) 02.08.2014 - bugfix modifier wordwrap did output break string wrong if first word was exceeding length with cut = true (topic 25193) diff --git a/libs/sysplugins/smarty_internal_compile_block.php b/libs/sysplugins/smarty_internal_compile_block.php index 52062090..8c2fb975 100644 --- a/libs/sysplugins/smarty_internal_compile_block.php +++ b/libs/sysplugins/smarty_internal_compile_block.php @@ -78,6 +78,12 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase $_attr = $this->getAttributes($compiler, $args); $_name = trim($_attr['name'], "\"'"); + // existing child must override parent settings + if (isset($compiler->template->block_data[$_name]) && $compiler->template->block_data[$_name]['mode'] == 'replace') { + $_attr['append'] = false; + $_attr['prepend'] = false; + } + // check if we process an inheritance child template if ($compiler->inheritance_child) { array_unshift(self::$nested_block_names, $_name); From 795c3af692aed22605102cf673667e6adf4f44c5 Mon Sep 17 00:00:00 2001 From: "monte.ohrt" Date: Thu, 2 Oct 2014 15:48:56 +0000 Subject: [PATCH 16/22] update classmap --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index b4e34617..fdded7b1 100644 --- a/composer.json +++ b/composer.json @@ -30,9 +30,9 @@ }, "autoload": { "classmap": [ - "distribution/libs/Smarty.class.php", - "distribution/libs/SmartyBC.class.php", - "distribution/libs/sysplugins/smarty_security.php" + "libs/Smarty.class.php", + "libs/SmartyBC.class.php", + "libs/sysplugins/smarty_security.php" ] }, "repositories": [ From 6af4441f0e1f02bd0e346e665109c68fde8e5309 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Tue, 7 Oct 2014 22:07:15 +0000 Subject: [PATCH 17/22] - bugfix security mode of "