Skip to content

Commit

Permalink
Merge pull request #13056 from jeabakker/plugin-cache-flush
Browse files Browse the repository at this point in the history
fix(plugins): correctly flush caches after plugin (de)activation
  • Loading branch information
jdalsem committed Jan 24, 2020
2 parents 99c65f9 + 7a6465b commit 5fced49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engine/classes/ElggPlugin.php
Expand Up @@ -664,7 +664,7 @@ public function activate() {
// Note: this will not run re-run the init hooks!
if ($return) {
try {
_elgg_services()->events->trigger('cache:flush', 'system');
elgg_flush_caches();

$this->register();

Expand Down Expand Up @@ -696,7 +696,7 @@ public function activate() {
} else {
elgg_delete_admin_notice("cannot_start {$this->getID()}");

_elgg_services()->events->trigger('cache:flush', 'system');
elgg_flush_caches();
_elgg_services()->logger->notice("Plugin {$this->getID()} has been activated");
}

Expand Down Expand Up @@ -793,7 +793,7 @@ public function deactivate() {

$this->deactivateEntities();

_elgg_services()->events->trigger('cache:flush', 'system');
elgg_flush_caches();

_elgg_services()->logger->notice("Plugin {$this->getID()} has been deactivated");

Expand Down

0 comments on commit 5fced49

Please sign in to comment.