mirror of
https://github.com/smarty-php/smarty.git
synced 2026-08-07 05:54:15 +02:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 47fa66cdcf | |||
| e97b7d136c | |||
| 0ecdd6c41d | |||
| a4ff415bfa | |||
| 4129665748 | |||
| bbe4890b89 |
@@ -1,3 +1,16 @@
|
||||
2015-06-21 Uwe Tews
|
||||
|
||||
* PHP7 raises E_DEPRECATED use __construct for compatibility
|
||||
|
||||
2013-09-30
|
||||
|
||||
* Fixed old vulnerability bug https://bugs.gentoo.org/show_bug.cgi?id=356615
|
||||
|
||||
2013-07-16 Uwe Tews
|
||||
|
||||
* Fixed made Smarty_Compiler.class.php compatible with PHP 5.5
|
||||
|
||||
|
||||
2012-09-24 Uwe Tews
|
||||
|
||||
* Fixed escape Smarty error messages to avoid possible script execution
|
||||
|
||||
@@ -73,7 +73,7 @@ class Config_File {
|
||||
*
|
||||
* @param string $config_path (optional) path to the config files
|
||||
*/
|
||||
function Config_File($config_path = NULL)
|
||||
public function __construct($config_path = NULL)
|
||||
{
|
||||
if (isset($config_path))
|
||||
$this->set_path($config_path);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* @author Monte Ohrt <monte at ohrt dot com>
|
||||
* @author Andrei Zmievski <andrei@php.net>
|
||||
* @package Smarty
|
||||
* @version 2.6.25-dev
|
||||
* @version 2.6.29
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
@@ -465,7 +465,7 @@ class Smarty
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $_version = '2.6.25-dev';
|
||||
var $_version = '2.6.29';
|
||||
|
||||
/**
|
||||
* current template inclusion depth
|
||||
@@ -566,7 +566,7 @@ class Smarty
|
||||
/**
|
||||
* The class constructor.
|
||||
*/
|
||||
function Smarty()
|
||||
public function __construct()
|
||||
{
|
||||
$this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME']
|
||||
: @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']);
|
||||
|
||||
@@ -78,7 +78,7 @@ class Smarty_Compiler extends Smarty {
|
||||
/**
|
||||
* The class constructor.
|
||||
*/
|
||||
function Smarty_Compiler()
|
||||
public function __construct()
|
||||
{
|
||||
// matches double quoted strings:
|
||||
// "foobar"
|
||||
@@ -262,11 +262,11 @@ class Smarty_Compiler extends Smarty {
|
||||
reset($this->_folded_blocks);
|
||||
|
||||
/* replace special blocks by "{php}" */
|
||||
$source_content = preg_replace($search.'e', "'"
|
||||
$source_content = preg_replace_callback($search, create_function ('$matches', "return '"
|
||||
. $this->_quote_replace($this->left_delimiter) . 'php'
|
||||
. "' . str_repeat(\"\n\", substr_count('\\0', \"\n\")) .'"
|
||||
. "' . str_repeat(\"\n\", substr_count('\$matches[1]', \"\n\")) .'"
|
||||
. $this->_quote_replace($this->right_delimiter)
|
||||
. "'"
|
||||
. "';")
|
||||
, $source_content);
|
||||
|
||||
/* Gather all template tags. */
|
||||
@@ -2122,7 +2122,7 @@ class Smarty_Compiler extends Smarty {
|
||||
return null;
|
||||
|
||||
case 'template':
|
||||
$compiled_ref = "'$this->_current_file'";
|
||||
$compiled_ref = "'" . addslashes($this->_current_file) . "'";
|
||||
$_max_index = 1;
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user