diff --git a/phpBB/includes/acp/acp_storage.php b/phpBB/includes/acp/acp_storage.php
index 35c07074b6..a35f6d4f0c 100644
--- a/phpBB/includes/acp/acp_storage.php
+++ b/phpBB/includes/acp/acp_storage.php
@@ -378,7 +378,6 @@ class acp_storage
foreach ($this->storage_collection as $storage)
{
$storage_name = $storage->get_name();
- $options = $this->storage_helper->get_provider_options($this->storage_helper->get_current_provider($storage_name));
$modified = false;
@@ -389,6 +388,8 @@ class acp_storage
}
else
{
+ $options = $this->storage_helper->get_provider_options($this->storage_helper->get_current_provider($storage_name));
+
// Check if options have been modified
foreach (array_keys($options) as $definition)
{
@@ -535,30 +536,29 @@ class acp_storage
$this->validate_path($storage_name, $messages);
// Check options
- $new_options = $this->storage_helper->get_provider_options($this->request->variable([$storage_name, 'provider'], ''));
+ $new_provider = $this->provider_collection->get_by_class($this->request->variable([$storage_name, 'provider'], ''));
- foreach ($new_options as $definition_key => $definition_value)
+ foreach ($new_provider->get_options() as $definition_key => $definition_value)
{
- $provider = $this->provider_collection->get_by_class($this->request->variable([$storage_name, 'provider'], ''));
- $definition_title = $this->lang->lang('STORAGE_ADAPTER_' . strtoupper($provider->get_name()) . '_OPTION_' . strtoupper($definition_key));
+ $definition_title = $definition_value['title'];
$value = $this->request->variable([$storage_name, $definition_key], '');
- switch ($definition_value['tag'])
+ switch ($definition_value['form_macro']['tag'])
{
case 'text':
- if ($definition_value['type'] == 'email' && filter_var($value, FILTER_VALIDATE_EMAIL))
+ if ($definition_value['form_macro']['type'] === 'email' && filter_var($value, FILTER_VALIDATE_EMAIL))
{
$messages[] = $this->lang->lang('STORAGE_FORM_TYPE_EMAIL_INCORRECT_FORMAT', $definition_title, $storage_title);
}
- $maxlength = $definition_value['max'] ?? 255;
+ $maxlength = $definition_value['form_macro']['max'] ?? 255;
if (strlen($value) > $maxlength)
{
$messages[] = $this->lang->lang('STORAGE_FORM_TYPE_TEXT_TOO_LONG', $definition_title, $storage_title);
}
- if ($provider->get_name() == 'local' && $definition_key == 'path')
+ if ($new_provider->get_name() === 'local' && $definition_key === 'path')
{
$path = $value;
@@ -575,7 +575,7 @@ class acp_storage
case 'radio':
$found = false;
- foreach ($definition_value['buttons'] as $button)
+ foreach ($definition_value['form_macro']['buttons'] as $button)
{
if ($button['value'] == $value)
{
@@ -592,7 +592,7 @@ class acp_storage
case 'select':
$found = false;
- foreach ($definition_value['options'] as $option)
+ foreach ($definition_value['form_macro']['options'] as $option)
{
if ($option['value'] == $value)
{
diff --git a/phpBB/phpbb/db/migration/data/v400/storage_backup_data.php b/phpBB/phpbb/db/migration/data/v400/storage_backup_data.php
index 507d4a09d9..772a03b945 100644
--- a/phpBB/phpbb/db/migration/data/v400/storage_backup_data.php
+++ b/phpBB/phpbb/db/migration/data/v400/storage_backup_data.php
@@ -42,7 +42,6 @@ class storage_backup_data extends migration
{
while (($file = readdir($dh)) !== false)
{
- echo "FILE $file\n";
if (preg_match('#^backup_(\d{10,})_(?:[a-z\d]{16}|[a-z\d]{32})\.(sql(?:\.(?:gz|bz2))?)$#i', $file, $matches))
{
if (in_array($matches[2], $methods))
diff --git a/phpBB/phpbb/language/language.php b/phpBB/phpbb/language/language.php
index 1c51049de5..4336c8f9f2 100644
--- a/phpBB/phpbb/language/language.php
+++ b/phpBB/phpbb/language/language.php
@@ -230,10 +230,10 @@ class language
* Params are the language key and the parameters to be substituted.
* This function/functionality is inspired by SHS` and Ashe.
*
- * Example call: $user->lang('NUM_POSTS_IN_QUEUE', 1);
+ * Example call: $language->lang('NUM_POSTS_IN_QUEUE', 1);
*
* If the first parameter is an array, the elements are used as keys and subkeys to get the language entry:
- * Example: $user->lang(array('datetime', 'AGO'), 1) uses $user->lang['datetime']['AGO'] as language entry.
+ * Example: $language->lang(array('datetime', 'AGO'), 1) uses $language->lang['datetime']['AGO'] as language entry.
*
* @return string Return localized string or the language key if the translation is not available
*/
diff --git a/phpBB/phpbb/storage/adapter_factory.php b/phpBB/phpbb/storage/adapter_factory.php
index 1cf4ae12cd..e80d25cfbc 100644
--- a/phpBB/phpbb/storage/adapter_factory.php
+++ b/phpBB/phpbb/storage/adapter_factory.php
@@ -89,7 +89,7 @@ class adapter_factory
}
$adapter = $this->adapters->get_by_class($provider->get_adapter_class());
- $options['storage'] = $storage_name; // Inject storage name into options so it can be used by extensiosn
+ $options['storage'] = $storage_name; // Inject storage name into options so it can be used by extensions
$adapter->configure($options);
return $adapter;