Skip to content

Commit

Permalink
LIB Smarty : FIX setCompileDir() & setCacheDir()
Browse files Browse the repository at this point in the history
update 3.1.8 to 3.1.28 broke 'non-relative' path
  • Loading branch information
lbayle committed May 15, 2016
1 parent e4c4501 commit 2698b29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Binary file modified classmap.ser
Binary file not shown.
8 changes: 6 additions & 2 deletions lib/Smarty/Smarty.class.php
Expand Up @@ -961,7 +961,9 @@ public function getPluginsDir()
*/
public function setCompileDir($compile_dir)
{
$this->compile_dir = $this->_realpath($compile_dir . DS, true);
// LoB update 3.1.8 to 3.1.28 broke 'non-relative' path
//$this->compile_dir = $this->_realpath($compile_dir . DS, true); // this is from 3.1.28
$this->compile_dir = rtrim($compile_dir, '/\\') . DS; // this is from 3.1.8
if (!isset(Smarty::$_muted_directories[$this->compile_dir])) {
Smarty::$_muted_directories[$this->compile_dir] = null;
}
Expand Down Expand Up @@ -995,7 +997,9 @@ public function getCompileDir()
*/
public function setCacheDir($cache_dir)
{
$this->cache_dir = $this->_realpath($cache_dir . DS, true);
// LoB update 3.1.8 to 3.1.28 broke 'non-relative' path
//$this->cache_dir = $this->_realpath($cache_dir . DS, true); // this is from 3.1.28
$this->cache_dir = rtrim($cache_dir, '/\\') . DS; // this is from 3.1.8
if (!isset(Smarty::$_muted_directories[$this->cache_dir])) {
Smarty::$_muted_directories[$this->cache_dir] = null;
}
Expand Down

0 comments on commit 2698b29

Please sign in to comment.