1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 19:54:12 +02:00

Merge pull request #2729 from Nicofuma/ticket/12847

[ticket/12847] Allow the extensions to say if they can be enabled

* Nicofuma/ticket/12847:
  [ticket/12847] Allow the extensions to say if they can be enabled
This commit is contained in:
Joas Schilling
2014-08-07 13:00:08 +02:00
9 changed files with 96 additions and 2 deletions

View File

@@ -178,6 +178,12 @@ class manager
$old_state = (isset($this->extensions[$name]['ext_state'])) ? unserialize($this->extensions[$name]['ext_state']) : false;
$extension = $this->get_extension($name);
if (!$extension->is_enableable())
{
return false;
}
$state = $extension->enable_step($old_state);
$active = ($state === false);