diff options
Diffstat (limited to 'phpBB/phpbb')
15 files changed, 136 insertions, 16 deletions
diff --git a/phpBB/phpbb/db/migration/data/v320/allowed_schemes_links.php b/phpBB/phpbb/db/migration/data/v320/allowed_schemes_links.php index de127e3745..726822bc71 100644 --- a/phpBB/phpbb/db/migration/data/v320/allowed_schemes_links.php +++ b/phpBB/phpbb/db/migration/data/v320/allowed_schemes_links.php @@ -15,6 +15,13 @@ namespace phpbb\db\migration\data\v320; class allowed_schemes_links extends \phpbb\db\migration\migration { + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v320\dev', + ); + } + public function update_data() { return array( diff --git a/phpBB/phpbb/db/migration/data/v320/announce_global_permission.php b/phpBB/phpbb/db/migration/data/v320/announce_global_permission.php index fe30a1c1b8..7afecb884b 100644 --- a/phpBB/phpbb/db/migration/data/v320/announce_global_permission.php +++ b/phpBB/phpbb/db/migration/data/v320/announce_global_permission.php @@ -29,7 +29,9 @@ class announce_global_permission extends \phpbb\db\migration\migration static public function depends_on() { - return array('\phpbb\db\migration\data\v310\rc2'); + return array( + '\phpbb\db\migration\data\v320\dev', + ); } public function update_data() diff --git a/phpBB/phpbb/db/migration/data/v320/dev.php b/phpBB/phpbb/db/migration/data/v320/dev.php new file mode 100644 index 0000000000..ad2da3c1f4 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v320/dev.php @@ -0,0 +1,36 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v320; + +class dev extends \phpbb\db\migration\container_aware_migration +{ + public function effectively_installed() + { + return version_compare($this->config['version'], '3.2.0-dev', '>='); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v31x\v316', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.2.0-dev')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v320/font_awesome_update.php b/phpBB/phpbb/db/migration/data/v320/font_awesome_update.php index 6ffaf18b4a..817b638037 100644 --- a/phpBB/phpbb/db/migration/data/v320/font_awesome_update.php +++ b/phpBB/phpbb/db/migration/data/v320/font_awesome_update.php @@ -15,6 +15,13 @@ namespace phpbb\db\migration\data\v320; class font_awesome_update extends \phpbb\db\migration\migration { + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v320\dev', + ); + } + public function effectively_installed() { return isset($this->config['load_font_awesome_url']); diff --git a/phpBB/phpbb/db/migration/data/v320/icons_alt.php b/phpBB/phpbb/db/migration/data/v320/icons_alt.php index 7071ae78db..80132e579e 100644 --- a/phpBB/phpbb/db/migration/data/v320/icons_alt.php +++ b/phpBB/phpbb/db/migration/data/v320/icons_alt.php @@ -17,7 +17,9 @@ class icons_alt extends \phpbb\db\migration\migration { static public function depends_on() { - return array('\phpbb\db\migration\data\v310\dev'); + return array( + '\phpbb\db\migration\data\v320\dev', + ); } public function update_schema() diff --git a/phpBB/phpbb/db/migration/data/v320/log_post_id.php b/phpBB/phpbb/db/migration/data/v320/log_post_id.php index 0f155d543c..ead53c8138 100644 --- a/phpBB/phpbb/db/migration/data/v320/log_post_id.php +++ b/phpBB/phpbb/db/migration/data/v320/log_post_id.php @@ -17,7 +17,9 @@ class log_post_id extends \phpbb\db\migration\migration { static public function depends_on() { - return array('\phpbb\db\migration\data\v310\dev'); + return array( + '\phpbb\db\migration\data\v320\dev', + ); } public function update_schema() diff --git a/phpBB/phpbb/db/migration/data/v320/notifications_board.php b/phpBB/phpbb/db/migration/data/v320/notifications_board.php index fd9f1a2ad6..8a76ebab58 100644 --- a/phpBB/phpbb/db/migration/data/v320/notifications_board.php +++ b/phpBB/phpbb/db/migration/data/v320/notifications_board.php @@ -17,7 +17,9 @@ class notifications_board extends \phpbb\db\migration\migration { static public function depends_on() { - return array('\phpbb\db\migration\data\v310\notifications'); + return array( + '\phpbb\db\migration\data\v320\dev', + ); } public function update_data() diff --git a/phpBB/phpbb/db/migration/data/v320/remove_outdated_media.php b/phpBB/phpbb/db/migration/data/v320/remove_outdated_media.php index 59208be4dc..c14d31f1c0 100644 --- a/phpBB/phpbb/db/migration/data/v320/remove_outdated_media.php +++ b/phpBB/phpbb/db/migration/data/v320/remove_outdated_media.php @@ -21,6 +21,13 @@ class remove_outdated_media extends \phpbb\db\migration\migration ATTACHMENT_CATEGORY_QUICKTIME, ); + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v320\dev', + ); + } + public function update_data() { return array( diff --git a/phpBB/phpbb/db/migration/data/v320/remove_profilefield_wlm.php b/phpBB/phpbb/db/migration/data/v320/remove_profilefield_wlm.php index 2898c708f8..1cb9070bf9 100644 --- a/phpBB/phpbb/db/migration/data/v320/remove_profilefield_wlm.php +++ b/phpBB/phpbb/db/migration/data/v320/remove_profilefield_wlm.php @@ -17,7 +17,9 @@ class remove_profilefield_wlm extends \phpbb\db\migration\migration { static public function depends_on() { - return array('\phpbb\db\migration\data\v310\profilefield_wlm'); + return array( + '\phpbb\db\migration\data\v320\dev', + ); } public function update_schema() diff --git a/phpBB/phpbb/db/migration/data/v320/v320a1.php b/phpBB/phpbb/db/migration/data/v320/v320a1.php new file mode 100644 index 0000000000..d7ecb36f90 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v320/v320a1.php @@ -0,0 +1,44 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v320; + +class v320a1 extends \phpbb\db\migration\container_aware_migration +{ + public function effectively_installed() + { + return version_compare($this->config['version'], '3.2.0-a1', '>='); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v320\dev', + '\phpbb\db\migration\data\v320\allowed_schemes_links', + '\phpbb\db\migration\data\v320\announce_global_permission', + '\phpbb\db\migration\data\v320\remove_profilefield_wlm', + '\phpbb\db\migration\data\v320\font_awesome_update', + '\phpbb\db\migration\data\v320\icons_alt', + '\phpbb\db\migration\data\v320\log_post_id', + '\phpbb\db\migration\data\v320\remove_outdated_media', + '\phpbb\db\migration\data\v320\notifications_board', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.2.0-dev')), + ); + } +} diff --git a/phpBB/phpbb/install/console/command/install/config/show.php b/phpBB/phpbb/install/console/command/install/config/show.php index 4155440fc3..5d82d8d1ef 100644 --- a/phpBB/phpbb/install/console/command/install/config/show.php +++ b/phpBB/phpbb/install/console/command/install/config/show.php @@ -96,7 +96,7 @@ class show extends \phpbb\console\command\command if (!is_file($config_file)) { - $iohandler->add_error_message(array('MISSING_FILE', array($config_file))); + $iohandler->add_error_message(array('MISSING_FILE', $config_file)); return; } diff --git a/phpBB/phpbb/install/console/command/install/install.php b/phpBB/phpbb/install/console/command/install/install.php index 81ad1039f6..d76182af92 100644 --- a/phpBB/phpbb/install/console/command/install/install.php +++ b/phpBB/phpbb/install/console/command/install/install.php @@ -116,7 +116,7 @@ class install extends \phpbb\console\command\command if (!is_file($config_file)) { - $iohandler->add_error_message(array('MISSING_FILE', array($config_file))); + $iohandler->add_error_message(array('MISSING_FILE', $config_file)); return 1; } @@ -127,7 +127,7 @@ class install extends \phpbb\console\command\command } catch (ParseException $e) { - $iohandler->add_error_message('INVALID_YAML_FILE'); + $iohandler->add_error_message(array('INVALID_YAML_FILE', $config_file)); return 1; } diff --git a/phpBB/phpbb/install/installer.php b/phpBB/phpbb/install/installer.php index 77e0a896bc..a41b4cd6a6 100644 --- a/phpBB/phpbb/install/installer.php +++ b/phpBB/phpbb/install/installer.php @@ -13,6 +13,7 @@ namespace phpbb\install; +use phpbb\cache\driver\driver_interface; use phpbb\di\ordered_service_collection; use phpbb\install\exception\installer_config_not_writable_exception; use phpbb\install\exception\jump_to_restart_point_exception; @@ -26,6 +27,11 @@ use phpbb\path_helper; class installer { /** + * @var driver_interface + */ + protected $cache; + + /** * @var config */ protected $install_config; @@ -55,11 +61,13 @@ class installer /** * Constructor * - * @param config $config Installer config handler - * @param path_helper $path_helper Path helper + * @param driver_interface $cache Cache service + * @param config $config Installer config handler + * @param path_helper $path_helper Path helper */ - public function __construct(config $config, path_helper $path_helper) + public function __construct(driver_interface $cache, config $config, path_helper $path_helper) { + $this->cache = $cache; $this->install_config = $config; $this->installer_modules = null; $this->web_root = $path_helper->get_web_root_path(); @@ -235,6 +243,7 @@ class installer if ($install_finished || $fail_cleanup) { $this->install_config->clean_up_config_file(); + $this->cache->purge(); } else { diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_admin_data.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_admin_data.php index 41616e995a..ac305e8ab5 100644 --- a/phpBB/phpbb/install/module/obtain_data/task/obtain_admin_data.php +++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_admin_data.php @@ -70,7 +70,7 @@ class obtain_admin_data extends \phpbb\install\task_base implements \phpbb\insta $admin_name = $this->io_handler->get_input('admin_name', '', true); $admin_pass1 = $this->io_handler->get_input('admin_pass1', '', true); $admin_pass2 = $this->io_handler->get_input('admin_pass2', '', true); - $board_email = $this->io_handler->get_input('board_email', ''); + $board_email = $this->io_handler->get_input('board_email', '', true); $admin_data_valid = $this->check_admin_data($admin_name, $admin_pass1, $admin_pass2, $board_email); diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_board_data.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_board_data.php index 4e977981ce..6c54561d14 100644 --- a/phpBB/phpbb/install/module/obtain_data/task/obtain_board_data.php +++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_board_data.php @@ -76,8 +76,8 @@ class obtain_board_data extends \phpbb\install\task_base implements \phpbb\insta { // Board data $default_lang = $this->io_handler->get_input('default_lang', ''); - $board_name = $this->io_handler->get_input('board_name', ''); - $board_desc = $this->io_handler->get_input('board_description', ''); + $board_name = $this->io_handler->get_input('board_name', '', true); + $board_desc = $this->io_handler->get_input('board_description', '', true); // Check default lang $langs = $this->language_helper->get_available_languages(); @@ -116,8 +116,8 @@ class obtain_board_data extends \phpbb\install\task_base implements \phpbb\insta { if ($use_request_data) { - $board_name = $this->io_handler->get_input('board_name', ''); - $board_desc = $this->io_handler->get_input('board_description', ''); + $board_name = $this->io_handler->get_input('board_name', '', true); + $board_desc = $this->io_handler->get_input('board_description', '', true); } else { |