diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index d457b13cb4..959388e075 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -260,8 +260,6 @@ class acp_board 'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true), 'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' %'), 'max_sig_smilies' => array('lang' => 'MAX_SIG_SMILIES', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true), - 'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), - 'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), 'legend3' => 'ACP_SUBMIT_CHANGES', ) diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 337b6ccab8..9b381d22f8 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1179,8 +1179,6 @@ class parse_message extends bbcode_firstpass // Set some config values $parser->set_vars(array( 'max_font_size' => $config['max_' . $this->mode . '_font_size'], - 'max_img_height' => $config['max_' . $this->mode . '_img_height'], - 'max_img_width' => $config['max_' . $this->mode . '_img_width'], 'max_smilies' => $config['max_' . $this->mode . '_smilies'], 'max_urls' => $config['max_' . $this->mode . '_urls'] )); diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index 24a4ce53b4..74675e0e03 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -404,8 +404,6 @@ class phpbb_questionnaire_phpbb_data_provider 'max_reg_attempts' => true, 'max_sig_chars' => true, 'max_sig_font_size' => true, - 'max_sig_img_height' => true, - 'max_sig_img_width' => true, 'max_sig_smilies' => true, 'max_sig_urls' => true, 'min_name_chars' => true, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 084f8ff7c1..a160057fd2 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -225,8 +225,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_quote_depth', INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_reg_attempts', '5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_chars', '255'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_font_size', '200'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_img_height', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_img_width', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_smilies', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_urls', '5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('mention_batch_size', '50'); diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index def1b01c60..8401f24e0a 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -208,10 +208,6 @@ $lang = array_merge($lang, array( 'MAX_SIG_FONT_SIZE' => 'Maximum signature font size', 'MAX_SIG_FONT_SIZE_EXPLAIN' => 'Maximum font size allowed in user signatures. Set to 0 for unlimited size.', - 'MAX_SIG_IMG_HEIGHT' => 'Maximum signature image height', - 'MAX_SIG_IMG_HEIGHT_EXPLAIN' => 'Maximum height of an image file in user signatures. Set to 0 for unlimited height.', - 'MAX_SIG_IMG_WIDTH' => 'Maximum signature image width', - 'MAX_SIG_IMG_WIDTH_EXPLAIN' => 'Maximum width of an image file in user signatures. Set to 0 for unlimited width.', 'MAX_SIG_LENGTH' => 'Maximum signature length', 'MAX_SIG_LENGTH_EXPLAIN' => 'Maximum number of characters in user signatures.', 'MAX_SIG_SMILIES' => 'Maximum smilies per signature', diff --git a/phpBB/phpbb/db/migration/data/v400/remove_max_img_size.php b/phpBB/phpbb/db/migration/data/v400/remove_max_img_size.php new file mode 100644 index 0000000000..8a5338a454 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v400/remove_max_img_size.php @@ -0,0 +1,34 @@ + + * @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\v400; + +use phpbb\db\migration\migration; + +class remove_max_img_size extends migration +{ + public static function depends_on(): array + { + return [ + '\phpbb\db\migration\data\v400\dev', + ]; + } + + public function update_data(): array + { + return [ + ['config.remove', ['max_sig_img_width']], + ['config.remove', ['max_sig_img_height']], + ]; + } +} diff --git a/phpBB/phpbb/textformatter/parser_interface.php b/phpBB/phpbb/textformatter/parser_interface.php index ad611fb5b4..1430bfd5d3 100644 --- a/phpBB/phpbb/textformatter/parser_interface.php +++ b/phpBB/phpbb/textformatter/parser_interface.php @@ -91,8 +91,6 @@ interface parser_interface * Set a variable to be used by the parser * * - max_font_size - * - max_img_height - * - max_img_width * - max_smilies * - max_urls * diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php index 7195f95915..79521b753b 100644 --- a/phpBB/phpbb/textformatter/s9e/factory.php +++ b/phpBB/phpbb/textformatter/s9e/factory.php @@ -355,8 +355,6 @@ class factory implements \phpbb\textformatter\cache_interface // Register some vars with a default value. Those should be set at runtime by whatever calls // the parser $configurator->registeredVars['max_font_size'] = 0; - $configurator->registeredVars['max_img_height'] = 0; - $configurator->registeredVars['max_img_width'] = 0; // Load the Emoji plugin and modify its tag's template to obey viewsmilies $tag = $configurator->Emoji->getTag(); diff --git a/tests/functional/manifest_test.php b/tests/functional/manifest_test.php index f100d9bdff..2099dd7661 100644 --- a/tests/functional/manifest_test.php +++ b/tests/functional/manifest_test.php @@ -18,14 +18,16 @@ class phpbb_functional_manifest_test extends phpbb_functional_test_case { public function test_manifest() { + $url_path = preg_replace('#^(/.+)/$#', '$1', parse_url(self::$root_url, PHP_URL_PATH)); + $expected = [ 'name' => 'yourdomain.com', 'short_name' => 'yourdomain', 'display' => 'standalone', 'orientation' => 'portrait', 'dir' => 'ltr', - 'start_url' => '/', - 'scope' => '/', + 'start_url' => $url_path, + 'scope' => $url_path, ]; $this->login(); diff --git a/tests/text_processing/message_parser_test.php b/tests/text_processing/message_parser_test.php index 0f74eacbe6..93c0bd6652 100644 --- a/tests/text_processing/message_parser_test.php +++ b/tests/text_processing/message_parser_test.php @@ -40,8 +40,6 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case $map = array( array('MAX_FONT_SIZE_EXCEEDED', 120, 'You may only use fonts up to size 120.'), array('MAX_FONT_SIZE_EXCEEDED', 200, 'You may only use fonts up to size 200.'), - array('MAX_IMG_HEIGHT_EXCEEDED', 12, 'Your images may only be up to 12 pixels high.'), - array('MAX_IMG_WIDTH_EXCEEDED', 34, 'Your images may only be up to 34 pixels wide.'), array('TOO_MANY_SMILIES', 3, 'Your message contains too many smilies. The maximum number of smilies allowed is 3.'), array('TOO_MANY_URLS', 2, 'Your message contains too many URLs. The maximum number of URLs allowed is 2.'), array('UNAUTHORISED_BBCODE', '[img]', 'You cannot use certain BBCodes: [img].'),