Fix cms.template.save event, should always pass the primary object as the first/second parameter.

This may be a breaking change for some, sorry about that.
This commit is contained in:
Sam Georges 2014-08-19 21:33:03 +10:00
parent 3f8d3d8eea
commit 7bd967cff5
1 changed files with 4 additions and 4 deletions

View File

@ -162,15 +162,15 @@ class Index extends Controller
/*
* Extensibility
*/
Event::fire('cms.template.save', [$this, $type]);
$this->fireEvent('cms.template.save', [$type]);
Event::fire('cms.template.save', [$this, $template, $type]);
$this->fireEvent('cms.template.save', [$template, $type]);
Flash::success(Lang::get('cms::lang.template.saved'));
$result = [
'templatePath' => $template->fileName,
'templatePath' => $template->fileName,
'templateMtime' => $template->mtime,
'tabTitle' => $this->getTabTitle($type, $template)
'tabTitle' => $this->getTabTitle($type, $template)
];
if ($type == 'page') {