aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2016-03-25 11:03:27 +0100
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-03-25 11:03:27 +0100
commitf6cc30cbfe08377c2e6f5ce332bef2ad240cb950 (patch)
tree2cd84793d5a54a4d08f956eb387a7d3a83da94cd
parent23be4d8af21319644a008670c292ca19044430cd (diff)
parent0ff4a6b6a4151f25d94d7b4f651b069e21b036b2 (diff)
downloadforums-f6cc30cbfe08377c2e6f5ce332bef2ad240cb950.tar
forums-f6cc30cbfe08377c2e6f5ce332bef2ad240cb950.tar.gz
forums-f6cc30cbfe08377c2e6f5ce332bef2ad240cb950.tar.bz2
forums-f6cc30cbfe08377c2e6f5ce332bef2ad240cb950.tar.xz
forums-f6cc30cbfe08377c2e6f5ce332bef2ad240cb950.zip
Merge pull request #4245 from JoshyPHP/ticket/14381
[ticket/14381] Set the mode in message parser to "reparse" * JoshyPHP/ticket/14381: [ticket/14381] Set the mode in message parser to "reparse" [ticket/14495] Updates the version to 3.3.0-a1-dev
-rw-r--r--phpBB/composer.json2
-rw-r--r--phpBB/composer.lock4
-rw-r--r--phpBB/docs/README.html8
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php2
-rwxr-xr-xphpBB/install/phpbbcli.php2
-rw-r--r--phpBB/language/en/install.php2
-rw-r--r--phpBB/phpbb/composer.json2
-rw-r--r--phpBB/phpbb/textreparser/base.php3
-rw-r--r--phpBB/styles/prosilver/style.cfg4
-rw-r--r--tests/text_reparser/base_test.php70
-rw-r--r--tests/text_reparser/fixtures/base.xml19
11 files changed, 104 insertions, 14 deletions
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 968447fd63..f565c424fa 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 58791412e0..20afc310db 100644
--- a/phpBB/docs/README.html
+++ b/phpBB/docs/README.html
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.1.x Readme" />
+<meta name="description" content="phpBB 3.3.x Readme" />
<title>phpBB &bull; Readme</title>
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
@@ -21,7 +21,7 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
- <h1>phpBB 3.1.x Readme</h1>
+ <h1>phpBB 3.3.x Readme</h1>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
@@ -225,7 +225,7 @@
<div class="content">
- <p>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.</p>
+ <p>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.</p>
<p>Those interested in the development of phpBB should keep an eye on the development forums to see how things are progressing:</p>
@@ -324,7 +324,7 @@
<div class="content">
- <p>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.</p>
+ <p>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.</p>
<p>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.</p>
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' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
diff --git a/phpBB/install/phpbbcli.php b/phpBB/install/phpbbcli.php
index 6b0ac39f84..4b86f64e2a 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/language/en/install.php b/phpBB/language/en/install.php
index ba35aa24c9..39d53ece7b 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 <a href="../">access your board</a>. 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 <a href="https://www.phpbb.com/support/docs/en/3.2/ug/">Documentation</a> and the <a href="https://www.phpbb.com/community/viewforum.php?f=466">support forums</a>.',
+ 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.3. You can now login and <a href="../">access your board</a>. 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 <a href="https://www.phpbb.com/support/docs/en/3.3/ug/">Documentation</a> and the <a href="https://www.phpbb.com/community/viewforum.php?f=466">support forums</a>.',
'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/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/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=
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 @@
+<?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.
+*
+*/
+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' => '<t></t>'
+ )
+ ),
+ $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 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_posts">
+ <column>post_id</column>
+ <column>enable_bbcode</column>
+ <column>enable_smilies</column>
+ <column>enable_magic_url</column>
+ <column>post_text</column>
+ <column>bbcode_uid</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ <value>abcd1234</value>
+ </row>
+ </table>
+</dataset>