mirror of
https://github.com/smarty-php/smarty.git
synced 2026-08-04 04:24:18 +02:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4fec27ccc2 | |||
| fea0d02d99 | |||
| 4efa427a87 | |||
| 30b1c5bf6d | |||
| 3f871f9f7a | |||
| e161babbd4 | |||
| f8e63fc480 |
@@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [5.0.1] - 2024-03-27
|
||||
- Fix error in Smarty\Smarty::compileAllTemplates() by including missing FilesystemIterator class [#966](https://github.com/smarty-php/smarty/issues/966)
|
||||
|
||||
|
||||
## [5.0.0] - 2024-03-25
|
||||
- Fixed that scoped variables would overwrite parent scope [#952](https://github.com/smarty-php/smarty/issues/952)
|
||||
- Removed publicly accessible `$tpl->_var_stack` variable
|
||||
|
||||
|
||||
### Fixed
|
||||
- Too many shorthand attributes error when using a modifier as a function with more than 3 parameters in an expression [#949](https://github.com/smarty-php/smarty/issues/949)
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
- Fixed that scoped variables would overwrite parent scope [#952](https://github.com/smarty-php/smarty/issues/952)
|
||||
- Removed publicly accessible `$tpl->_var_stack` variable
|
||||
+1
-1
@@ -15,7 +15,7 @@ php utilities/update-smarty-version-number.php $1
|
||||
git add changelog CHANGELOG.md src/Smarty.php
|
||||
git commit -m "version bump"
|
||||
|
||||
git checkout master
|
||||
git checkout support/5
|
||||
git pull
|
||||
git merge --no-ff "release/$1"
|
||||
git branch -d "release/$1"
|
||||
|
||||
+15
-13
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Smarty;
|
||||
|
||||
use FilesystemIterator;
|
||||
use RecursiveDirectoryIterator;
|
||||
use RecursiveIteratorIterator;
|
||||
use Smarty\Cacheresource\File;
|
||||
@@ -12,11 +13,12 @@ use Smarty\Extension\CoreExtension;
|
||||
use Smarty\Extension\DefaultExtension;
|
||||
use Smarty\Extension\ExtensionInterface;
|
||||
use Smarty\Filter\Output\TrimWhitespace;
|
||||
use Smarty\Resource\BasePlugin;
|
||||
use Smarty\Smarty\Runtime\CaptureRuntime;
|
||||
use Smarty\Smarty\Runtime\ForeachRuntime;
|
||||
use Smarty\Smarty\Runtime\InheritanceRuntime;
|
||||
use Smarty\Smarty\Runtime\TplFunctionRuntime;
|
||||
use Smarty\Runtime\CaptureRuntime;
|
||||
use Smarty\Runtime\DefaultPluginHandlerRuntime;
|
||||
use Smarty\Runtime\ForeachRuntime;
|
||||
use Smarty\Runtime\InheritanceRuntime;
|
||||
use Smarty\Runtime\TplFunctionRuntime;
|
||||
|
||||
|
||||
/**
|
||||
* Project: Smarty: the PHP compiling template engine
|
||||
@@ -53,7 +55,7 @@ class Smarty extends \Smarty\TemplateBase {
|
||||
/**
|
||||
* smarty version
|
||||
*/
|
||||
const SMARTY_VERSION = '5.0.0-rc3';
|
||||
const SMARTY_VERSION = '5.0.1';
|
||||
|
||||
/**
|
||||
* define caching modes
|
||||
@@ -1755,15 +1757,15 @@ class Smarty extends \Smarty\TemplateBase {
|
||||
// Lazy load runtimes when/if needed
|
||||
switch ($type) {
|
||||
case 'Capture':
|
||||
return $this->runtimes[$type] = new \Smarty\Runtime\CaptureRuntime();
|
||||
return $this->runtimes[$type] = new CaptureRuntime();
|
||||
case 'Foreach':
|
||||
return $this->runtimes[$type] = new \Smarty\Runtime\ForeachRuntime();
|
||||
return $this->runtimes[$type] = new ForeachRuntime();
|
||||
case 'Inheritance':
|
||||
return $this->runtimes[$type] = new \Smarty\Runtime\InheritanceRuntime();
|
||||
return $this->runtimes[$type] = new InheritanceRuntime();
|
||||
case 'TplFunction':
|
||||
return $this->runtimes[$type] = new \Smarty\Runtime\TplFunctionRuntime();
|
||||
return $this->runtimes[$type] = new TplFunctionRuntime();
|
||||
case 'DefaultPluginHandler':
|
||||
return $this->runtimes[$type] = new \Smarty\Runtime\DefaultPluginHandlerRuntime(
|
||||
return $this->runtimes[$type] = new DefaultPluginHandlerRuntime(
|
||||
$this->getDefaultPluginHandlerFunc()
|
||||
);
|
||||
}
|
||||
@@ -2052,7 +2054,7 @@ class Smarty extends \Smarty\TemplateBase {
|
||||
* @param array|string $modifiers modifier or list of modifiers
|
||||
* to add
|
||||
*
|
||||
* @return \Smarty|Template
|
||||
* @return Smarty
|
||||
* @api Smarty::addDefaultModifiers()
|
||||
*
|
||||
*/
|
||||
@@ -2131,7 +2133,7 @@ class Smarty extends \Smarty\TemplateBase {
|
||||
* @throws \Smarty\Exception
|
||||
*/
|
||||
public function display($template = null, $cache_id = null, $compile_id = null) {
|
||||
return $this->returnOrCreateTemplate($template, $cache_id, $compile_id)->display();
|
||||
$this->returnOrCreateTemplate($template, $cache_id, $compile_id)->display();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -377,9 +377,9 @@ abstract class TemplateBase extends Data {
|
||||
* Registers a resource to fetch a template
|
||||
*
|
||||
* @param string $name name of resource type
|
||||
* @param Smarty\Resource\Base $resource_handler instance of Smarty\Resource\Base
|
||||
* @param \Smarty\Resource\BasePlugin $resource_handler instance of Smarty\Resource\BasePlugin
|
||||
*
|
||||
* @return \Smarty|\Smarty\Template
|
||||
* @return \Smarty\Smarty|\Smarty\Template
|
||||
* @link https://www.smarty.net/docs/en/api.register.resource.tpl
|
||||
*
|
||||
* @api Smarty::registerResource()
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ function smarty_make_timestamp($string)
|
||||
|| (interface_exists('DateTimeInterface', false) && $string instanceof DateTimeInterface)
|
||||
) {
|
||||
return (int)$string->format('U'); // PHP 5.2 BC
|
||||
} elseif (strlen($string) === 14 && ctype_digit($string)) {
|
||||
} elseif (strlen($string) === 14 && ctype_digit((string)$string)) {
|
||||
// it is mysql timestamp format of YYYYMMDDHHMMSS?
|
||||
return mktime(
|
||||
substr($string, 8, 2),
|
||||
|
||||
Reference in New Issue
Block a user