Permalink
Browse files

Merge pull request #560 from L-P/compiler-fallback-fix

Disable Compiler fallback by default.
  • Loading branch information...
2 parents ed77118 + b2b3fb1 commit e4ef0c2a453fb288a5d13d03cecebc652ea8165d @gwoo gwoo committed Jul 6, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 template/view/Compiler.php
  2. +2 −2 template/view/adapter/File.php
@@ -53,7 +53,7 @@ class Compiler extends \lithium\core\StaticObject {
*/
public static function template($file, array $options = array()) {
$cachePath = Libraries::get(true, 'resources') . '/tmp/cache/templates';
- $defaults = array('path' => $cachePath, 'fallback' => true);
+ $defaults = array('path' => $cachePath, 'fallback' => false);
$options += $defaults;
$stats = stat($file);
@@ -79,7 +79,7 @@ class File extends \lithium\template\view\Renderer implements \ArrayAccess {
public function __construct(array $config = array()) {
$defaults = array(
- 'classes' => array(), 'compile' => true, 'extract' => true, 'paths' => array()
+ 'classes' => array(), 'compile' => true, 'compiler' => array(), 'extract' => true, 'paths' => array()
);
parent::__construct($config + $defaults);
}
@@ -126,7 +126,7 @@ public function template($type, array $params) {
if ($this->_compile) {
$compiler = $this->_classes['compiler'];
- $path = $compiler::template($path);
+ $path = $compiler::template($path, $this->_config['compiler']);
}
return $path;
}

0 comments on commit e4ef0c2

Please sign in to comment.