mirror of
https://github.com/smarty-php/smarty.git
synced 2026-08-04 04:24:18 +02:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 533fa2abe3 | |||
| b05bb7186b | |||
| 9f6f21f0a0 | |||
| 84128a68ed | |||
| 2f3595a1ab | |||
| ee586702aa | |||
| 22329d9d30 | |||
| e361b0329b | |||
| bace28e2eb | |||
| 478f8a29b4 | |||
| f8717a6cf7 | |||
| 957f9ce43a | |||
| 88cc17fe8e |
@@ -7,3 +7,4 @@ lexer/*.out
|
||||
utilies/*.php
|
||||
/composer.lock
|
||||
/vendor
|
||||
/tests
|
||||
|
||||
@@ -1,43 +1,46 @@
|
||||
===== 2.6.31 ===
|
||||
2017-11-03
|
||||
* replace functions deprecated in PHP 7.2
|
||||
=== Unreleased ===
|
||||
|
||||
=== 2.6.33 - 2021-10-23 ===
|
||||
- Removed trailing comma in composer.json
|
||||
|
||||
2016-09-11 Uwe Tews
|
||||
* {math} fix parameter checking order to avoid misleading message
|
||||
* {math} replace wrong versiom
|
||||
=== 2.6.32 - 2021-10-22 ===
|
||||
- php8 compatability fix using empty() instead of @count()
|
||||
|
||||
2016-07-19 Uwe Tews
|
||||
* {math} shell injection vulnerability patch provided by Tim Weber
|
||||
|
||||
2015-12-30 Uwe Tews
|
||||
=== 2.6.31 - 2017-11-03 ===
|
||||
- replace functions deprecated in PHP 7.2
|
||||
- {math} fix parameter checking order to avoid misleading message
|
||||
- {math} replace wrong versiom
|
||||
|
||||
* fixed plugin filepath cache must not be static, because of possible problem
|
||||
=== 2.6.30 - 2016-07-19 ===
|
||||
- {math} shell injection vulnerability patch provided by Tim Weber
|
||||
- fixed plugin filepath cache must not be static, because of possible problem
|
||||
when using multiple Smarty instances with diffrent plugins_dir settings
|
||||
https://github.com/smarty-php/smarty/issues/146
|
||||
|
||||
2015-06-21 Uwe Tews
|
||||
=== 2.6.29 - 2015-06-21 ===
|
||||
- PHP7 raises E_DEPRECATED use __construct for compatibility
|
||||
|
||||
* PHP7 raises E_DEPRECATED use __construct for compatibility
|
||||
=== 2.6.28 - 2013-09-30 ===
|
||||
- Fixed old vulnerability bug https://bugs.gentoo.org/show_bug.cgi?id=356615
|
||||
- Fixed made Smarty_Compiler.class.php compatible with PHP 5.5
|
||||
|
||||
2013-09-30
|
||||
=== 2.6.27 - 2012-09-24===
|
||||
- Fixed escape Smarty error messages to avoid possible script execution
|
||||
- Fixed security hole in {math} plugin
|
||||
|
||||
* Fixed old vulnerability bug https://bugs.gentoo.org/show_bug.cgi?id=356615
|
||||
=== 2.6.26 - 2014-10-31 ===
|
||||
- revert super global access changes, and instead rely on
|
||||
- USE_SUPER_GLOBALS for security
|
||||
|
||||
2013-07-16 Uwe Tews
|
||||
=== 2.6.25 - 2009-05-19 ===
|
||||
- fix E_NOTICE when sessions are disabled (mohrt)
|
||||
|
||||
* Fixed made Smarty_Compiler.class.php compatible with PHP 5.5
|
||||
=== 2.6.24 - 2009-05-16 ===
|
||||
- fix problem introduced with super global changes (mohrt)
|
||||
|
||||
|
||||
2012-09-24 Uwe Tews
|
||||
=== Older versions ===
|
||||
|
||||
* Fixed escape Smarty error messages to avoid possible script execution
|
||||
|
||||
|
||||
2010-04-17 Uwe Tews
|
||||
|
||||
* Fixed security hole in {math} plugin
|
||||
|
||||
2007-09-27 TAKAGI Masahiro <matakagi@gmail.com>
|
||||
|
||||
* docs/ja/designers/language-custom-functions/language-function-html-checkboxes.xml:
|
||||
|
||||
+2
-2
@@ -10,9 +10,9 @@ Copy the Smarty library files to your system. In our example, we place them in
|
||||
/usr/local/lib/php/Smarty/
|
||||
|
||||
$> cd YOUR_DOWNLOAD_DIRECTORY
|
||||
$> gtar -ztvf Smarty-2.6.7.tar.gz
|
||||
$> gtar -ztvf Smarty-2.x.y.tar.gz
|
||||
$> mkdir /usr/local/lib/php/Smarty
|
||||
$> cp -r Smarty-2.6.7/libs/* /usr/local/lib/php/Smarty
|
||||
$> cp -r Smarty-2.x.y/libs/* /usr/local/lib/php/Smarty
|
||||
|
||||
You should now have the following file structure:
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ NAME:
|
||||
|
||||
Smarty - the PHP compiling template engine
|
||||
|
||||
VERSION: 2.6.18
|
||||
|
||||
AUTHORS:
|
||||
|
||||
Monte Ohrt <monte at ohrt dot com>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#Smarty 2 template engine
|
||||
##Distribution repository
|
||||
# Smarty 2 template engine
|
||||
## Distribution repository
|
||||
Starting with Smarty 2.6.23 Composer has been configured to load the packages from github.
|
||||
|
||||
**NOTE: Because of this change you must clear your local composer cache with the "composer clearcache" command**
|
||||
|
||||
To get the latest stable version use
|
||||
To get the latest v2.6 release use
|
||||
|
||||
"require": {
|
||||
"smarty/smarty": "~2.6"
|
||||
@@ -12,12 +12,6 @@ To get the latest stable version use
|
||||
|
||||
in your composer.json file.
|
||||
|
||||
To get the trunk version use
|
||||
|
||||
"require": {
|
||||
"smarty/smarty": "~2.6@dev"
|
||||
}
|
||||
|
||||
The "smarty/smarty" package will start at libs/.... subfolder.
|
||||
|
||||
|
||||
|
||||
@@ -29,11 +29,5 @@
|
||||
"libs/Smarty_Compiler.class.php",
|
||||
"libs/Config_File.class.php"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.6.x-dev"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
* smarty-discussion-subscribe@googlegroups.com
|
||||
*
|
||||
* @link http://www.smarty.net/
|
||||
* @version 2.6.25-dev
|
||||
* @copyright Copyright: 2001-2005 New Digital Group, Inc.
|
||||
* @author Andrei Zmievski <andrei@php.net>
|
||||
* @access public
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
* @author Monte Ohrt <monte at ohrt dot com>
|
||||
* @author Andrei Zmievski <andrei@php.net>
|
||||
* @package Smarty
|
||||
* @version 2.6.31-dev
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
@@ -465,7 +464,7 @@ class Smarty
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $_version = '2.6.31';
|
||||
var $_version = '2.6.33';
|
||||
|
||||
/**
|
||||
* current template inclusion depth
|
||||
@@ -1208,7 +1207,7 @@ class Smarty
|
||||
$_server_vars = ($this->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
|
||||
$_last_modified_date = @substr($_server_vars['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_server_vars['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
|
||||
$_gmt_mtime = gmdate('D, d M Y H:i:s', $this->_cache_info['timestamp']).' GMT';
|
||||
if (@count($this->_cache_info['insert_tags']) == 0
|
||||
if (empty($this->_cache_info['insert_tags'])
|
||||
&& !$this->_cache_serials
|
||||
&& $_gmt_mtime == $_last_modified_date) {
|
||||
if (php_sapi_name()=='cgi')
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
* @link http://smarty.php.net/
|
||||
* @author Monte Ohrt <monte at ohrt dot com>
|
||||
* @author Andrei Zmievski <andrei@php.net>
|
||||
* @version 2.6.25-dev
|
||||
* @copyright 2001-2005 New Digital Group, Inc.
|
||||
* @package Smarty
|
||||
*/
|
||||
@@ -1192,7 +1191,7 @@ class Smarty_Compiler extends Smarty {
|
||||
}
|
||||
|
||||
$output = '<?php ';
|
||||
$output .= "\$_from = $from; if (!is_array(\$_from) && !is_object(\$_from)) { settype(\$_from, 'array'); }";
|
||||
$output .= "\$_from = $from; if ((\$_from instanceof StdClass) || (!is_array(\$_from) && !is_object(\$_from))) { settype(\$_from, 'array'); }";
|
||||
if (isset($name)) {
|
||||
$foreach_props = "\$this->_foreach[$name]";
|
||||
$output .= "{$foreach_props} = array('total' => count(\$_from), 'iteration' => 0);\n";
|
||||
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ "$1" =~ ^2\.[0-9\.-rc]+$ ]]; then
|
||||
printf 'Creating release %s\n' "$1"
|
||||
else
|
||||
echo "Invalid version number: $1. This script can only make v2.x.x releases."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
git checkout -b "release/$1"
|
||||
sed -i "s/=== Unreleased ===/=== Unreleased ===\\n\\n=== $1 - $(date +%Y-%m-%d) ===/" ChangeLog
|
||||
sed -i "s/var \$_version = '[^']\+';/var \$_version = '$1';/" libs/Smarty.class.php
|
||||
|
||||
git add ChangeLog libs/Smarty.class.php
|
||||
git commit -m "version bump"
|
||||
|
||||
git checkout support/2.6
|
||||
git pull
|
||||
git merge --no-ff "release/$1"
|
||||
git branch -d "release/$1"
|
||||
git tag -a "v$1" -m "Release $1"
|
||||
|
||||
printf 'Done creating release %s\n' "$1"
|
||||
|
||||
# shellcheck disable=SC2016
|
||||
printf 'Run `git push --follow-tags origin` to publish it.\n'
|
||||
Reference in New Issue
Block a user