From 294f926bfccc6be8a7098923b4c55ebab66e83e3 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Wed, 24 Feb 2016 22:24:08 +0100 Subject: [PATCH 1/2] [ticket/14495] Updates the version to 3.3.0-a1-dev PHPBB3-14495 --- build/build.xml | 2 +- phpBB/composer.json | 2 +- phpBB/composer.lock | 4 ++-- phpBB/docs/README.html | 8 ++++---- phpBB/includes/constants.php | 2 +- phpBB/install/convertors/convert_phpbb20.php | 2 +- phpBB/install/phpbbcli.php | 2 +- phpBB/install/schemas/schema_data.sql | 2 +- phpBB/language/en/install.php | 2 +- phpBB/phpbb/composer.json | 2 +- phpBB/styles/prosilver/style.cfg | 4 ++-- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/build.xml b/build/build.xml index d9a182fbc1..d7fc84acf5 100644 --- a/build/build.xml +++ b/build/build.xml @@ -2,7 +2,7 @@ - + diff --git a/phpBB/composer.json b/phpBB/composer.json index b0c9b57cb6..d6a4213c4a 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -62,7 +62,7 @@ }, "extra": { "branch-alias": { - "dev-master": "3.2.x-dev" + "dev-master": "3.3.x-dev" } } } diff --git a/phpBB/composer.lock b/phpBB/composer.lock index d10c94a75f..b0664f2bee 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "9cbb41222e71eb86e0ef9118baafc691", - "content-hash": "03a990fa2d088c89afe4824d2d53e873", + "hash": "e61304256160e9e0c521a4996912d65d", + "content-hash": "64ae8ac9ac0cc8b1f47e58f43e2d7461", "packages": [ { "name": "bantu/ini-get-wrapper", diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index 96af78f48a..10f4cb218f 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -3,7 +3,7 @@ - + phpBB • Readme @@ -20,7 +20,7 @@
-

phpBB 3.1.x Readme

+

phpBB 3.3.x Readme

Skip

@@ -224,7 +224,7 @@
-

This is a stable release of phpBB. The 3.1.x line is feature frozen, with point releases principally including fixes for bugs and security issues. Feature alterations and minor feature additions may be done if deemed absolutely required. The next major release will be phpBB 3.2 which is currently under development. Please do not post questions asking when 3.2 will be available, no release date has been set.

+

This is a stable release of phpBB. The 3.2.x line is feature frozen, with point releases principally including fixes for bugs and security issues. Feature alterations and minor feature additions may be done if deemed absolutely required. The next major release will be phpBB 3.3 which is currently under development. Please do not post questions asking when 3.3 will be available, no release date has been set.

Those interested in the development of phpBB should keep an eye on the development forums to see how things are progressing:

@@ -323,7 +323,7 @@
-

phpBB 3.2.x takes advantage of new features added in PHP 5.4. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 5.4.0 and the maximum supported version is PHP 7.0.

+

phpBB 3.3.x takes advantage of new features added in PHP 5.4. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 5.4.0 and the maximum supported version is PHP 7.0.

Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.

diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index f2b56cc84b..db29be617f 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -28,7 +28,7 @@ if (!defined('IN_PHPBB')) */ // phpBB Version -@define('PHPBB_VERSION', '3.2.0-b2-dev'); +@define('PHPBB_VERSION', '3.3.0-a1-dev'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 414d23623a..d0885dc620 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms); $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', 'version' => '1.0.3', - 'phpbb_version' => '3.2.0-b1', + 'phpbb_version' => '3.3.0-a1-dev', 'author' => 'phpBB Limited', 'dbms' => $dbms, 'dbhost' => $dbhost, diff --git a/phpBB/install/phpbbcli.php b/phpBB/install/phpbbcli.php index 70a8a9c7ea..a7e700c7cd 100755 --- a/phpBB/install/phpbbcli.php +++ b/phpBB/install/phpbbcli.php @@ -23,7 +23,7 @@ if (php_sapi_name() !== 'cli') define('IN_PHPBB', true); define('IN_INSTALL', true); define('PHPBB_ENVIRONMENT', 'production'); -define('PHPBB_VERSION', '3.2.0-b2-dev'); +define('PHPBB_VERSION', '3.3.0-a1-dev'); $phpbb_root_path = __DIR__ . '/../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index ede31e53e6..1ea987c577 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -276,7 +276,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0 INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.0-b2-dev'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.0-a1-dev'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 31578824ef..f21023a4e4 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -523,7 +523,7 @@ $lang = array_merge($lang, array( // Finish conversion 'CONVERT_COMPLETE' => 'Conversion completed', - 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.2. You can now login and access your board. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the Documentation and the support forums.', + 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.3. You can now login and access your board. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the Documentation and the support forums.', 'CONV_ERROR_ATTACH_FTP_DIR' => 'FTP upload for attachments is enabled at the old board. Please disable the FTP upload option and make sure a valid upload directory is specified, then copy all attachment files to this new web accessible directory. Once you have done this, restart the convertor.', 'CONV_ERROR_CONFIG_EMPTY' => 'There is no configuration information available for the conversion.', diff --git a/phpBB/phpbb/composer.json b/phpBB/phpbb/composer.json index 758125234f..0b6299d6bc 100644 --- a/phpBB/phpbb/composer.json +++ b/phpBB/phpbb/composer.json @@ -26,7 +26,7 @@ }, "extra": { "branch-alias": { - "dev-master": "3.2.x-dev" + "dev-master": "3.3.x-dev" } } } diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg index ec7d8d2e27..e0b87f2398 100644 --- a/phpBB/styles/prosilver/style.cfg +++ b/phpBB/styles/prosilver/style.cfg @@ -21,8 +21,8 @@ # General Information about this style name = prosilver copyright = © phpBB Limited, 2007 -style_version = 3.2.0-b1 -phpbb_version = 3.2.0-b1 +style_version = 3.3.0-dev +phpbb_version = 3.3.0-dev # Defining a different template bitfield # template_bitfield = lNg= From 0ff4a6b6a4151f25d94d7b4f651b069e21b036b2 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Thu, 24 Mar 2016 19:49:23 +0100 Subject: [PATCH 2/2] [ticket/14381] Set the mode in message parser to "reparse" The default mode is "post". By setting it to something else, all limits pertaining to posts (min/max length, etc...) should be disabled. PHPBB3-14381 --- phpBB/phpbb/textreparser/base.php | 3 +- tests/text_reparser/base_test.php | 70 +++++++++++++++++++++++++++ tests/text_reparser/fixtures/base.xml | 19 ++++++++ 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 tests/text_reparser/base_test.php create mode 100644 tests/text_reparser/fixtures/base.xml diff --git a/phpBB/phpbb/textreparser/base.php b/phpBB/phpbb/textreparser/base.php index 3e5ee248a1..afa5ccacad 100644 --- a/phpBB/phpbb/textreparser/base.php +++ b/phpBB/phpbb/textreparser/base.php @@ -230,7 +230,8 @@ abstract class base implements reparser_interface $unparsed['enable_img_bbcode'], $unparsed['enable_flash_bbcode'], $unparsed['enable_quote_bbcode'], - $unparsed['enable_url_bbcode'] + $unparsed['enable_url_bbcode'], + 'reparse' ); // Save the new text if it has changed and it's not a dry run diff --git a/tests/text_reparser/base_test.php b/tests/text_reparser/base_test.php new file mode 100644 index 0000000000..2223ead9a6 --- /dev/null +++ b/tests/text_reparser/base_test.php @@ -0,0 +1,70 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ +require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once __DIR__ . '/../../phpBB/includes/functions_content.php'; +require_once __DIR__ . '/../test_framework/phpbb_database_test_case.php'; + +class phpbb_textreparser_base_test extends phpbb_database_test_case +{ + protected $db; + + public function setUp() + { + global $config; + if (!isset($config)) + { + $config = new \phpbb\config\config(array()); + } + $this->get_test_case_helpers()->set_s9e_services(); + $this->db = $this->new_dbal(); + parent::setUp(); + } + + public function getDataSet() + { + return $this->createXMLDataSet(__DIR__ . '/fixtures/base.xml'); + } + + protected function get_reparser() + { + return new \phpbb\textreparser\plugins\post_text($this->db, POSTS_TABLE); + } + + protected function get_rows(array $ids) + { + $sql = 'SELECT post_id AS id, post_text AS text + FROM ' . POSTS_TABLE . ' + WHERE ' . $this->db->sql_in_set('post_id', $ids) . ' + ORDER BY id'; + $result = $this->db->sql_query($sql); + $rows = $this->db->sql_fetchrowset($result); + $this->db->sql_freeresult($result); + + return $rows; + } + + public function test_reparse_empty() + { + $this->get_reparser()->reparse_range(1, 1); + + $this->assertEquals( + array( + array( + 'id' => 1, + 'text' => '' + ) + ), + $this->get_rows(array(1)) + ); + } +} diff --git a/tests/text_reparser/fixtures/base.xml b/tests/text_reparser/fixtures/base.xml new file mode 100644 index 0000000000..a4921a8823 --- /dev/null +++ b/tests/text_reparser/fixtures/base.xml @@ -0,0 +1,19 @@ + + + + post_id + enable_bbcode + enable_smilies + enable_magic_url + post_text + bbcode_uid + + 1 + 1 + 1 + 1 + + abcd1234 + +
+