Skip to content

Commit

Permalink
Overwriting ee()->TMPL now uses ee()->set() instead of directly repla…
Browse files Browse the repository at this point in the history
…cing the object
  • Loading branch information
croxton committed Oct 20, 2016
1 parent 304b0b0 commit 641e169
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##Stash

![Release](https://img.shields.io/badge/release-3.0.3-brightgreen.svg)
![Release](https://img.shields.io/badge/release-3.0.4-brightgreen.svg)

Stash for ExpressionEngine 3.

Expand Down
2 changes: 1 addition & 1 deletion system/user/addons/stash/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
if (! defined('STASH_VER'))
{
define('STASH_NAME', 'Stash');
define('STASH_VER', '3.0.3');
define('STASH_VER', '3.0.4');
define('STASH_AUTHOR', 'Mark Croxton, Hallmark Design');
define('STASH_AUTHOR_URL', 'http://hallmark-design.co.uk');
define('STASH_DOCS', 'http://github.com/croxton/Stash/');
Expand Down
6 changes: 4 additions & 2 deletions system/user/addons/stash/mod.stash.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,14 @@ private function _load_EE_TMPL()
// -------------------------------------
if (ee()->extensions->active_hook('stash_load_template_class') === TRUE)
{
ee()->TMPL = ee()->extensions->call('stash_load_template_class');
ee()->remove('TMPL');
ee()->set('TMPL', ee()->extensions->call('stash_load_template_class'));
}
else
{
require_once APPPATH.'libraries/Template.php';
ee()->TMPL = new EE_Template();
ee()->remove('TMPL');
ee()->set('TMPL', new EE_Template());
ee()->TMPL->modules = array('stash');
}
}
Expand Down

0 comments on commit 641e169

Please sign in to comment.