aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-09-17 00:37:07 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-09-17 00:37:07 +0200
commit5fa2d197566c0f443bbdd71101b6c7876158dea6 (patch)
treeb1284f0f3257d24a155efc974ab4b1482191b7e8 /phpBB/phpbb
parentb82a39fea9c48cb36677ed0aaf2dcb5531848d31 (diff)
parent4a06511d853024193435fd9b2e347ff292589420 (diff)
downloadforums-5fa2d197566c0f443bbdd71101b6c7876158dea6.tar
forums-5fa2d197566c0f443bbdd71101b6c7876158dea6.tar.gz
forums-5fa2d197566c0f443bbdd71101b6c7876158dea6.tar.bz2
forums-5fa2d197566c0f443bbdd71101b6c7876158dea6.tar.xz
forums-5fa2d197566c0f443bbdd71101b6c7876158dea6.zip
Merge branch 'develop-ascraeus' into develop
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/console/command/db/migrate.php9
-rw-r--r--phpBB/phpbb/extension/base.php21
2 files changed, 25 insertions, 5 deletions
diff --git a/phpBB/phpbb/console/command/db/migrate.php b/phpBB/phpbb/console/command/db/migrate.php
index c3caae5f70..68638a9515 100644
--- a/phpBB/phpbb/console/command/db/migrate.php
+++ b/phpBB/phpbb/console/command/db/migrate.php
@@ -117,8 +117,17 @@ class migrate extends \phpbb\console\command\command
$migrations = $this->extension_manager
->get_finder()
->core_path('phpbb/db/migration/data/')
+ ->extension_directory('/migration')
+ ->get_classes();
+
+ // @deprecated 3.1.0-RC4 (To be removed: 3.2.0)
+ $migrations_deprecated = $this->extension_manager
+ ->get_finder()
->extension_directory('/migrations')
->get_classes();
+
+ $migrations = array_merge($migrations, $migrations_deprecated);
+
$this->migrator->set_migrations($migrations);
}
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php
index 288fb7d19c..b74026e6ab 100644
--- a/phpBB/phpbb/extension/base.php
+++ b/phpBB/phpbb/extension/base.php
@@ -35,6 +35,9 @@ class base implements \phpbb\extension\extension_interface
/** @var string */
protected $extension_path;
+ /** @var string[] */
+ private $migrations = false;
+
/**
* Constructor
*
@@ -122,19 +125,27 @@ 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')
+ ->extension_directory('/migration')
->find_from_extension($this->extension_name, $this->extension_path);
+
$migrations = $this->extension_finder->get_classes_from_files($migrations);
+ // @deprecated 3.1.0-RC4 (To be removed: 3.2.0)
+ $migrations_deprecated = $this->extension_finder
+ ->extension_directory('/migrations')
+ ->find_from_extension($this->extension_name, $this->extension_path);
+
+ $migrations_deprecated = $this->extension_finder->get_classes_from_files($migrations_deprecated);
+
+ $migrations = array_merge($migrations, $migrations_deprecated);
+
return $migrations;
}
}