Skip to content

Commit

Permalink
Dev: inverse logic : return => remove not
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Oct 8, 2018
1 parent caf0652 commit 4399b94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/models/behaviors/PluginEventBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function afterSave(CEvent $event)
{
$pluginManager = App()->getPluginManager();
// Don't propagate event if we're in a shutdown, since it will lead to an infinite loop.
if (!$pluginManager->shutdownObject->isEnabled()) {
if ($pluginManager->shutdownObject->isEnabled()) {
return;
}
$this->dispatchPluginModelEvent('after'.get_class($this->owner).'Save');
Expand All @@ -49,7 +49,7 @@ public function beforeSave(CModelEvent $event)
{
$pluginManager = App()->getPluginManager();
// Don't propagate event if we're in a shutdown, since it will lead to an infinite loop.
if (!$pluginManager->shutdownObject->isEnabled()) {
if ($pluginManager->shutdownObject->isEnabled()) {
return;
}
$this->dispatchPluginModelEvent('before'.get_class($this->owner).'Save');
Expand Down

0 comments on commit 4399b94

Please sign in to comment.