aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/install
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/install')
-rw-r--r--phpBB/phpbb/install/controller/helper.php7
-rw-r--r--phpBB/phpbb/install/controller/install.php3
-rw-r--r--phpBB/phpbb/install/controller/update.php3
-rw-r--r--phpBB/phpbb/install/helper/config.php16
-rw-r--r--phpBB/phpbb/install/helper/iohandler/factory.php2
-rw-r--r--phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php37
-rw-r--r--phpBB/phpbb/install/module/requirements/task/check_update.php16
-rw-r--r--phpBB/phpbb/install/module/update_database/task/update.php1
8 files changed, 52 insertions, 33 deletions
diff --git a/phpBB/phpbb/install/controller/helper.php b/phpBB/phpbb/install/controller/helper.php
index 6859414236..ff7e691224 100644
--- a/phpBB/phpbb/install/controller/helper.php
+++ b/phpBB/phpbb/install/controller/helper.php
@@ -183,11 +183,6 @@ class helper
if (!empty($submit))
{
$lang = $this->phpbb_request->variable('language', '');
-
- if (!empty($lang))
- {
- $this->language_cookie = $lang;
- }
}
// Retrieve language from cookie
@@ -195,10 +190,10 @@ class helper
if (empty($lang) && !empty($lang_cookie))
{
$lang = $lang_cookie;
- $this->language_cookie = $lang;
}
$lang = (!empty($lang) && strpos($lang, '/') === false) ? $lang : null;
+ $this->language_cookie = $lang;
$this->render_language_select($lang);
diff --git a/phpBB/phpbb/install/controller/install.php b/phpBB/phpbb/install/controller/install.php
index b987d91c6a..92506872a3 100644
--- a/phpBB/phpbb/install/controller/install.php
+++ b/phpBB/phpbb/install/controller/install.php
@@ -123,6 +123,7 @@ class install
// Set the appropriate input-output handler
$this->installer->set_iohandler($this->iohandler_factory->get());
+ $this->controller_helper->handle_language_select();
if ($this->request->is_ajax())
{
@@ -142,8 +143,6 @@ class install
// Determine whether the installation was started or not
if (true)
{
- $this->controller_helper->handle_language_select();
-
// Set active stage
$this->menu_provider->set_nav_property(
array('install', 0, 'introduction'),
diff --git a/phpBB/phpbb/install/controller/update.php b/phpBB/phpbb/install/controller/update.php
index 9fff11cae8..6b88827940 100644
--- a/phpBB/phpbb/install/controller/update.php
+++ b/phpBB/phpbb/install/controller/update.php
@@ -122,6 +122,7 @@ class update
// Set the appropriate input-output handler
$this->installer->set_iohandler($this->iohandler_factory->get());
+ $this->controller_helper->handle_language_select();
// Render the intro page
if ($this->request->is_ajax())
@@ -140,8 +141,6 @@ class update
}
else
{
- $this->controller_helper->handle_language_select();
-
// Set active stage
$this->menu_provider->set_nav_property(
array('update', 0, 'introduction'),
diff --git a/phpBB/phpbb/install/helper/config.php b/phpBB/phpbb/install/helper/config.php
index ab5af86320..f58925899b 100644
--- a/phpBB/phpbb/install/helper/config.php
+++ b/phpBB/phpbb/install/helper/config.php
@@ -227,18 +227,22 @@ class config
$file_content = @file_get_contents($this->install_config_file);
$serialized_data = trim(substr($file_content, 8));
- $this->installer_config = array();
- $this->progress_data = array();
- $this->navigation_data = array();
+ $installer_config = array();
+ $progress_data = array();
+ $navigation_data = array();
if (!empty($serialized_data))
{
$unserialized_data = json_decode($serialized_data, true);
- $this->installer_config = (is_array($unserialized_data['installer_config'])) ? $unserialized_data['installer_config'] : array();
- $this->progress_data = (is_array($unserialized_data['progress_data'])) ? $unserialized_data['progress_data'] : array();
- $this->navigation_data = (is_array($unserialized_data['navigation_data'])) ? $unserialized_data['navigation_data'] : array();
+ $installer_config = (is_array($unserialized_data['installer_config'])) ? $unserialized_data['installer_config'] : array();
+ $progress_data = (is_array($unserialized_data['progress_data'])) ? $unserialized_data['progress_data'] : array();
+ $navigation_data = (is_array($unserialized_data['navigation_data'])) ? $unserialized_data['navigation_data'] : array();
}
+
+ $this->installer_config = array_merge($this->installer_config, $installer_config);
+ $this->progress_data = array_merge($this->progress_data, $progress_data);
+ $this->navigation_data = array_merge($this->navigation_data, $navigation_data);
}
/**
diff --git a/phpBB/phpbb/install/helper/iohandler/factory.php b/phpBB/phpbb/install/helper/iohandler/factory.php
index 52d24e49b2..1e8395760a 100644
--- a/phpBB/phpbb/install/helper/iohandler/factory.php
+++ b/phpBB/phpbb/install/helper/iohandler/factory.php
@@ -75,7 +75,5 @@ class factory
throw new iohandler_not_implemented_exception();
break;
}
-
- throw new iohandler_not_implemented_exception();
}
}
diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php
index 6a98721e77..be6404dcd8 100644
--- a/phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php
+++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php
@@ -57,22 +57,35 @@ class obtain_update_settings extends task_base
}
else
{
+ if ($this->installer_config->get('disable_filesystem_update', false))
+ {
+ $options[] = array(
+ 'value' => 'db_only',
+ 'label' => 'UPDATE_TYPE_DB_ONLY',
+ 'selected' => true,
+ );
+ }
+ else
+ {
+ $options = array(
+ array(
+ 'value' => 'all',
+ 'label' => 'UPDATE_TYPE_ALL',
+ 'selected' => true,
+ ),
+ array(
+ 'value' => 'db_only',
+ 'label' => 'UPDATE_TYPE_DB_ONLY',
+ 'selected' => false,
+ ),
+ );
+ }
+
$this->iohandler->add_user_form_group('UPDATE_TYPE', array(
'update_type' => array(
'label' => 'UPDATE_TYPE',
'type' => 'radio',
- 'options' => array(
- array(
- 'value' => 'all',
- 'label' => 'UPDATE_TYPE_ALL',
- 'selected' => true,
- ),
- array(
- 'value' => 'db_only',
- 'label' => 'UPDATE_TYPE_DB_ONLY',
- 'selected' => false,
- ),
- ),
+ 'options' => $options,
),
'submit_update' => array(
'label' => 'SUBMIT',
diff --git a/phpBB/phpbb/install/module/requirements/task/check_update.php b/phpBB/phpbb/install/module/requirements/task/check_update.php
index c986c76810..4e9124ff47 100644
--- a/phpBB/phpbb/install/module/requirements/task/check_update.php
+++ b/phpBB/phpbb/install/module/requirements/task/check_update.php
@@ -14,6 +14,7 @@
namespace phpbb\install\module\requirements\task;
use phpbb\filesystem\filesystem;
+use phpbb\install\helper\config;
use phpbb\install\helper\container_factory;
use phpbb\install\helper\iohandler\iohandler_interface;
use phpbb\install\helper\update_helper;
@@ -35,6 +36,11 @@ class check_update extends task_base
protected $filesystem;
/**
+ * @var config
+ */
+ protected $installer_config;
+
+ /**
* @var iohandler_interface
*/
protected $iohandler;
@@ -69,14 +75,16 @@ class check_update extends task_base
*
* @param container_factory $container
* @param filesystem $filesystem
+ * @param config $config
* @param iohandler_interface $iohandler
* @param update_helper $update_helper
* @param string $phpbb_root_path
* @param string $php_ext
*/
- public function __construct(container_factory $container, filesystem $filesystem, iohandler_interface $iohandler, update_helper $update_helper, $phpbb_root_path, $php_ext)
+ public function __construct(container_factory $container, filesystem $filesystem, config $config, iohandler_interface $iohandler, update_helper $update_helper, $phpbb_root_path, $php_ext)
{
$this->filesystem = $filesystem;
+ $this->installer_config = $config;
$this->iohandler = $iohandler;
$this->update_helper = $update_helper;
$this->phpbb_root_path = $phpbb_root_path;
@@ -117,8 +125,10 @@ class check_update extends task_base
$this->iohandler->add_error_message('UPDATE_FILES_NOT_FOUND');
$this->set_test_passed(false);
- // If there are no update files, we can't check the version
- return false;
+ // If there are no update files, we can't check the version etc
+ // However, we can let the users run migrations if they really want to...
+ $this->installer_config->set('disable_filesystem_update', true);
+ return true;
}
// Recover version numbers
diff --git a/phpBB/phpbb/install/module/update_database/task/update.php b/phpBB/phpbb/install/module/update_database/task/update.php
index 4b2baf2c23..aa44d403dd 100644
--- a/phpBB/phpbb/install/module/update_database/task/update.php
+++ b/phpBB/phpbb/install/module/update_database/task/update.php
@@ -158,6 +158,7 @@ class update extends task_base
array_unshift($msg, $e->getMessage());
$this->iohandler->add_error_message($msg);
+ $this->iohandler->send_response();
throw new user_interaction_required_exception();
}