aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/assets/javascript/core.js7
-rw-r--r--phpBB/install/database_update.php14
-rw-r--r--phpBB/phpbb/console/command/db/migrate.php9
-rw-r--r--phpBB/phpbb/extension/base.php21
4 files changed, 38 insertions, 13 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 5fe78cf052..b5187991f9 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -782,12 +782,7 @@ phpbb.timezoneSwitchDate = function(keepSelection) {
.insertAfter('#timezone');
} else {
// Copy the content of our backup, so we can remove all unneeded options
- var $replacement = $timezoneCopy.clone();
- $replacement.attr('id', 'timezone')
- .css('display', 'block')
- .attr('name', 'tz');
-
- $timezone.replaceWith($replacement);
+ $timezone.html($timezoneCopy.html());
}
if ($tzDate.val() !== '') {
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 6a91033dbb..5cf01fec79 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -177,11 +177,21 @@ $migrator = $phpbb_container->get('migrator');
$migrator->create_migrations_table();
$phpbb_extension_manager = $phpbb_container->get('ext.manager');
-$finder = $phpbb_extension_manager->get_finder();
-$migrations = $finder
+$migrations = $phpbb_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 = $phpbb_extension_manager
+ ->get_finder()
+ ->extension_directory('/migrations')
+ ->get_classes();
+
+$migrations = array_merge($migrations, $migrations_deprecated);
+
$migrator->set_migrations($migrations);
// What is a safe limit of execution time? Half the max execution time should be safe.
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;
}
}