aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/extension/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/extension/base.php')
-rw-r--r--phpBB/phpbb/extension/base.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php
index cbbd7bc622..5bb530bad4 100644
--- a/phpBB/phpbb/extension/base.php
+++ b/phpBB/phpbb/extension/base.php
@@ -35,11 +35,15 @@ class base implements \phpbb\extension\extension_interface
/** @var string */
protected $extension_path;
+ /** @var string[] */
+ private $migrations = false;
+
/**
* Constructor
*
* @param ContainerInterface $container Container object
* @param \phpbb\finder $extension_finder
+ * @param \phpbb\db\migrator $migrator
* @param string $extension_name Name of this extension (from ext.manager)
* @param string $extension_path Relative path to this extension
*/
@@ -54,6 +58,14 @@ class base implements \phpbb\extension\extension_interface
}
/**
+ * {@inheritdoc}
+ */
+ public function is_enableable()
+ {
+ return true;
+ }
+
+ /**
* Single enable step that installs any included migrations
*
* @param mixed $old_state State returned by previous call of this method
@@ -113,17 +125,16 @@ class base implements \phpbb\extension\extension_interface
*/
protected function get_migration_file_list()
{
- static $migrations = false;
-
- if ($migrations !== false)
+ if ($this->migrations !== false)
{
- return $migrations;
+ return $this->migrations;
}
// Only have the finder search in this extension path directory
$migrations = $this->extension_finder
->extension_directory('/migrations')
->find_from_extension($this->extension_name, $this->extension_path);
+
$migrations = $this->extension_finder->get_classes_from_files($migrations);
return $migrations;