Merge branch 'release/2.0.2' into 3.0/master

This commit is contained in:
Woody Gilk 2011-03-29 11:00:06 -05:00
commit 23ffb4ffcc
2 changed files with 18 additions and 5 deletions

View file

@ -12,7 +12,7 @@
*/ */
abstract class Kohana_Kostache { abstract class Kohana_Kostache {
const VERSION = '2.0.1'; const VERSION = '2.0.2';
/** /**
* Factory method for Kostache views. Accepts a template path and an * Factory method for Kostache views. Accepts a template path and an
@ -60,8 +60,16 @@ abstract class Kohana_Kostache {
{ {
if ( ! $template) if ( ! $template)
{ {
// Detect the template for this class if ($this->_template)
$template = $this->_detect_template(); {
// Load the template defined in the view
$template = $this->_template;
}
else
{
// Detect the template for this class
$template = $this->_detect_template();
}
} }
// Load the template // Load the template
@ -103,7 +111,7 @@ abstract class Kohana_Kostache {
ob_start(); ob_start();
// Render the exception // Render the exception
Kohana_Exception::text($e); Kohana::exception_handler($e);
return (string) ob_get_clean(); return (string) ob_get_clean();
} }
@ -215,7 +223,9 @@ abstract class Kohana_Kostache {
*/ */
protected function _stash($template, Kostache $view, array $partials) protected function _stash($template, Kostache $view, array $partials)
{ {
return new Mustache($template, $view, $partials); return new Kohana_Mustache($template, $view, $partials, array(
'charset' => Kohana::$charset,
));
} }
/** /**

View file

@ -0,0 +1,3 @@
<?php defined('SYSPATH') or die('No direct script access.');
class Kohana_Mustache extends Mustache {}