Commit 4f2d7b81 authored by Mike Gabriel's avatar Mike Gabriel

New upstream version 3.1.33+20180830.1.3a78a21f+selfpack1

parent 14b74789
...@@ -2,7 +2,14 @@ ...@@ -2,7 +2,14 @@
This file contains a brief description of new features which have been added to Smarty 3.1 This file contains a brief description of new features which have been added to Smarty 3.1
Smarty 3.1.32 New tags for inheritance parent and child Smarty 3.1.33-dev
Variable capture name in Smarty special variable
================================================
{$smarty.capture.$foo} can now be used to access the content of a named
capture block
Smarty 3.1.32
New tags for inheritance parent and child
========================================= =========================================
{parent} == {$smarty.block.parent} {parent} == {$smarty.block.parent}
{child} == {$smarty.block.child} {child} == {$smarty.block.child}
......
===== 3.1.32 ===== (24.04.2018) ===== 3.1.33-dev-7 =====
26.08.2018
- bugfix/enhancement {capture} allow variable as capture block name in Smarty special variable
like $smarty.capture.$foo https://github.com/smarty-php/smarty/issues/478 https://github.com/smarty-php/smarty/pull/481
===== 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
https://github.com/smarty-php/smarty/pull/438
- improvement do not compute total property in {foreach} if not needed https://github.com/smarty-php/smarty/issues/443
- bugfix plugins may not be loaded when setMergeCompiledIncludes is true https://github.com/smarty-php/smarty/issues/435
26.04.2018
- bugfix regarding Security Vulnerability did not solve the problem under Linux.
===== 3.1.32 ===== (24.04.2018)
24.04.2018 24.04.2018
- bugfix possible Security Vulnerability in Smarty_Security class. - bugfix possible Security Vulnerability in Smarty_Security class.
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
"name": "smarty/smarty", "name": "smarty/smarty",
"type": "library", "type": "library",
"description": "Smarty - the compiling PHP template engine", "description": "Smarty - the compiling PHP template engine",
"keywords": ["templating"], "keywords": [
"templating"
],
"homepage": "http://www.smarty.net", "homepage": "http://www.smarty.net",
"license": "LGPL-3.0", "license": "LGPL-3.0",
"authors": [ "authors": [
...@@ -28,12 +30,13 @@ ...@@ -28,12 +30,13 @@
"php": ">=5.2" "php": ">=5.2"
}, },
"autoload": { "autoload": {
"files": ["libs/bootstrap.php"] "files": [
"libs/bootstrap.php"
]
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.1.x-dev" "dev-master": "3.1.x-dev"
} }
} }
}
} \ No newline at end of file
...@@ -17,11 +17,15 @@ $smarty->cache_lifetime = 120; ...@@ -17,11 +17,15 @@ $smarty->cache_lifetime = 120;
$smarty->assign("Name", "Fred Irving Johnathan Bradley Peppergill", true); $smarty->assign("Name", "Fred Irving Johnathan Bradley Peppergill", true);
$smarty->assign("FirstName", array("John", "Mary", "James", "Henry")); $smarty->assign("FirstName", array("John", "Mary", "James", "Henry"));
$smarty->assign("LastName", array("Doe", "Smith", "Johnson", "Case")); $smarty->assign("LastName", array("Doe", "Smith", "Johnson", "Case"));
$smarty->assign("Class", array(array("A", "B", "C", "D"), array("E", "F", "G", "H"), array("I", "J", "K", "L"), $smarty->assign(
array("M", "N", "O", "P"))); "Class", array(array("A", "B", "C", "D"), array("E", "F", "G", "H"), array("I", "J", "K", "L"),
array("M", "N", "O", "P"))
);
$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"), $smarty->assign(
array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234"))); "contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234"))
);
$smarty->assign("option_values", array("NY", "NE", "KS", "IA", "OK", "TX")); $smarty->assign("option_values", array("NY", "NE", "KS", "IA", "OK", "TX"));
$smarty->assign("option_output", array("New York", "Nebraska", "Kansas", "Iowa", "Oklahoma", "Texas")); $smarty->assign("option_output", array("New York", "Nebraska", "Kansas", "Iowa", "Oklahoma", "Texas"));
......
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
*/ */
class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore
{ {
/**
* Smarty_CacheResource_Apc constructor.
*
* @throws \Exception
*/
public function __construct() public function __construct()
{ {
// test if APC is present // test if APC is present
...@@ -22,7 +27,7 @@ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore ...@@ -22,7 +27,7 @@ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore
/** /**
* Read values for a set of keys from cache * Read values for a set of keys from cache
* *
* @param array $keys list of keys to fetch * @param array $keys list of keys to fetch
* *
* @return array list of values with the given keys used as indexes * @return array list of values with the given keys used as indexes
* @return boolean true on success, false on failure * @return boolean true on success, false on failure
...@@ -41,8 +46,8 @@ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore ...@@ -41,8 +46,8 @@ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore
/** /**
* Save values for a set of keys to cache * Save values for a set of keys to cache
* *
* @param array $keys list of values to save * @param array $keys list of values to save
* @param int $expire expiration time * @param int $expire expiration time
* *
* @return boolean true on success, false on failure * @return boolean true on success, false on failure
*/ */
...@@ -58,7 +63,7 @@ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore ...@@ -58,7 +63,7 @@ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore
/** /**
* Remove values from cache * Remove values from cache
* *
* @param array $keys list of keys to delete * @param array $keys list of keys to delete
* *
* @return boolean true on success, false on failure * @return boolean true on success, false on failure
*/ */
......
...@@ -32,7 +32,7 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore ...@@ -32,7 +32,7 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore
/** /**
* Read values for a set of keys from cache * Read values for a set of keys from cache
* *
* @param array $keys list of keys to fetch * @param array $keys list of keys to fetch
* *
* @return array list of values with the given keys used as indexes * @return array list of values with the given keys used as indexes
* @return boolean true on success, false on failure * @return boolean true on success, false on failure
...@@ -57,8 +57,8 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore ...@@ -57,8 +57,8 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore
/** /**
* Save values for a set of keys to cache * Save values for a set of keys to cache
* *
* @param array $keys list of values to save * @param array $keys list of values to save
* @param int $expire expiration time * @param int $expire expiration time
* *
* @return boolean true on success, false on failure * @return boolean true on success, false on failure
*/ */
...@@ -75,7 +75,7 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore ...@@ -75,7 +75,7 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore
/** /**
* Remove values from cache * Remove values from cache
* *
* @param array $keys list of keys to delete * @param array $keys list of keys to delete
* *
* @return boolean true on success, false on failure * @return boolean true on success, false on failure
*/ */
...@@ -96,6 +96,6 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore ...@@ -96,6 +96,6 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore
*/ */
protected function purge() protected function purge()
{ {
$this->memcache->flush(); return $this->memcache->flush();
} }
} }
...@@ -33,6 +33,11 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom ...@@ -33,6 +33,11 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom
protected $save; protected $save;
/**
* Smarty_CacheResource_Mysql constructor.
*
* @throws \SmartyException
*/
public function __construct() public function __construct()
{ {
try { try {
...@@ -43,19 +48,21 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom ...@@ -43,19 +48,21 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom
} }
$this->fetch = $this->db->prepare('SELECT modified, content FROM output_cache WHERE id = :id'); $this->fetch = $this->db->prepare('SELECT modified, content FROM output_cache WHERE id = :id');
$this->fetchTimestamp = $this->db->prepare('SELECT modified FROM output_cache WHERE id = :id'); $this->fetchTimestamp = $this->db->prepare('SELECT modified FROM output_cache WHERE id = :id');
$this->save = $this->db->prepare('REPLACE INTO output_cache (id, name, cache_id, compile_id, content) $this->save = $this->db->prepare(
VALUES (:id, :name, :cache_id, :compile_id, :content)'); 'REPLACE INTO output_cache (id, name, cache_id, compile_id, content)
VALUES (:id, :name, :cache_id, :compile_id, :content)'
);
} }
/** /**
* fetch cached content and its modification time from data source * fetch cached content and its modification time from data source
* *
* @param string $id unique cache content identifier * @param string $id unique cache content identifier
* @param string $name template name * @param string $name template name
* @param string $cache_id cache id * @param string $cache_id cache id
* @param string $compile_id compile id * @param string $compile_id compile id
* @param string $content cached content * @param string $content cached content
* @param integer $mtime cache modification timestamp (epoch) * @param integer $mtime cache modification timestamp (epoch)
* *
* @return void * @return void
*/ */
...@@ -78,10 +85,10 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom ...@@ -78,10 +85,10 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom
* *
* @note implementing this method is optional. Only implement it if modification times can be accessed faster than loading the complete cached content. * @note implementing this method is optional. Only implement it if modification times can be accessed faster than loading the complete cached content.
* *
* @param string $id unique cache content identifier * @param string $id unique cache content identifier
* @param string $name template name * @param string $name template name
* @param string $cache_id cache id * @param string $cache_id cache id
* @param string $compile_id compile id * @param string $compile_id compile id
* *
* @return integer|boolean timestamp (epoch) the template was modified, or false if not found * @return integer|boolean timestamp (epoch) the template was modified, or false if not found
*/ */
...@@ -97,19 +104,21 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom ...@@ -97,19 +104,21 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom
/** /**
* Save content to cache * Save content to cache
* *
* @param string $id unique cache content identifier * @param string $id unique cache content identifier
* @param string $name template name * @param string $name template name
* @param string $cache_id cache id * @param string $cache_id cache id
* @param string $compile_id compile id * @param string $compile_id compile id
* @param integer|null $exp_time seconds till expiration time in seconds or null * @param integer|null $exp_time seconds till expiration time in seconds or null
* @param string $content content to cache * @param string $content content to cache
* *
* @return boolean success * @return boolean success
*/ */
protected function save($id, $name, $cache_id, $compile_id, $exp_time, $content) protected function save($id, $name, $cache_id, $compile_id, $exp_time, $content)
{ {
$this->save->execute(array('id' => $id, 'name' => $name, 'cache_id' => $cache_id, 'compile_id' => $compile_id, $this->save->execute(
'content' => $content,)); array('id' => $id, 'name' => $name, 'cache_id' => $cache_id, 'compile_id' => $compile_id,
'content' => $content,)
);
return !!$this->save->rowCount(); return !!$this->save->rowCount();
} }
...@@ -117,10 +126,10 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom ...@@ -117,10 +126,10 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom
/** /**
* Delete content from cache * Delete content from cache
* *
* @param string $name template name * @param string $name template name
* @param string $cache_id cache id * @param string $cache_id cache id
* @param string $compile_id compile id * @param string $compile_id compile id
* @param integer|null $exp_time seconds till expiration or null * @param integer|null $exp_time seconds till expiration or null
* *
* @return integer number of deleted caches * @return integer number of deleted caches
*/ */
......
...@@ -29,35 +29,30 @@ ...@@ -29,35 +29,30 @@
*/ */
class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
{ {
protected $fetchStatements = Array('default' => 'SELECT %2$s protected $fetchStatements = Array('default' => 'SELECT %2$s
FROM %1$s FROM %1$s
WHERE 1 WHERE 1
AND id = :id AND id = :id
AND cache_id IS NULL AND cache_id IS NULL
AND compile_id IS NULL', AND compile_id IS NULL',
'withCacheId' => 'SELECT %2$s 'withCacheId' => 'SELECT %2$s
FROM %1$s FROM %1$s
WHERE 1 WHERE 1
AND id = :id AND id = :id
AND cache_id = :cache_id AND cache_id = :cache_id
AND compile_id IS NULL', AND compile_id IS NULL',
'withCompileId' => 'SELECT %2$s 'withCompileId' => 'SELECT %2$s
FROM %1$s FROM %1$s
WHERE 1 WHERE 1
AND id = :id AND id = :id
AND compile_id = :compile_id AND compile_id = :compile_id
AND cache_id IS NULL', AND cache_id IS NULL',
'withCacheIdAndCompileId' => 'SELECT %2$s 'withCacheIdAndCompileId' => 'SELECT %2$s
FROM %1$s FROM %1$s
WHERE 1 WHERE 1
AND id = :id AND id = :id
AND cache_id = :cache_id AND cache_id = :cache_id
AND compile_id = :compile_id'); AND compile_id = :compile_id');
protected $insertStatement = 'INSERT INTO %s protected $insertStatement = 'INSERT INTO %s
SET id = :id, SET id = :id,
...@@ -75,15 +70,10 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom ...@@ -75,15 +70,10 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
modified = CURRENT_TIMESTAMP, modified = CURRENT_TIMESTAMP,
expire = DATE_ADD(CURRENT_TIMESTAMP, INTERVAL :expire SECOND), expire = DATE_ADD(CURRENT_TIMESTAMP, INTERVAL :expire SECOND),
content = :content'; content = :content';
protected $deleteStatement = 'DELETE FROM %1$s WHERE %2$s'; protected $deleteStatement = 'DELETE FROM %1$s WHERE %2$s';
protected $truncateStatement = 'TRUNCATE TABLE %s'; protected $truncateStatement = 'TRUNCATE TABLE %s';
protected $fetchColumns = 'modified, content'; protected $fetchColumns = 'modified, content';
protected $fetchTimestampColumns = 'modified'; protected $fetchTimestampColumns = 'modified';
protected $pdo, $table, $database; protected $pdo, $table, $database;
/* /*
...@@ -93,17 +83,23 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom ...@@ -93,17 +83,23 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
* @param string $table : table (or view) name * @param string $table : table (or view) name
* @param string $database : optional - if table is located in another db * @param string $database : optional - if table is located in another db
*/ */
/**
* Smarty_CacheResource_Pdo constructor.
*
* @param \PDO $pdo
* @param $table
* @param null $database
*
* @throws \SmartyException
*/
public function __construct(PDO $pdo, $table, $database = null) public function __construct(PDO $pdo, $table, $database = null)
{ {
if (is_null($table)) { if (is_null($table)) {
throw new SmartyException("Table name for caching can't be null"); throw new SmartyException("Table name for caching can't be null");
} }
$this->pdo = $pdo; $this->pdo = $pdo;
$this->table = $table; $this->table = $table;
$this->database = $database; $this->database = $database;
$this->fillStatementsWithTableName(); $this->fillStatementsWithTableName();
} }
...@@ -115,15 +111,12 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom ...@@ -115,15 +111,12 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
*/ */
protected function fillStatementsWithTableName() protected function fillStatementsWithTableName()
{ {
foreach ($this->fetchStatements AS &$statement) { foreach ($this->fetchStatements AS &$statement) {
$statement = sprintf($statement, $this->getTableName(), '%s'); $statement = sprintf($statement, $this->getTableName(), '%s');
} }
$this->insertStatement = sprintf($this->insertStatement, $this->getTableName()); $this->insertStatement = sprintf($this->insertStatement, $this->getTableName());
$this->deleteStatement = sprintf($this->deleteStatement, $this->getTableName(), '%s'); $this->deleteStatement = sprintf($this->deleteStatement, $this->getTableName(), '%s');
$this->truncateStatement = sprintf($this->truncateStatement, $this->getTableName()); $this->truncateStatement = sprintf($this->truncateStatement, $this->getTableName());
return $this; return $this;
} }
...@@ -138,7 +131,6 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom ...@@ -138,7 +131,6 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
*/ */
protected function getFetchStatement($columns, $id, $cache_id = null, $compile_id = null) protected function getFetchStatement($columns, $id, $cache_id = null, $compile_id = null)
{ {
if (!is_null($cache_id) && !is_null($compile_id)) { if (!is_null($cache_id) && !is_null($compile_id)) {
$query = $this->fetchStatements[ 'withCacheIdAndCompileId' ] AND $query = $this->fetchStatements[ 'withCacheIdAndCompileId' ] AND
$args = Array('id' => $id, 'cache_id' => $cache_id, 'compile_id' => $compile_id); $args = Array('id' => $id, 'cache_id' => $cache_id, 'compile_id' => $compile_id);
...@@ -150,39 +142,33 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom ...@@ -150,39 +142,33 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
} else { } else {
$query = $this->fetchStatements[ 'default' ] AND $args = Array('id' => $id); $query = $this->fetchStatements[ 'default' ] AND $args = Array('id' => $id);
} }
$query = sprintf($query, $columns); $query = sprintf($query, $columns);
$stmt = $this->pdo->prepare($query); $stmt = $this->pdo->prepare($query);
foreach ($args AS $key => $value) { foreach ($args AS $key => $value) {
$stmt->bindValue($key, $value); $stmt->bindValue($key, $value);
} }
return $stmt; return $stmt;
} }
/** /**
* fetch cached content and its modification time from data source * fetch cached content and its modification time from data source
* *
* @param string $id unique cache content identifier * @param string $id unique cache content identifier
* @param string $name template name * @param string $name template name
* @param string|null $cache_id cache id * @param string|null $cache_id cache id
* @param string|null $compile_id compile id * @param string|null $compile_id compile id
* @param string $content cached content * @param string $content cached content
* @param integer $mtime cache modification timestamp (epoch) * @param integer $mtime cache modification timestamp (epoch)
* *
* @return void * @return void
* @access protected * @access protected
*/ */
protected function fetch($id, $name, $cache_id = null, $compile_id = null, &$content, &$mtime) protected function fetch($id, $name, $cache_id = null, $compile_id = null, &$content, &$mtime)
{ {
$stmt = $this->getFetchStatement($this->fetchColumns, $id, $cache_id, $compile_id); $stmt = $this->getFetchStatement($this->fetchColumns, $id, $cache_id, $compile_id);
$stmt->execute(); $stmt->execute();
$row = $stmt->fetch(); $row = $stmt->fetch();
$stmt->closeCursor(); $stmt->closeCursor();
if ($row) { if ($row) {
$content = $this->outputContent($row[ 'content' ]); $content = $this->outputContent($row[ 'content' ]);
$mtime = strtotime($row[ 'modified' ]); $mtime = strtotime($row[ 'modified' ]);
...@@ -197,10 +183,10 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom ...@@ -197,10 +183,10 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
* {@internal implementing this method is optional. * {@internal implementing this method is optional.
* Only implement it if modification times can be accessed faster than loading the complete cached content.}} * Only implement it if modification times can be accessed faster than loading the complete cached content.}}
* *
* @param string $id unique cache content identifier * @param string $id unique cache content identifier
* @param string $name template name * @param string $name template name
* @param string|null $cache_id cache id * @param string|null $cache_id cache id
* @param string|null $compile_id compile id * @param string|null $compile_id compile id
* *
* @return integer|boolean timestamp (epoch) the template was modified, or false if not found * @return integer|boolean timestamp (epoch) the template was modified, or false if not found
* @access protected * @access protected
...@@ -212,7 +198,6 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom ...@@ -212,7 +198,6 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
// $stmt -> closeCursor(); // $stmt -> closeCursor();
// return $mtime; // return $mtime;
// } // }
/** /**
* Save content to cache * Save content to cache
* *
...@@ -228,17 +213,14 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom ...@@ -228,17 +213,14 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
*/ */
protected function save($id, $name, $cache_id = null, $compile_id = null, $exp_time, $content) protected function save($id, $name, $cache_id = null, $compile_id = null, $exp_time, $content)
{ {
$stmt = $this->pdo->prepare($this->insertStatement); $stmt = $this->pdo->prepare($this->insertStatement);
$stmt->bindValue('id', $id); $stmt->bindValue('id', $id);
$stmt->bindValue('name', $name); $stmt->bindValue('name', $name);
$stmt->bindValue('cache_id', $cache_id, (is_null($cache_id)) ? PDO::PARAM_NULL : PDO::PARAM_STR); $stmt->bindValue('cache_id', $cache_id, (is_null($cache_id)) ? PDO::PARAM_NULL : PDO::PARAM_STR);
$stmt->bindValue('compile_id', $compile_id, (is_null($compile_id)) ? PDO::PARAM_NULL : PDO::PARAM_STR); $stmt->bindValue('compile_id', $compile_id, (is_null($compile_id)) ? PDO::PARAM_NULL : PDO::PARAM_STR);
$stmt->bindValue('expire', (int) $exp_time, PDO::PARAM_INT); $stmt->bindValue('expire', (int)$exp_time, PDO::PARAM_INT);
$stmt->bindValue('content', $this->inputContent($content)); $stmt->bindValue('content', $this->inputContent($content));
$stmt->execute(); $stmt->execute();
return !!$stmt->rowCount(); return !!$stmt->rowCount();
} }
...@@ -272,19 +254,18 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom ...@@ -272,19 +254,18 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
* @param string|null $name template name * @param string|null $name template name
* @param string|null $cache_id cache id * @param string|null $cache_id cache id
* @param string|null $compile_id compile id * @param string|null $compile_id compile id