Merge pull request #6276 from 3D-I/ticket/16857

[ticket/16857] Remove leftover code for flash
This commit is contained in:
Marc Alexander 2021-08-27 22:38:29 +02:00 committed by GitHub
commit 3dc446d5ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 26 deletions

View file

@ -215,8 +215,6 @@ class acp_board
'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true), 'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' %'), 'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' %'),
'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true), 'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'legend3' => 'MENTIONS', 'legend3' => 'MENTIONS',
'allow_mentions' => array('lang' => 'ALLOW_MENTIONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'allow_mentions' => array('lang' => 'ALLOW_MENTIONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),

View file

@ -400,8 +400,6 @@ class phpbb_questionnaire_phpbb_data_provider
'max_poll_options' => true, 'max_poll_options' => true,
'max_post_chars' => true, 'max_post_chars' => true,
'max_post_font_size' => true, 'max_post_font_size' => true,
'max_post_img_height' => true,
'max_post_img_width' => true,
'max_post_smilies' => true, 'max_post_smilies' => true,
'max_post_urls' => true, 'max_post_urls' => true,
'max_quote_depth' => true, 'max_quote_depth' => true,

View file

@ -220,8 +220,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_num_search_key
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options', '10'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options', '10');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_chars', '60000'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_chars', '60000');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_font_size', '200'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_font_size', '200');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_img_height', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_img_width', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_smilies', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_smilies', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_urls', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_urls', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_quote_depth', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_quote_depth', '3');

View file

@ -0,0 +1,39 @@
<?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\v400;
use phpbb\db\migration\migration;
class remove_flash_v2 extends migration
{
public function effectively_installed()
{
return !$this->config->offsetExists('max_post_img_width');
}
public static function depends_on()
{
return [
'\phpbb\db\migration\data\v400\remove_flash',
];
}
public function update_data()
{
return [
['config.remove', ['max_post_img_width']],
['config.remove', ['max_post_img_height']],
];
}
}

View file

@ -315,26 +315,6 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
}, },
array('You may only use fonts up to size 120.') array('You may only use fonts up to size 120.')
), ),
array(
'[img]http://example.org/100x100.png[/img]',
'<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>',
array(true, true, true, true, true, true),
function ($phpbb_container)
{
$phpbb_container->get('config')->set('max_post_img_height', 0);
$phpbb_container->get('config')->set('max_post_img_width', 0);
}
),
array(
'[img]http://example.org/100x100.png[/img]',
'<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>',
array(true, true, true, true, true, true),
function ($phpbb_container)
{
$phpbb_container->get('config')->set('max_post_img_height', 100);
$phpbb_container->get('config')->set('max_post_img_width', 100);
}
),
array( array(
'[img]http://example.org/100x100.png[/img]', '[img]http://example.org/100x100.png[/img]',
'<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>', '<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>',