aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.appveyor.yml12
-rw-r--r--.travis.yml2
-rw-r--r--README.md8
-rw-r--r--build/build.xml6
-rw-r--r--build/generate_package_json.php127
-rwxr-xr-xcomposer.pharbin1875611 -> 1933813 bytes
-rw-r--r--phpBB/adm/style/acp_attachments.html24
-rw-r--r--phpBB/adm/style/acp_ban.html2
-rw-r--r--phpBB/adm/style/acp_contact.html2
-rw-r--r--phpBB/adm/style/acp_database.html8
-rw-r--r--phpBB/adm/style/acp_forums.html8
-rw-r--r--phpBB/adm/style/acp_groups.html2
-rw-r--r--phpBB/adm/style/acp_icons.html2
-rw-r--r--phpBB/adm/style/acp_modules.html2
-rw-r--r--phpBB/adm/style/acp_permission_roles.html4
-rw-r--r--phpBB/adm/style/acp_posting_buttons.html25
-rw-r--r--phpBB/adm/style/acp_ranks.html2
-rw-r--r--phpBB/adm/style/acp_search.html2
-rw-r--r--phpBB/adm/style/acp_styles.html4
-rw-r--r--phpBB/adm/style/acp_users_overview.html2
-rw-r--r--phpBB/adm/style/acp_users_prefs.html2
-rw-r--r--phpBB/adm/style/acp_users_signature.html2
-rw-r--r--phpBB/adm/style/installer_footer.html12
-rw-r--r--phpBB/adm/style/overall_footer.html6
-rw-r--r--phpBB/adm/style/overall_header.html2
-rw-r--r--phpBB/adm/style/permission_mask.html6
-rw-r--r--phpBB/adm/style/permissions.js4
-rw-r--r--phpBB/adm/style/progress_bar.html4
-rw-r--r--phpBB/adm/style/simple_footer.html6
-rw-r--r--phpBB/adm/style/simple_header.html2
-rw-r--r--phpBB/assets/javascript/editor.js13
-rw-r--r--phpBB/assets/javascript/plupload.js59
-rw-r--r--phpBB/composer.json2
-rw-r--r--phpBB/composer.lock490
-rw-r--r--phpBB/config/default/container/services.yml6
-rw-r--r--phpBB/docs/CHANGELOG.html198
-rw-r--r--phpBB/docs/CREDITS.txt6
-rw-r--r--phpBB/docs/events.md119
-rw-r--r--phpBB/docs/nginx.sample.conf6
-rw-r--r--phpBB/docs/sphinx.sample.conf4
-rw-r--r--phpBB/includes/acp/acp_attachments.php20
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php17
-rw-r--r--phpBB/includes/acp/acp_board.php11
-rw-r--r--phpBB/includes/acp/acp_database.php12
-rw-r--r--phpBB/includes/acp/acp_forums.php38
-rw-r--r--phpBB/includes/acp/acp_prune.php1
-rw-r--r--phpBB/includes/acp/acp_styles.php33
-rw-r--r--phpBB/includes/acp/acp_update.php16
-rw-r--r--phpBB/includes/acp/acp_users.php2
-rw-r--r--phpBB/includes/compatibility_globals.php5
-rw-r--r--phpBB/includes/constants.php2
-rw-r--r--phpBB/includes/functions.php131
-rw-r--r--phpBB/includes/functions_acp.php15
-rw-r--r--phpBB/includes/functions_admin.php30
-rw-r--r--phpBB/includes/functions_content.php3
-rw-r--r--phpBB/includes/functions_display.php12
-rw-r--r--phpBB/includes/functions_download.php4
-rw-r--r--phpBB/includes/functions_messenger.php44
-rw-r--r--phpBB/includes/functions_posting.php72
-rw-r--r--phpBB/includes/functions_privmsgs.php59
-rw-r--r--phpBB/includes/functions_user.php20
-rw-r--r--phpBB/includes/mcp/mcp_ban.php2
-rw-r--r--phpBB/includes/mcp/mcp_main.php28
-rw-r--r--phpBB/includes/mcp/mcp_topic.php32
-rw-r--r--phpBB/includes/message_parser.php29
-rw-r--r--phpBB/includes/ucp/ucp_attachments.php30
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php22
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php4
-rw-r--r--phpBB/includes/ucp/ucp_profile.php3
-rw-r--r--phpBB/includes/ucp/ucp_register.php29
-rw-r--r--phpBB/includes/utf/utf_tools.php43
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php2
-rwxr-xr-xphpBB/install/phpbbcli.php2
-rw-r--r--phpBB/install/schemas/schema_data.sql6
-rw-r--r--phpBB/language/en/acp/board.php12
-rw-r--r--phpBB/language/en/acp/common.php1
-rw-r--r--phpBB/language/en/acp/forums.php1
-rw-r--r--phpBB/language/en/acp/permissions_phpbb.php4
-rw-r--r--phpBB/language/en/acp/posting.php5
-rw-r--r--phpBB/language/en/acp/profile.php2
-rw-r--r--phpBB/language/en/acp/styles.php85
-rw-r--r--phpBB/language/en/common.php4
-rw-r--r--phpBB/language/en/email/admin_activate.txt2
-rw-r--r--phpBB/language/en/posting.php1
-rw-r--r--phpBB/language/en/ucp.php3
-rw-r--r--phpBB/memberlist.php29
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php61
-rw-r--r--phpBB/phpbb/auth/provider/provider_interface.php7
-rw-r--r--phpBB/phpbb/avatar/driver/upload.php3
-rw-r--r--phpBB/phpbb/avatar/manager.php2
-rw-r--r--phpBB/phpbb/captcha/plugins/qa.php2
-rw-r--r--phpBB/phpbb/db/driver/mysqli.php3
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/disable_remote_avatar.php34
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/smtp_dynamic_data.php42
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/timezone_p3.php29
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/v326.php39
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/v326rc1.php37
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/v327.php37
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/v327rc1.php36
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/v328.php36
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/v328rc1.php37
-rw-r--r--phpBB/phpbb/db/tools/tools.php2
-rw-r--r--phpBB/phpbb/event/md_exporter.php13
-rw-r--r--phpBB/phpbb/filesystem/filesystem.php6
-rw-r--r--phpBB/phpbb/group/helper.php260
-rw-r--r--phpBB/phpbb/install/helper/config.php2
-rw-r--r--phpBB/phpbb/message/form.php2
-rw-r--r--phpBB/phpbb/plupload/plupload.php73
-rw-r--r--phpBB/phpbb/search/fulltext_mysql.php14
-rw-r--r--phpBB/phpbb/search/fulltext_native.php38
-rw-r--r--phpBB/phpbb/search/fulltext_sphinx.php4
-rw-r--r--phpBB/phpbb/session.php35
-rw-r--r--phpBB/phpbb/textformatter/s9e/bbcode_merger.php26
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php4
-rw-r--r--phpBB/phpbb/textformatter/s9e/link_helper.php6
-rw-r--r--phpBB/phpbb/textformatter/s9e/parser.php22
-rw-r--r--phpBB/phpbb/textformatter/s9e/quote_helper.php22
-rw-r--r--phpBB/phpbb/user.php36
-rw-r--r--phpBB/posting.php68
-rw-r--r--phpBB/search.php3
-rw-r--r--phpBB/styles/prosilver/style.cfg4
-rw-r--r--phpBB/styles/prosilver/template/attachment.html4
-rw-r--r--phpBB/styles/prosilver/template/bbcode.html4
-rw-r--r--phpBB/styles/prosilver/template/forumlist_body.html2
-rw-r--r--phpBB/styles/prosilver/template/index_body.html1
-rw-r--r--phpBB/styles/prosilver/template/login_body.html1
-rw-r--r--phpBB/styles/prosilver/template/login_forum.html1
-rw-r--r--phpBB/styles/prosilver/template/mcp_forum.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_move.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_topic.html4
-rw-r--r--phpBB/styles/prosilver/template/memberlist_body.html17
-rw-r--r--phpBB/styles/prosilver/template/navbar_header.html8
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html2
-rw-r--r--phpBB/styles/prosilver/template/plupload.html10
-rw-r--r--phpBB/styles/prosilver/template/posting_attach_body.html2
-rw-r--r--phpBB/styles/prosilver/template/posting_buttons.html23
-rw-r--r--phpBB/styles/prosilver/template/posting_poll_body.html4
-rw-r--r--phpBB/styles/prosilver/template/posting_review.html4
-rw-r--r--phpBB/styles/prosilver/template/posting_topic_review.html4
-rw-r--r--phpBB/styles/prosilver/template/search_results.html8
-rw-r--r--phpBB/styles/prosilver/template/ucp_agreement.html5
-rw-r--r--phpBB/styles/prosilver/template/ucp_attachments.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_history.html3
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html9
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_profile_info.html2
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html11
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html4
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_print.html9
-rw-r--r--phpBB/styles/prosilver/theme/plupload.css4
-rw-r--r--phpBB/viewforum.php5
-rw-r--r--phpBB/viewtopic.php50
-rw-r--r--tests/avatar/manager_test.php2
-rw-r--r--tests/functional/download_test.php2
-rw-r--r--tests/functional/feed_test.php6
-rw-r--r--tests/functional/fileupload_form_test.php9
-rw-r--r--tests/functional/plupload_test.php14
-rw-r--r--tests/functional/posting_test.php17
-rw-r--r--tests/functional/private_messages_test.php2
-rw-r--r--tests/functional/prune_shadow_topic_test.php2
-rw-r--r--tests/functional/registration_test.php54
-rw-r--r--tests/functional/visibility_softdelete_test.php4
-rw-r--r--tests/functions/fixtures/validate_email.xml24
-rw-r--r--tests/functions/validate_user_email_test.php12
-rw-r--r--tests/functions_acp/validate_config_vars_test.php10
-rw-r--r--tests/group/helper_get_name_string_test.php115
-rw-r--r--tests/group/helper_get_name_test.php31
-rw-r--r--tests/group/helper_get_rank_test.php43
-rw-r--r--tests/group/helper_test.php68
-rw-r--r--tests/group/helper_test_case.php123
-rw-r--r--tests/notification/group_request_test.php16
-rw-r--r--tests/plupload/plupload_test.php73
-rw-r--r--tests/search/native_test.php8
-rw-r--r--tests/session/check_ban_test.php3
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php59
-rw-r--r--tests/test_framework/phpbb_ui_test_case.php30
-rw-r--r--tests/text_formatter/s9e/bbcode_merger_test.php16
-rw-r--r--tests/text_formatter/s9e/default_formatting_test.php6
-rw-r--r--tests/text_formatter/s9e/link_helper_test.php35
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-13921.html2
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-16053.html1
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-16053.txt1
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-16053.xml28
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-16074.html1
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-16074.txt1
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-16252.after.php18
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-16252.before.php17
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-16252.html1
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-16252.txt1
-rwxr-xr-xtravis/setup-php-extensions.sh5
189 files changed, 3394 insertions, 839 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index b15bbf551d..dfb8fea7d3 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -39,7 +39,8 @@ init:
before_test:
- ps: |
Set-Service wuauserv -StartupType Manual
- cinst -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
+ choco install chocolatey -y --version 0.10.13 --allow-downgrade
+ choco install php -y --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
Get-ChildItem -Path "c:\tools\php$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1$2')" -Recurse |
Move-Item -destination "c:\tools\php"
cd c:\tools\php
@@ -98,7 +99,7 @@ before_test:
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\postgres';`n`$dbhost = 'localhost';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'postgres';`n`$dbpasswd = 'Password12!';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
}
elseif ($env:db -eq "mariadb") {
- appveyor-retry cinst -y --force mariadb
+ appveyor-retry choco install mariadb -y --force
$env:MYSQL_PWD=""
$cmd = '"C:\Program Files\MariaDB 10.2\bin\mysql" -e "create database phpbb_test;" --user=root'
iex "& $cmd"
@@ -106,13 +107,13 @@ before_test:
}
elseif ($env:db -eq "sqlite") {
# install sqlite
- appveyor-retry cinst -y sqlite
+ appveyor-retry choco install sqlite -y
sqlite3 c:\projects\test.db "create table aTable(field1 int); drop table aTable;"
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\sqlite3';`n`$dbhost = 'c:\\projects\\test.db';`n`$dbport = '';`n`$dbname = '';`n`$dbuser = '';`n`$dbpasswd = '';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
}
# Install PhantomJS
- cinst -y phantomjs
+ choco install phantomjs -y
Start-Process "phantomjs" "--webdriver=8910" | Out-Null
- ps: |
cd c:\projects\phpbb\phpBB
@@ -120,7 +121,7 @@ before_test:
(Get-Content c:\projects\phpbb\phpBB\web.config).replace("`t</system.webServer>", "`t`t<httpErrors errorMode=`"Detailed`" />`n`t</system.webServer>") | Set-Content c:\projects\phpbb\phpBB\web.config
- cd c:\projects\phpbb\phpBB
- php ..\composer.phar install
- - choco install -y urlrewrite
+ - choco install urlrewrite -y
- ps: New-WebSite -Name 'phpBBTest' -PhysicalPath 'c:\projects\phpbb\phpBB' -Force
- ps: Import-Module WebAdministration; Set-ItemProperty 'IIS:\Sites\phpBBTest' -name Bindings -value @{protocol='http';bindingInformation='*:80:phpbb.test'}
- echo Change default anonymous user AUTH to ApplicationPool
@@ -141,3 +142,4 @@ before_test:
test_script:
- cd c:\projects\phpbb
- php -e phpBB\vendor\phpunit\phpunit\phpunit --verbose
+
diff --git a/.travis.yml b/.travis.yml
index cb574a4d8d..3f3cf2b018 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,5 @@
language: php
-sudo: required
+dist: trusty
matrix:
include:
diff --git a/README.md b/README.md
index d1854dc74d..92cd5b9867 100644
--- a/README.md
+++ b/README.md
@@ -31,9 +31,11 @@ Read our [Vagrant documentation](phpBB/docs/vagrant.md) to find out how to use V
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](https://bamboo.phpbb.com) or check our travis builds below:
-* [![Build Status](https://travis-ci.org/phpbb/phpbb.svg?branch=master)](http://travis-ci.org/phpbb/phpbb)[![Build status](https://ci.appveyor.com/api/projects/status/8g98ybngd2f3axy1/branch/master?svg=true)](https://ci.appveyor.com/project/phpBB/phpbb/branch/master) **master** - Latest development version
-* [![Build Status](https://travis-ci.org/phpbb/phpbb.svg?branch=3.2.x)](http://travis-ci.org/phpbb/phpbb)[![Build status](https://ci.appveyor.com/api/projects/status/8g98ybngd2f3axy1/branch/3.2.x?svg=true)](https://ci.appveyor.com/project/phpBB/phpbb/branch/3.2.x) **3.2.x** - Development of version 3.2.x
-* [![Build Status](https://travis-ci.org/phpbb/phpbb.svg?branch=3.1.x)](http://travis-ci.org/phpbb/phpbb) **3.1.x** - Development of version 3.1.x
+Travis CI | AppVeyor | Branch | Description
+---------- | -------- | ------- | -----------
+[![Build Status](https://travis-ci.org/phpbb/phpbb.svg?branch=master)](http://travis-ci.org/phpbb/phpbb) | [![Build status](https://ci.appveyor.com/api/projects/status/8g98ybngd2f3axy1/branch/master?svg=true)](https://ci.appveyor.com/project/phpBB/phpbb/branch/master) | **master** | Latest development version
+[![Build Status](https://travis-ci.org/phpbb/phpbb.svg?branch=3.3.x)](http://travis-ci.org/phpbb/phpbb) | [![Build status](https://ci.appveyor.com/api/projects/status/8g98ybngd2f3axy1/branch/3.3.x?svg=true)](https://ci.appveyor.com/project/phpBB/phpbb/branch/3.3.x) | **3.3.x** | Development of version 3.3.x
+[![Build Status](https://travis-ci.org/phpbb/phpbb.svg?branch=3.2.x)](http://travis-ci.org/phpbb/phpbb) | [![Build status](https://ci.appveyor.com/api/projects/status/8g98ybngd2f3axy1/branch/3.2.x?svg=true)](https://ci.appveyor.com/project/phpBB/phpbb/branch/3.2.x) | **3.2.x** | Development of version 3.2.x
## LICENSE
diff --git a/build/build.xml b/build/build.xml
index dc9f3bbe0d..1f6535875c 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -2,9 +2,9 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
- <property name="newversion" value="3.2.6-dev" />
- <property name="prevversion" value="3.2.5" />
- <property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0-a1, 3.2.0-a2, 3.2.0-b1, 3.2.0-b2, 3.2.0-RC1, 3.2.0-RC2, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4" />
+ <property name="newversion" value="3.2.9-dev" />
+ <property name="prevversion" value="3.2.7" />
+ <property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0-a1, 3.2.0-a2, 3.2.0-b1, 3.2.0-b2, 3.2.0-RC1, 3.2.0-RC2, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.8-RC1" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
diff --git a/build/generate_package_json.php b/build/generate_package_json.php
new file mode 100644
index 0000000000..152f38958a
--- /dev/null
+++ b/build/generate_package_json.php
@@ -0,0 +1,127 @@
+#!/usr/bin/env php
+<?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.
+ *
+ */
+
+if (version_compare(PHP_VERSION, '7.0-dev', '<'))
+{
+ die('generate_package_json.php requires at least PHP 7.0.');
+}
+
+define('IN_PHPBB', true);
+include_once('../phpBB/includes/functions.php');
+
+$json_data = new \stdClass();
+$json_data->metadata = new stdClass();
+
+$json_data->metadata->current_version_date = '';
+$json_data->metadata->current_version = '';
+$json_data->metadata->download_path = '';
+$json_data->metadata->show_update_package = true;
+$json_data->metadata->historic = false;
+
+$json_data->package = [];
+
+// Open build.xml
+$build_xml = simplexml_load_file('build.xml');
+$current_version = (string) $build_xml->xpath('/project/property[@name=\'newversion\']/@value')[0]->value;
+$previous_version = (string) $build_xml->xpath('/project/property[@name=\'prevversion\']/@value')[0]->value;
+$older_verions = explode(', ', (string) $build_xml->xpath('/project/property[@name=\'olderversions\']/@value')[0]->value);
+
+// Clean and sort version info
+$older_verions[] = $previous_version;
+$older_verions = array_filter($older_verions, function($version) {
+ preg_match(get_preg_expression('semantic_version'), $version, $matches);
+ return empty($matches['prerelease']) || strpos($matches['prerelease'], 'pl') !== false;
+});
+usort($older_verions, function($version_a, $version_b)
+{
+ return phpbb_version_compare($version_b, $version_a);
+});
+
+// Set metadata
+$json_data->metadata->current_version = $current_version;
+$json_data->metadata->current_version_date = date('Y-m-d');
+$json_data->metadata->download_path = 'https://download.phpbb.com/pub/release/' . preg_replace('#([0-9]+\.[0-9]+)(\..+)#', '$1', $current_version) . '/' . $current_version . '/';
+
+// Add package, patch files, and changed files
+phpbb_add_package_file(
+ $json_data->package,
+ 'phpBB ' . $current_version,
+ 'phpBB-' . $current_version,
+ 'full',
+ ''
+);
+phpbb_add_package_file(
+ $json_data->package,
+ 'phpBB ' . $current_version . ' Patch Files',
+ 'phpBB-' . $current_version . '-patch',
+ 'update',
+ 'patch'
+);
+phpbb_add_package_file(
+ $json_data->package,
+ 'phpBB ' . $current_version . ' Changed Files',
+ 'phpBB-' . $current_version . '-files',
+ 'update',
+ 'files'
+);
+
+// Loop through packages and assign to packages array
+foreach ($older_verions as $version)
+{
+ phpbb_add_package_file(
+ $json_data->package,
+ 'phpBB ' . $version . ' to ' . $current_version . ' Update Package',
+ 'phpBB-' . $version . '_to_' . $current_version,
+ 'update',
+ 'update',
+ $version
+ );
+}
+
+echo(json_encode($json_data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\n");
+
+function phpbb_add_package_file(array &$package_list, $name, $file_name, $type, $subtype, $from = '')
+{
+ if (!file_exists(__DIR__ . '/new_version/release_files/' . $file_name . '.zip'))
+ {
+ trigger_error('File does not exist: ' . __DIR__ . '/new_version/release_files/' . $file_name . '.zip');
+ return;
+ }
+
+ $package_file = new stdClass();
+ $package_file->name = $name;
+ $package_file->filename = $file_name;
+ $package_file->type = $type;
+ if (!empty($subtype))
+ {
+ $package_file->subtype = $subtype;
+ }
+ if (!empty($from))
+ {
+ $package_file->from = $from;
+ }
+ $package_file->files = [];
+
+ foreach (['zip', 'tar.bz2'] as $extension)
+ {
+ $file_path = 'new_version/release_files/' . $file_name . '.' . $extension;
+ $filedata = new stdClass();
+ $filedata->filesize = filesize($file_path);
+ $filedata->checksum = trim(preg_replace('/(^\w+)(.+)/', '$1', file_get_contents($file_path . '.sha256')));
+ $filedata->filetype = $extension;
+ $package_file->files[] = $filedata;
+ }
+
+ $package_list[] = $package_file;
+}
diff --git a/composer.phar b/composer.phar
index 96fa2df7bd..8c3f0fada9 100755
--- a/composer.phar
+++ b/composer.phar
Binary files differ
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html
index 868e256ef5..7a66f170ac 100644
--- a/phpBB/adm/style/acp_attachments.html
+++ b/phpBB/adm/style/acp_attachments.html
@@ -110,7 +110,7 @@
<!-- ELSEIF S_EXTENSION_GROUPS -->
<!-- IF S_EDIT_GROUP -->
- <script type="text/javascript" defer="defer">
+ <script>
// <![CDATA[
function update_image(newimage)
{
@@ -421,17 +421,25 @@
</tr>
</thead>
<tbody>
- <!-- BEGIN attachments -->
+ {% for attachments in attachments %}
<tr>
<td>
- <!-- IF attachments.S_IN_MESSAGE -->{L_EXTENSION_GROUP}{L_COLON} <strong><!-- IF attachments.EXT_GROUP_NAME -->{attachments.EXT_GROUP_NAME}<!-- ELSE -->{L_NO_EXT_GROUP}<!-- ENDIF --></strong><br />{attachments.L_DOWNLOAD_COUNT}<br />{L_IN} {L_PRIVATE_MESSAGE}
- <!-- ELSE --><a href="{attachments.U_FILE}" style="font-weight: bold;">{attachments.REAL_FILENAME}</a><br /><!-- IF attachments.COMMENT -->{attachments.COMMENT}<br /><!-- ENDIF -->{attachments.L_DOWNLOAD_COUNT}<br />{L_TOPIC}{L_COLON} <a href="{attachments.U_VIEW_TOPIC}">{attachments.TOPIC_TITLE}</a><!-- ENDIF -->
+ {{ lang('EXTENSION_GROUP') ~ lang('COLON') }} <strong>{{ attachments.EXT_GROUP_NAME }}</strong>
+ {% if attachments.S_IN_MESSAGE %}
+ <br>{{ attachments.L_DOWNLOAD_COUNT }}
+ <br>{{ lang('IN') }} {{ lang('PRIVATE_MESSAGE') }}
+ {% else %}
+ <br><a href="{{ attachments.U_FILE }}"><strong>{{ attachments.REAL_FILENAME }}</strong></a>
+ {% if attachments.COMMENT %}<br>{{ attachments.COMMENT }}{% endif %}
+ <br>{{ attachments.L_DOWNLOAD_COUNT }}
+ <br>{{ lang('TOPIC') ~ lang('COLON') }} <a href="{{ attachments.U_VIEW_TOPIC }}">{{ attachments.TOPIC_TITLE }}</a>
+ {% endif %}
</td>
- <td>{attachments.FILETIME}<br />{L_POST_BY_AUTHOR} {attachments.ATTACHMENT_POSTER}</td>
- <td class="centered-text">{attachments.FILESIZE}</td>
- <td class="centered-text"><input type="checkbox" class="radio" name="delete[{attachments.ATTACH_ID}]" /></td>
+ <td>{{ attachments.FILETIME }}<br>{{ lang('POST_BY_AUTHOR') }} {{ attachments.ATTACHMENT_POSTER }}</td>
+ <td class="centered-text">{{ attachments.FILESIZE }}</td>
+ <td class="centered-text"><input type="checkbox" class="radio" name="delete[{{ attachments.ATTACH_ID }}]" /></td>
</tr>
- <!-- END attachments -->
+ {% endfor %}
</tbody>
</table>
<!-- ELSE -->
diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html
index f2249941a5..d0eab75ad8 100644
--- a/phpBB/adm/style/acp_ban.html
+++ b/phpBB/adm/style/acp_ban.html
@@ -8,7 +8,7 @@
<p>{L_EXPLAIN}</p>
-<script type="text/javascript">
+<script>
// <![CDATA[
var ban_length = new Array();
diff --git a/phpBB/adm/style/acp_contact.html b/phpBB/adm/style/acp_contact.html
index 828fd4b659..d63fd08a3a 100644
--- a/phpBB/adm/style/acp_contact.html
+++ b/phpBB/adm/style/acp_contact.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<script type="text/javascript">
+<script>
// <![CDATA[
var form_name = 'acp_contact';
diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html
index ed0f4dd453..d3433a8aa6 100644
--- a/phpBB/adm/style/acp_database.html
+++ b/phpBB/adm/style/acp_database.html
@@ -35,7 +35,7 @@
<p>{L_ACP_BACKUP_EXPLAIN}</p>
- <script type="text/javascript">
+ <script>
// <![CDATA[
function selector(bool)
@@ -68,12 +68,6 @@
<!-- END methods --></dd>
</dl>
<dl>
- <dt><label for="where">{L_ACTION}{L_COLON}</label></dt>
- <dd>
- <label><input id="where" type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label>
- </dd>
- </dl>
- <dl>
<dt><label for="table">{L_TABLE_SELECT}{L_COLON}</label></dt>
<dd><select id="table" name="table[]" size="10" multiple="multiple">
<!-- BEGIN tables -->
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index 965438ff67..20bcd2e9f9 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -4,7 +4,7 @@
<!-- IF S_EDIT_FORUM -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
/**
* Handle displaying/hiding several options based on the forum type
@@ -405,7 +405,7 @@
<!-- ELSEIF S_CONTINUE_SYNC -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
var close_waitscreen = 0;
// no scrollbars...
@@ -421,7 +421,7 @@
<!-- ELSE -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
/**
* Popup search progress bar
@@ -447,7 +447,7 @@
<!-- ENDIF -->
<!-- IF S_RESYNCED -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
var close_waitscreen = 1;
// ]]>
diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html
index d0096370d9..723a190899 100644
--- a/phpBB/adm/style/acp_groups.html
+++ b/phpBB/adm/style/acp_groups.html
@@ -36,10 +36,12 @@
<dl>
<dt><label for="group_type">{L_GROUP_TYPE}{L_COLON}</label><br /><span>{L_GROUP_TYPE_EXPLAIN}</span></dt>
<dd>
+ {% EVENT acp_group_types_prepend %}
<label><input name="group_type" type="radio" class="radio" id="group_type" value="{GROUP_TYPE_FREE}"{GROUP_FREE} /> {L_GROUP_OPEN}</label>
<label><input name="group_type" type="radio" class="radio" value="{GROUP_TYPE_OPEN}"{GROUP_OPEN} /> {L_GROUP_REQUEST}</label>
<label><input name="group_type" type="radio" class="radio" value="{GROUP_TYPE_CLOSED}"{GROUP_CLOSED} /> {L_GROUP_CLOSED}</label>
<label><input name="group_type" type="radio" class="radio" value="{GROUP_TYPE_HIDDEN}"{GROUP_HIDDEN} /> {L_GROUP_HIDDEN}</label>
+ {% EVENT acp_group_types_append %}
</dd>
</dl>
<!-- ELSE -->
diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html
index 5493cbde0a..45fe7f8ebc 100644
--- a/phpBB/adm/style/acp_icons.html
+++ b/phpBB/adm/style/acp_icons.html
@@ -4,7 +4,7 @@
<!-- IF S_EDIT -->
- <script type="text/javascript" defer="defer">
+ <script>
// <![CDATA[
<!-- IF S_ADD_CODE -->
diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html
index 3c97706e6a..f4040daaed 100644
--- a/phpBB/adm/style/acp_modules.html
+++ b/phpBB/adm/style/acp_modules.html
@@ -4,7 +4,7 @@
<!-- IF S_EDIT_MODULE -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
function display_options(value)
{
diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html
index b3137f134c..670d5e14c0 100644
--- a/phpBB/adm/style/acp_permission_roles.html
+++ b/phpBB/adm/style/acp_permission_roles.html
@@ -4,7 +4,7 @@
<!-- IF S_EDIT -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
var active_pmask = '0';
var active_fmask = '0';
@@ -20,7 +20,7 @@
// ]]>
</script>
- <script type="text/javascript" src="style/permissions.js"></script>
+ <script src="style/permissions.js"></script>
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
diff --git a/phpBB/adm/style/acp_posting_buttons.html b/phpBB/adm/style/acp_posting_buttons.html
index c3c42f8e82..614d6fae40 100644
--- a/phpBB/adm/style/acp_posting_buttons.html
+++ b/phpBB/adm/style/acp_posting_buttons.html
@@ -1,31 +1,10 @@
-<script type="text/javascript">
+<script>
// <![CDATA[
// Define the bbCode tags
var bbcode = new Array();
var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
- // Helpline messages
- var help_line = {
- b: '{LA_BBCODE_B_HELP}',
- i: '{LA_BBCODE_I_HELP}',
- u: '{LA_BBCODE_U_HELP}',
- q: '{LA_BBCODE_Q_HELP}',
- c: '{LA_BBCODE_C_HELP}',
- l: '{LA_BBCODE_L_HELP}',
- o: '{LA_BBCODE_O_HELP}',
- p: '{LA_BBCODE_P_HELP}',
- w: '{LA_BBCODE_W_HELP}',
- a: '{LA_BBCODE_A_HELP}',
- s: '{LA_BBCODE_S_HELP}',
- f: '{LA_BBCODE_F_HELP}',
- y: '{LA_BBCODE_Y_HELP}',
- d: '{LA_BBCODE_D_HELP}'
- <!-- BEGIN custom_tags -->
- ,cb_{custom_tags.BBCODE_ID}{L_COLON} '{custom_tags.A_BBCODE_HELPLINE}'
- <!-- END custom_tags -->
- }
-
// ]]>
</script>
@@ -65,7 +44,7 @@
</select>
<!-- EVENT acp_posting_buttons_custom_tags_before -->
<!-- BEGIN custom_tags -->
- <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
+ <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{{ custom_tags.BBCODE_HELPLINE|e('html_attr') }}" />
<!-- END custom_tags -->
</div>
<!-- EVENT acp_posting_buttons_after -->
diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html
index e67c9acd80..d373657114 100644
--- a/phpBB/adm/style/acp_ranks.html
+++ b/phpBB/adm/style/acp_ranks.html
@@ -6,7 +6,7 @@
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
- <script type="text/javascript">
+ <script>
// <![CDATA[
function update_image(newimage)
{
diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html
index f7ad3c5e89..99620058dc 100644
--- a/phpBB/adm/style/acp_search.html
+++ b/phpBB/adm/style/acp_search.html
@@ -69,7 +69,7 @@
<!-- ELSEIF S_INDEX -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
/**
* Popup search progress bar
diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html
index 38bec5a1e4..cfa804090f 100644
--- a/phpBB/adm/style/acp_styles.html
+++ b/phpBB/adm/style/acp_styles.html
@@ -146,7 +146,9 @@
{styles_list.EXTRA}
<td class="{$ROW_CLASS} mark" width="20">
<!-- IF styles_list.STYLE_ID -->
- <input class="checkbox" type="checkbox" name="ids[]" value="{styles_list.STYLE_ID}" />
+ {% if styles_list.STYLE_NAME !== 'prosilver' %}
+ <input class="checkbox" type="checkbox" name="ids[]" value="{styles_list.STYLE_ID}" />
+ {% endif %}
<!-- ELSE -->
<!-- IF styles_list.COMMENT != '' -->
&nbsp;
diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html
index 506101c3f7..2af669a41f 100644
--- a/phpBB/adm/style/acp_users_overview.html
+++ b/phpBB/adm/style/acp_users_overview.html
@@ -79,7 +79,7 @@
<!-- IF not S_USER_FOUNDER or S_FOUNDER -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
function display_reason(option)
diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html
index 484c5b3976..358f3d5248 100644
--- a/phpBB/adm/style/acp_users_prefs.html
+++ b/phpBB/adm/style/acp_users_prefs.html
@@ -1,4 +1,4 @@
-<script type="text/javascript">
+<script>
// <![CDATA[
var default_dateformat = '{A_DEFAULT_DATEFORMAT}';
// ]]>
diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html
index c7ec5cc0eb..180c24c96d 100644
--- a/phpBB/adm/style/acp_users_signature.html
+++ b/phpBB/adm/style/acp_users_signature.html
@@ -1,4 +1,4 @@
-<script type="text/javascript">
+<script>
// <![CDATA[
var form_name = 'user_signature';
diff --git a/phpBB/adm/style/installer_footer.html b/phpBB/adm/style/installer_footer.html
index fefa8f6d3f..8b3b04d8a5 100644
--- a/phpBB/adm/style/installer_footer.html
+++ b/phpBB/adm/style/installer_footer.html
@@ -6,12 +6,14 @@
<div id="page-footer">
<div class="copyright">
- Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited
+ {% if S_COPYRIGHT_HTML %}
+ {{ CREDIT_LINE }}
+ {% endif %}
</div>
</div>
</div>
-<script type="text/javascript">
+<script>
<!--
installLang = {
title: '{LA_TIMEOUT_DETECTED_TITLE}',
@@ -20,9 +22,9 @@ installLang = {
//-->
</script>
-<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
-<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js">\x3C/script>');</script><!-- ENDIF -->
-<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
+<script src="{T_JQUERY_LINK}"></script>
+<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js">\x3C/script>');</script><!-- ENDIF -->
+<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS admin.js -->
{$SCRIPTS}
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html
index 8745286d64..3ab633e04b 100644
--- a/phpBB/adm/style/overall_footer.html
+++ b/phpBB/adm/style/overall_footer.html
@@ -33,9 +33,9 @@
</div>
</div>
-<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
-<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
-<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
+<script src="{T_JQUERY_LINK}"></script>
+<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
+<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS ajax.js -->
<!-- INCLUDEJS admin.js -->
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index 8279ac34dc..fa361d6016 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -10,7 +10,7 @@
<link href="{T_FONT_AWESOME_LINK}" rel="stylesheet">
<link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" />
-<script type="text/javascript">
+<script>
// <![CDATA[
var jump_page = '{LA_JUMP_PAGE}{L_COLON}';
var on_page = '{CURRENT_PAGE}';
diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html
index c556664b8c..26aa5e098f 100644
--- a/phpBB/adm/style/permission_mask.html
+++ b/phpBB/adm/style/permission_mask.html
@@ -1,5 +1,5 @@
-<script type="text/javascript">
+<script>
// <![CDATA[
var active_pmask = '0';
var active_fmask = '0';
@@ -9,12 +9,14 @@
var role_options = new Array();
+ var no_role_assigned = "{LA_NO_ROLE_ASSIGNED}";
+
<!-- IF S_ROLE_JS_ARRAY -->
{S_ROLE_JS_ARRAY}
<!-- ENDIF -->
// ]]>
</script>
-<script type="text/javascript" src="style/permissions.js"></script>
+<script src="style/permissions.js"></script>
<!-- BEGIN p_mask -->
<div class="clearfix"></div>
diff --git a/phpBB/adm/style/permissions.js b/phpBB/adm/style/permissions.js
index 9178adab50..af8e21ad51 100644
--- a/phpBB/adm/style/permissions.js
+++ b/phpBB/adm/style/permissions.js
@@ -279,6 +279,10 @@ function reset_role(id) {
}
t.options[0].selected = true;
+
+ var parent = t.parentNode;
+ parent.querySelector('span.dropdown-trigger').innerText = no_role_assigned;
+ parent.querySelector('input[data-name^=role]').value = '0';
}
/**
diff --git a/phpBB/adm/style/progress_bar.html b/phpBB/adm/style/progress_bar.html
index 1822675c15..1e58257ff0 100644
--- a/phpBB/adm/style/progress_bar.html
+++ b/phpBB/adm/style/progress_bar.html
@@ -1,6 +1,6 @@
<!-- INCLUDE simple_header.html -->
-<script type="text/javascript">
+<script>
// <![CDATA[
/**
* Close previously opened popup
@@ -31,7 +31,7 @@
<p>{L_PROGRESS_EXPLAIN}</p>
</div>
-<script type="text/javascript">
+<script>
// <![CDATA[
close_popup();
// ]]>
diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html
index 08ee0a739f..4b54b83373 100644
--- a/phpBB/adm/style/simple_footer.html
+++ b/phpBB/adm/style/simple_footer.html
@@ -16,9 +16,9 @@
</div>
-<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
-<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
-<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
+<script src="{T_JQUERY_LINK}"></script>
+<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
+<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- EVENT acp_simple_footer_after -->
{$SCRIPTS}
diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html
index 439645a211..a8a32bf768 100644
--- a/phpBB/adm/style/simple_header.html
+++ b/phpBB/adm/style/simple_header.html
@@ -9,7 +9,7 @@
<link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" />
-<script type="text/javascript">
+<script>
// <![CDATA[
var jump_page = '{LA_JUMP_PAGE}{L_COLON}';
var on_page = '{CURRENT_PAGE}';
diff --git a/phpBB/assets/javascript/editor.js b/phpBB/assets/javascript/editor.js
index 23244f5a40..24cbc09f58 100644
--- a/phpBB/assets/javascript/editor.js
+++ b/phpBB/assets/javascript/editor.js
@@ -18,16 +18,9 @@ var is_win = ((clientPC.indexOf('win') !== -1) || (clientPC.indexOf('16bit') !==
var baseHeight;
/**
-* Shows the help messages in the helpline window
-*/
-function helpline(help) {
- document.forms[form_name].helpbox.value = help_line[help];
-}
-
-/**
* Fix a bug involving the TextRange object. From
* http://www.frostjedi.com/terra/scripts/demo/caretBug.html
-*/
+*/
function initInsertions() {
var doc;
@@ -104,8 +97,8 @@ function bbfontstyle(bbopen, bbclose) {
}
// IE
else if (document.selection) {
- var range = textarea.createTextRange();
- range.move("character", new_pos);
+ var range = textarea.createTextRange();
+ range.move("character", new_pos);
range.select();
storeCaret(textarea);
}
diff --git a/phpBB/assets/javascript/plupload.js b/phpBB/assets/javascript/plupload.js
index 495d756c79..8c52aae819 100644
--- a/phpBB/assets/javascript/plupload.js
+++ b/phpBB/assets/javascript/plupload.js
@@ -21,7 +21,9 @@ phpbb.plupload.initialize = function() {
// Only execute if Plupload initialized successfully.
phpbb.plupload.uploader.bind('Init', function() {
phpbb.plupload.form = $(phpbb.plupload.config.form_hook)[0];
- phpbb.plupload.rowTpl = $('#attach-row-tpl')[0].outerHTML;
+ let $attachRowTemplate = $('#attach-row-tpl');
+ $attachRowTemplate.removeClass('attach-row-tpl');
+ phpbb.plupload.rowTpl = $attachRowTemplate[0].outerHTML;
// Hide the basic upload panel and remove the attach row template.
$('#attach-row-tpl, #attach-panel-basic').remove();
@@ -88,6 +90,12 @@ phpbb.plupload.getSerializedData = function() {
obj['attachment_data[' + i + '][' + key + ']'] = datum[key];
}
}
+
+ // Insert form data
+ var $pluploadForm = $(phpbb.plupload.config.form_hook).first();
+ obj.creation_time = $pluploadForm.find('input[type=hidden][name="creation_time"]').val();
+ obj.form_token = $pluploadForm.find('input[type=hidden][name="form_token"]').val();
+
return obj;
};
@@ -262,6 +270,17 @@ phpbb.plupload.deleteFile = function(row, attachId) {
return;
}
+
+ // Handle errors while deleting file
+ if (typeof response.error !== 'undefined') {
+ phpbb.alert(phpbb.plupload.lang.ERROR, response.error.message);
+
+ // We will have to assume that the deletion failed. So leave the file status as uploaded.
+ row.find('.file-status').toggleClass('file-uploaded');
+
+ return;
+ }
+
phpbb.plupload.update(response, 'removal', index);
// Check if the user can upload files now if he had reached the max files limit.
phpbb.plupload.handleMaxFilesReached();
@@ -444,6 +463,44 @@ phpbb.plupload.fileError = function(file, error) {
phpbb.plupload.uploader = new plupload.Uploader(phpbb.plupload.config);
phpbb.plupload.initialize();
+/**
+ * Add a file filter to check for max file sizes per mime type.
+ */
+plupload.addFileFilter('mime_types_max_file_size', function(types, file, callback) {
+ if (file.size !== 'undefined') {
+ $(types).each(function(i, type) {
+ let extensions = [],
+ extsArray = type.extensions.split(',');
+
+ $(extsArray).each(function(i, extension) {
+ /^\s*\*\s*$/.test(extension) ? extensions.push("\\.*") : extensions.push("\\." + extension.replace(new RegExp("[" + "/^$.*+?|()[]{}\\".replace(/./g, "\\$&") + "]", "g"), "\\$&"));
+ });
+
+ let regex = new RegExp("(" + extensions.join("|") + ")$", "i");
+
+ if (regex.test(file.name)) {
+ if (type.max_file_size !== 'undefined' && type.max_file_size) {
+ if (file.size > type.max_file_size) {
+ phpbb.plupload.uploader.trigger('Error', {
+ code: plupload.FILE_SIZE_ERROR,
+ message: plupload.translate('File size error.'),
+ file: file
+ });
+
+ callback(false);
+ } else {
+ callback(true);
+ }
+ } else {
+ callback(true);
+ }
+
+ return false;
+ }
+ });
+ }
+});
+
var $fileList = $('#file-list');
/**
diff --git a/phpBB/composer.json b/phpBB/composer.json
index d192fd57c8..33655b865f 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -31,7 +31,7 @@
"guzzlehttp/guzzle": "~5.3",
"lusitanian/oauth": "^0.8.1",
"marc1706/fast-image-size": "^1.1",
- "paragonie/random_compat": "^1.4",
+ "paragonie/random_compat": "^2.0",
"patchwork/utf8": "^1.1",
"s9e/text-formatter": "^1.3",
"symfony/config": "^2.8",
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index a80bac724e..6eb63d1782 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "6daa2f5f7a161377dee1835bd4d5b463",
+ "content-hash": "cd42964227d699a6923798e33eab3dd5",
"packages": [
{
"name": "bantu/ini-get-wrapper",
@@ -83,16 +83,16 @@
},
{
"name": "guzzlehttp/guzzle",
- "version": "5.3.3",
+ "version": "5.3.4",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "93bbdb30d59be6cd9839495306c65f2907370eb9"
+ "reference": "b87eda7a7162f95574032da17e9323c9899cb6b2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/93bbdb30d59be6cd9839495306c65f2907370eb9",
- "reference": "93bbdb30d59be6cd9839495306c65f2907370eb9",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b87eda7a7162f95574032da17e9323c9899cb6b2",
+ "reference": "b87eda7a7162f95574032da17e9323c9899cb6b2",
"shasum": ""
},
"require": {
@@ -132,7 +132,7 @@
"rest",
"web service"
],
- "time": "2018-07-31T13:33:10+00:00"
+ "time": "2019-10-30T09:32:00+00:00"
},
{
"name": "guzzlehttp/ringphp",
@@ -346,16 +346,16 @@
},
{
"name": "marc1706/fast-image-size",
- "version": "v1.1.4",
+ "version": "v1.1.6",
"source": {
"type": "git",
"url": "https://github.com/marc1706/fast-image-size.git",
- "reference": "c4ded0223a4e49ae45a2183a69f6afac5baf7250"
+ "reference": "3a3a2b036be20f43fa06ce00dfa754df503e6684"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/marc1706/fast-image-size/zipball/c4ded0223a4e49ae45a2183a69f6afac5baf7250",
- "reference": "c4ded0223a4e49ae45a2183a69f6afac5baf7250",
+ "url": "https://api.github.com/repos/marc1706/fast-image-size/zipball/3a3a2b036be20f43fa06ce00dfa754df503e6684",
+ "reference": "3a3a2b036be20f43fa06ce00dfa754df503e6684",
"shasum": ""
},
"require": {
@@ -363,9 +363,14 @@
"php": ">=5.3.0"
},
"require-dev": {
- "phpunit/phpunit": "4.*"
+ "phpunit/phpunit": "^4.8"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
"FastImageSize\\": "lib",
@@ -394,7 +399,7 @@
"php",
"size"
],
- "time": "2017-10-23T18:52:01+00:00"
+ "time": "2019-12-07T08:02:07+00:00"
},
{
"name": "ocramius/proxy-manager",
@@ -461,16 +466,16 @@
},
{
"name": "paragonie/random_compat",
- "version": "v1.4.3",
+ "version": "v2.0.18",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
- "reference": "9b3899e3c3ddde89016f576edb8c489708ad64cd"
+ "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/9b3899e3c3ddde89016f576edb8c489708ad64cd",
- "reference": "9b3899e3c3ddde89016f576edb8c489708ad64cd",
+ "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db",
+ "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db",
"shasum": ""
},
"require": {
@@ -502,29 +507,33 @@
"description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
"keywords": [
"csprng",
+ "polyfill",
"pseudorandom",
"random"
],
- "time": "2017-03-13T16:22:52+00:00"
+ "time": "2019-01-03T20:59:08+00:00"
},
{
"name": "patchwork/utf8",
- "version": "v1.3.1",
+ "version": "v1.3.2",
"source": {
"type": "git",
"url": "https://github.com/tchwork/utf8.git",
- "reference": "30ec6451aec7d2536f0af8fe535f70c764f2c47a"
+ "reference": "d296e0026e7ce10b2a9fe594feca9628ef00e9e8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/tchwork/utf8/zipball/30ec6451aec7d2536f0af8fe535f70c764f2c47a",
- "reference": "30ec6451aec7d2536f0af8fe535f70c764f2c47a",
+ "url": "https://api.github.com/repos/tchwork/utf8/zipball/d296e0026e7ce10b2a9fe594feca9628ef00e9e8",
+ "reference": "d296e0026e7ce10b2a9fe594feca9628ef00e9e8",
"shasum": ""
},
"require": {
"lib-pcre": ">=7.3",
"php": ">=5.3.0"
},
+ "require-dev": {
+ "symfony/phpunit-bridge": "^3.4|^4.4"
+ },
"suggest": {
"ext-iconv": "Use iconv for best performance",
"ext-intl": "Use Intl for best performance",
@@ -564,20 +573,20 @@
"utf-8",
"utf8"
],
- "time": "2016-05-18T13:57:10+00:00"
+ "time": "2019-12-03T14:44:12+00:00"
},
{
"name": "psr/log",
- "version": "1.0.2",
+ "version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
+ "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
+ "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
"shasum": ""
},
"require": {
@@ -586,7 +595,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.1.x-dev"
}
},
"autoload": {
@@ -611,20 +620,20 @@
"psr",
"psr-3"
],
- "time": "2016-10-10T12:19:37+00:00"
+ "time": "2019-11-01T11:05:21+00:00"
},
{
"name": "react/promise",
- "version": "v2.7.0",
+ "version": "v2.7.1",
"source": {
"type": "git",
"url": "https://github.com/reactphp/promise.git",
- "reference": "f4edc2581617431aea50430749db55cc3fc031b3"
+ "reference": "31ffa96f8d2ed0341a57848cbb84d88b89dd664d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/reactphp/promise/zipball/f4edc2581617431aea50430749db55cc3fc031b3",
- "reference": "f4edc2581617431aea50430749db55cc3fc031b3",
+ "url": "https://api.github.com/repos/reactphp/promise/zipball/31ffa96f8d2ed0341a57848cbb84d88b89dd664d",
+ "reference": "31ffa96f8d2ed0341a57848cbb84d88b89dd664d",
"shasum": ""
},
"require": {
@@ -657,20 +666,20 @@
"promise",
"promises"
],
- "time": "2018-06-13T15:59:06+00:00"
+ "time": "2019-01-07T21:25:54+00:00"
},
{
"name": "s9e/text-formatter",
- "version": "1.3.2",
+ "version": "1.4.5",
"source": {
"type": "git",
"url": "https://github.com/s9e/TextFormatter.git",
- "reference": "640b65b0d4c1de93bc98000c003998c08b2e7256"
+ "reference": "6857c53658929b66dc0d92daece17f211c64ea61"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/640b65b0d4c1de93bc98000c003998c08b2e7256",
- "reference": "640b65b0d4c1de93bc98000c003998c08b2e7256",
+ "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/6857c53658929b66dc0d92daece17f211c64ea61",
+ "reference": "6857c53658929b66dc0d92daece17f211c64ea61",
"shasum": ""
},
"require": {
@@ -682,6 +691,7 @@
"require-dev": {
"matthiasmullie/minify": "*",
"php-coveralls/php-coveralls": "*",
+ "phpunit/phpunit": "<6",
"s9e/regexp-builder": "1.*"
},
"suggest": {
@@ -722,20 +732,20 @@
"parser",
"shortcodes"
],
- "time": "2018-12-23T20:27:39+00:00"
+ "time": "2019-06-04T15:47:55+00:00"
},
{
"name": "symfony/config",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "fb3469266daaa67a1e6d42fc78fa6cdc254689f6"
+ "reference": "7dd5f5040dc04c118d057fb5886563963eb70011"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/fb3469266daaa67a1e6d42fc78fa6cdc254689f6",
- "reference": "fb3469266daaa67a1e6d42fc78fa6cdc254689f6",
+ "url": "https://api.github.com/repos/symfony/config/zipball/7dd5f5040dc04c118d057fb5886563963eb70011",
+ "reference": "7dd5f5040dc04c118d057fb5886563963eb70011",
"shasum": ""
},
"require": {
@@ -779,20 +789,20 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2018-09-08T12:44:02+00:00"
+ "time": "2018-11-26T09:38:12+00:00"
},
{
"name": "symfony/console",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "aca0dcc0c75496e17e2aa0303bb9c8e6d79ed789"
+ "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/aca0dcc0c75496e17e2aa0303bb9c8e6d79ed789",
- "reference": "aca0dcc0c75496e17e2aa0303bb9c8e6d79ed789",
+ "url": "https://api.github.com/repos/symfony/console/zipball/cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12",
+ "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12",
"shasum": ""
},
"require": {
@@ -840,20 +850,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2018-09-30T03:33:07+00:00"
+ "time": "2018-11-20T15:55:20+00:00"
},
{
"name": "symfony/debug",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "4fd77efcd4a499bf76d4ff46d092c67f3fe9e347"
+ "reference": "74251c8d50dd3be7c4ce0c7b862497cdc641a5d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/4fd77efcd4a499bf76d4ff46d092c67f3fe9e347",
- "reference": "4fd77efcd4a499bf76d4ff46d092c67f3fe9e347",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/74251c8d50dd3be7c4ce0c7b862497cdc641a5d0",
+ "reference": "74251c8d50dd3be7c4ce0c7b862497cdc641a5d0",
"shasum": ""
},
"require": {
@@ -897,20 +907,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2018-09-21T12:46:38+00:00"
+ "time": "2018-11-11T11:18:13+00:00"
},
{
"name": "symfony/dependency-injection",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "84219396d1a79d149a5a9d5f71afaf48dcfde7d0"
+ "reference": "c306198fee8f872a8f5f031e6e4f6f83086992d8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/84219396d1a79d149a5a9d5f71afaf48dcfde7d0",
- "reference": "84219396d1a79d149a5a9d5f71afaf48dcfde7d0",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/c306198fee8f872a8f5f031e6e4f6f83086992d8",
+ "reference": "c306198fee8f872a8f5f031e6e4f6f83086992d8",
"shasum": ""
},
"require": {
@@ -960,20 +970,20 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
- "time": "2018-09-08T12:44:02+00:00"
+ "time": "2019-04-16T11:33:46+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "84ae343f39947aa084426ed1138bb96bf94d1f12"
+ "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/84ae343f39947aa084426ed1138bb96bf94d1f12",
- "reference": "84ae343f39947aa084426ed1138bb96bf94d1f12",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0",
+ "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0",
"shasum": ""
},
"require": {
@@ -1020,20 +1030,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2018-07-26T09:03:18+00:00"
+ "time": "2018-11-21T14:20:20+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "91f194c5ec8d2ad5ce417a218ce3c46909e92f4d"
+ "reference": "7ae46872dad09dffb7fe1e93a0937097339d0080"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/91f194c5ec8d2ad5ce417a218ce3c46909e92f4d",
- "reference": "91f194c5ec8d2ad5ce417a218ce3c46909e92f4d",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/7ae46872dad09dffb7fe1e93a0937097339d0080",
+ "reference": "7ae46872dad09dffb7fe1e93a0937097339d0080",
"shasum": ""
},
"require": {
@@ -1070,20 +1080,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2018-09-24T08:04:37+00:00"
+ "time": "2018-11-11T11:18:13+00:00"
},
{
"name": "symfony/finder",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "5ebb438d1aabe9dba93099dd06e0500f97817a6e"
+ "reference": "1444eac52273e345d9b95129bf914639305a9ba4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/5ebb438d1aabe9dba93099dd06e0500f97817a6e",
- "reference": "5ebb438d1aabe9dba93099dd06e0500f97817a6e",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/1444eac52273e345d9b95129bf914639305a9ba4",
+ "reference": "1444eac52273e345d9b95129bf914639305a9ba4",
"shasum": ""
},
"require": {
@@ -1119,20 +1129,20 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2018-09-21T12:46:38+00:00"
+ "time": "2018-11-11T11:18:13+00:00"
},
{
"name": "symfony/http-foundation",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "9fcce5f0b6896a135d192cc9fd5394fd46f74eff"
+ "reference": "3929d9fe8148d17819ad0178c748b8d339420709"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/9fcce5f0b6896a135d192cc9fd5394fd46f74eff",
- "reference": "9fcce5f0b6896a135d192cc9fd5394fd46f74eff",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3929d9fe8148d17819ad0178c748b8d339420709",
+ "reference": "3929d9fe8148d17819ad0178c748b8d339420709",
"shasum": ""
},
"require": {
@@ -1174,20 +1184,20 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "time": "2018-09-23T15:27:53+00:00"
+ "time": "2019-11-12T12:34:41+00:00"
},
{
"name": "symfony/http-kernel",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "90411d2ad577b883f2fc9de06c86dd564d9ac676"
+ "reference": "c3be27b8627cd5ee8dfa8d1b923982f618ec521c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/90411d2ad577b883f2fc9de06c86dd564d9ac676",
- "reference": "90411d2ad577b883f2fc9de06c86dd564d9ac676",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/c3be27b8627cd5ee8dfa8d1b923982f618ec521c",
+ "reference": "c3be27b8627cd5ee8dfa8d1b923982f618ec521c",
"shasum": ""
},
"require": {
@@ -1196,7 +1206,8 @@
"symfony/debug": "^2.6.2",
"symfony/event-dispatcher": "^2.6.7|~3.0.0",
"symfony/http-foundation": "~2.7.36|~2.8.29|~3.1.6",
- "symfony/polyfill-ctype": "~1.8"
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-php56": "~1.8"
},
"conflict": {
"symfony/config": "<2.7",
@@ -1258,20 +1269,20 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
- "time": "2018-09-30T03:51:44+00:00"
+ "time": "2019-11-13T08:36:16+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.9.0",
+ "version": "v1.13.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
+ "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
- "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
+ "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
"shasum": ""
},
"require": {
@@ -1283,7 +1294,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.9-dev"
+ "dev-master": "1.13-dev"
}
},
"autoload": {
@@ -1300,12 +1311,12 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- },
- {
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for ctype functions",
@@ -1316,20 +1327,20 @@
"polyfill",
"portable"
],
- "time": "2018-08-06T14:22:27+00:00"
+ "time": "2019-11-27T13:56:44+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.9.0",
+ "version": "v1.13.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8"
+ "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8",
- "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f",
+ "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f",
"shasum": ""
},
"require": {
@@ -1341,7 +1352,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.9-dev"
+ "dev-master": "1.13-dev"
}
},
"autoload": {
@@ -1375,20 +1386,20 @@
"portable",
"shim"
],
- "time": "2018-08-06T14:22:27+00:00"
+ "time": "2019-11-27T14:18:11+00:00"
},
{
"name": "symfony/polyfill-php54",
- "version": "v1.9.0",
+ "version": "v1.13.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php54.git",
- "reference": "412977e090c6a8472dc39d50d1beb7d59495a965"
+ "reference": "dd1618047426412036e98d159940d58a81fc392c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/412977e090c6a8472dc39d50d1beb7d59495a965",
- "reference": "412977e090c6a8472dc39d50d1beb7d59495a965",
+ "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/dd1618047426412036e98d159940d58a81fc392c",
+ "reference": "dd1618047426412036e98d159940d58a81fc392c",
"shasum": ""
},
"require": {
@@ -1397,7 +1408,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.9-dev"
+ "dev-master": "1.13-dev"
}
},
"autoload": {
@@ -1433,20 +1444,20 @@
"portable",
"shim"
],
- "time": "2018-08-06T14:22:27+00:00"
+ "time": "2019-11-27T13:56:44+00:00"
},
{
"name": "symfony/polyfill-php55",
- "version": "v1.9.0",
+ "version": "v1.13.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php55.git",
- "reference": "578b8528da843de0fc65ec395900fa3181f2ead7"
+ "reference": "b0d838f225725e2951af1aafc784d2e5ea7b656e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/578b8528da843de0fc65ec395900fa3181f2ead7",
- "reference": "578b8528da843de0fc65ec395900fa3181f2ead7",
+ "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/b0d838f225725e2951af1aafc784d2e5ea7b656e",
+ "reference": "b0d838f225725e2951af1aafc784d2e5ea7b656e",
"shasum": ""
},
"require": {
@@ -1456,7 +1467,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.9-dev"
+ "dev-master": "1.13-dev"
}
},
"autoload": {
@@ -1489,20 +1500,128 @@
"portable",
"shim"
],
- "time": "2018-08-06T14:22:27+00:00"
+ "time": "2019-11-27T13:56:44+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php56",
+ "version": "v1.13.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php56.git",
+ "reference": "53dd1cdf3cb986893ccf2b96665b25b3abb384f4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/53dd1cdf3cb986893ccf2b96665b25b3abb384f4",
+ "reference": "53dd1cdf3cb986893ccf2b96665b25b3abb384f4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "symfony/polyfill-util": "~1.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.13-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php56\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2019-11-27T13:56:44+00:00"
+ },
+ {
+ "name": "symfony/polyfill-util",
+ "version": "v1.13.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-util.git",
+ "reference": "964a67f293b66b95883a5ed918a65354fcd2258f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/964a67f293b66b95883a5ed918a65354fcd2258f",
+ "reference": "964a67f293b66b95883a5ed918a65354fcd2258f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.13-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Util\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony utilities for portability of PHP codes",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compat",
+ "compatibility",
+ "polyfill",
+ "shim"
+ ],
+ "time": "2019-11-27T13:56:44+00:00"
},
{
"name": "symfony/proxy-manager-bridge",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/proxy-manager-bridge.git",
- "reference": "0fd7ab039e26a33c5e3d1e00642bc83412c0896a"
+ "reference": "40802595fea26ada845ed58124d8000a13dd4c6f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/proxy-manager-bridge/zipball/0fd7ab039e26a33c5e3d1e00642bc83412c0896a",
- "reference": "0fd7ab039e26a33c5e3d1e00642bc83412c0896a",
+ "url": "https://api.github.com/repos/symfony/proxy-manager-bridge/zipball/40802595fea26ada845ed58124d8000a13dd4c6f",
+ "reference": "40802595fea26ada845ed58124d8000a13dd4c6f",
"shasum": ""
},
"require": {
@@ -1543,20 +1662,20 @@
],
"description": "Symfony ProxyManager Bridge",
"homepage": "https://symfony.com",
- "time": "2018-07-26T09:03:18+00:00"
+ "time": "2019-04-16T11:33:46+00:00"
},
{
"name": "symfony/routing",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "fed18962c40095adc36c2ad05bf0d957cc346f61"
+ "reference": "8b0df6869d1997baafff6a1541826eac5a03d067"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/fed18962c40095adc36c2ad05bf0d957cc346f61",
- "reference": "fed18962c40095adc36c2ad05bf0d957cc346f61",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/8b0df6869d1997baafff6a1541826eac5a03d067",
+ "reference": "8b0df6869d1997baafff6a1541826eac5a03d067",
"shasum": ""
},
"require": {
@@ -1617,20 +1736,20 @@
"uri",
"url"
],
- "time": "2018-09-08T12:44:02+00:00"
+ "time": "2018-11-20T15:55:20+00:00"
},
{
"name": "symfony/twig-bridge",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/twig-bridge.git",
- "reference": "69d2a5542ea37309292d10029ce52b32656523a0"
+ "reference": "ecc1e30d05fa99f25b504e2d6a8684555ae39f7c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/69d2a5542ea37309292d10029ce52b32656523a0",
- "reference": "69d2a5542ea37309292d10029ce52b32656523a0",
+ "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/ecc1e30d05fa99f25b504e2d6a8684555ae39f7c",
+ "reference": "ecc1e30d05fa99f25b504e2d6a8684555ae39f7c",
"shasum": ""
},
"require": {
@@ -1702,20 +1821,20 @@
],
"description": "Symfony Twig Bridge",
"homepage": "https://symfony.com",
- "time": "2018-08-29T13:11:53+00:00"
+ "time": "2018-11-11T11:18:13+00:00"
},
{
"name": "symfony/yaml",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "5baf0f821b14eee8ca415e6a0361a9fa140c002c"
+ "reference": "02c1859112aa779d9ab394ae4f3381911d84052b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/5baf0f821b14eee8ca415e6a0361a9fa140c002c",
- "reference": "5baf0f821b14eee8ca415e6a0361a9fa140c002c",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/02c1859112aa779d9ab394ae4f3381911d84052b",
+ "reference": "02c1859112aa779d9ab394ae4f3381911d84052b",
"shasum": ""
},
"require": {
@@ -1752,35 +1871,35 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2018-08-29T13:11:53+00:00"
+ "time": "2018-11-11T11:18:13+00:00"
},
{
"name": "twig/twig",
- "version": "v1.35.4",
+ "version": "v1.42.2",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a"
+ "reference": "21707d6ebd05476854805e4f91b836531941bcd4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e081e98378a1e78c29cc9eba4aefa5d78a05d2a",
- "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/21707d6ebd05476854805e4f91b836531941bcd4",
+ "reference": "21707d6ebd05476854805e4f91b836531941bcd4",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
+ "php": ">=5.4.0",
"symfony/polyfill-ctype": "^1.8"
},
"require-dev": {
"psr/container": "^1.0",
"symfony/debug": "^2.7",
- "symfony/phpunit-bridge": "^3.3"
+ "symfony/phpunit-bridge": "^3.4.19|^4.1.8|^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.35-dev"
+ "dev-master": "1.42-dev"
}
},
"autoload": {
@@ -1818,7 +1937,7 @@
"keywords": [
"templating"
],
- "time": "2018-07-13T07:12:17+00:00"
+ "time": "2019-06-18T15:35:16+00:00"
},
{
"name": "zendframework/zend-code",
@@ -2168,21 +2287,24 @@
},
{
"name": "michelf/php-markdown",
- "version": "1.8.0",
+ "version": "1.9.0",
"source": {
"type": "git",
"url": "https://github.com/michelf/php-markdown.git",
- "reference": "01ab082b355bf188d907b9929cd99b2923053495"
+ "reference": "c83178d49e372ca967d1a8c77ae4e051b3a3c75c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/michelf/php-markdown/zipball/01ab082b355bf188d907b9929cd99b2923053495",
- "reference": "01ab082b355bf188d907b9929cd99b2923053495",
+ "url": "https://api.github.com/repos/michelf/php-markdown/zipball/c83178d49e372ca967d1a8c77ae4e051b3a3c75c",
+ "reference": "c83178d49e372ca967d1a8c77ae4e051b3a3c75c",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
+ "require-dev": {
+ "phpunit/phpunit": ">=4.3 <5.8"
+ },
"type": "library",
"autoload": {
"psr-4": {
@@ -2210,7 +2332,7 @@
"keywords": [
"markdown"
],
- "time": "2018-01-15T00:49:33+00:00"
+ "time": "2019-12-02T02:32:27+00:00"
},
{
"name": "nikic/php-parser",
@@ -2293,7 +2415,8 @@
"authors": [
{
"name": "Michiel Rook",
- "email": "mrook@php.net"
+ "email": "mrook@php.net",
+ "role": "Lead"
},
{
"name": "Phing Community",
@@ -2360,22 +2483,22 @@
},
{
"name": "phpspec/prophecy",
- "version": "1.8.0",
+ "version": "1.9.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06"
+ "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
- "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203",
+ "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
"sebastian/comparator": "^1.1|^2.0|^3.0",
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
},
@@ -2390,8 +2513,8 @@
}
},
"autoload": {
- "psr-0": {
- "Prophecy\\": "src/"
+ "psr-4": {
+ "Prophecy\\": "src/Prophecy"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -2419,7 +2542,7 @@
"spy",
"stub"
],
- "time": "2018-08-05T17:53:17+00:00"
+ "time": "2019-10-03T11:07:50+00:00"
},
{
"name": "phpunit/dbunit",
@@ -2855,6 +2978,7 @@
"mock",
"xunit"
],
+ "abandoned": true,
"time": "2015-10-02T06:51:40+00:00"
},
{
@@ -3335,16 +3459,16 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "2.9.1",
+ "version": "2.9.2",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62"
+ "reference": "2acf168de78487db620ab4bc524135a13cfe6745"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62",
- "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745",
+ "reference": "2acf168de78487db620ab4bc524135a13cfe6745",
"shasum": ""
},
"require": {
@@ -3409,20 +3533,20 @@
"phpcs",
"standards"
],
- "time": "2017-05-22T02:43:20+00:00"
+ "time": "2018-11-07T22:31:41+00:00"
},
{
"name": "symfony/browser-kit",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "fe44362c97307e7935996cb09d320fcc22619656"
+ "reference": "b507697225f32a76a9d333d0766fb46353e9d00d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/fe44362c97307e7935996cb09d320fcc22619656",
- "reference": "fe44362c97307e7935996cb09d320fcc22619656",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/b507697225f32a76a9d333d0766fb46353e9d00d",
+ "reference": "b507697225f32a76a9d333d0766fb46353e9d00d",
"shasum": ""
},
"require": {
@@ -3466,20 +3590,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
- "time": "2018-07-26T09:03:18+00:00"
+ "time": "2018-11-26T06:55:10+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "4cca41ebe83cd5b4bd0c1a9f6bdfaec7103f97fb"
+ "reference": "7b1692e418d7ccac24c373528453bc90e42797de"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/4cca41ebe83cd5b4bd0c1a9f6bdfaec7103f97fb",
- "reference": "4cca41ebe83cd5b4bd0c1a9f6bdfaec7103f97fb",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/7b1692e418d7ccac24c373528453bc90e42797de",
+ "reference": "7b1692e418d7ccac24c373528453bc90e42797de",
"shasum": ""
},
"require": {
@@ -3505,34 +3629,34 @@
],
"authors": [
{
- "name": "Jean-François Simon",
- "email": "jeanfrancois.simon@sensiolabs.com"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
+ "name": "Jean-François Simon",
+ "email": "jeanfrancois.simon@sensiolabs.com"
+ },
+ {
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2018-09-08T12:44:02+00:00"
+ "time": "2018-11-11T11:18:13+00:00"
},
{
"name": "symfony/dom-crawler",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "ba0b706b5ac1c1afcf7d34507a5a272f51cc7721"
+ "reference": "2cdc7d3909eea6f982a6298d2e9ab7db01b6403c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/ba0b706b5ac1c1afcf7d34507a5a272f51cc7721",
- "reference": "ba0b706b5ac1c1afcf7d34507a5a272f51cc7721",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/2cdc7d3909eea6f982a6298d2e9ab7db01b6403c",
+ "reference": "2cdc7d3909eea6f982a6298d2e9ab7db01b6403c",
"shasum": ""
},
"require": {
@@ -3576,20 +3700,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2018-09-21T12:46:38+00:00"
+ "time": "2018-11-24T22:30:19+00:00"
},
{
"name": "symfony/process",
- "version": "v2.8.46",
+ "version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "f09e21b7c5aba06c47bbfad9cbcf13ac7f0db0a6"
+ "reference": "c3591a09c78639822b0b290d44edb69bf9f05dc8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/f09e21b7c5aba06c47bbfad9cbcf13ac7f0db0a6",
- "reference": "f09e21b7c5aba06c47bbfad9cbcf13ac7f0db0a6",
+ "url": "https://api.github.com/repos/symfony/process/zipball/c3591a09c78639822b0b290d44edb69bf9f05dc8",
+ "reference": "c3591a09c78639822b0b290d44edb69bf9f05dc8",
"shasum": ""
},
"require": {
@@ -3625,7 +3749,7 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2018-09-06T17:11:15+00:00"
+ "time": "2018-11-11T11:18:13+00:00"
}
],
"aliases": [],
diff --git a/phpBB/config/default/container/services.yml b/phpBB/config/default/container/services.yml
index 9bb1d673f4..3ead1e6181 100644
--- a/phpBB/config/default/container/services.yml
+++ b/phpBB/config/default/container/services.yml
@@ -122,7 +122,13 @@ services:
group_helper:
class: phpbb\group\helper
arguments:
+ - '@auth'
+ - '@cache'
+ - '@config'
- '@language'
+ - '@dispatcher'
+ - '@path_helper'
+ - '@user'
log:
class: phpbb\log\log
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 09a3b8dff5..06cdb37b56 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -50,6 +50,11 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ul>
+ <li><a href="#v328rc1">Changes since 3.2.8-RC1</a></li>
+ <li><a href="#v327">Changes since 3.2.7</a></li>
+ <li><a href="#v326">Changes since 3.2.6</a></li>
+ <li><a href="#v326rc1">Changes since 3.2.6-RC1</a></li>
+ <li><a href="#v325">Changes since 3.2.5</a></li>
<li><a href="#v325rc1">Changes since 3.2.5-RC1</a></li>
<li><a href="#v324">Changes since 3.2.4</a></li>
<li><a href="#v324rc1">Changes since 3.2.4-RC1</a></li>
@@ -135,6 +140,199 @@
<div class="inner">
<div class="content">
+ <a name="v328rc1"></a><h3>Changes since 3.2.8-RC1</h3>
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15467">PHPBB3-15467</a>] - Permission settings do not take affect when set using All YES/NO/NEVER</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16123">PHPBB3-16123</a>] - PHP error (Array to string conversion) on new user registration if email address is banned and &quot; Reason shown to the banned&quot; is empty</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16136">PHPBB3-16136</a>] - Missing word in 'AUTH_PROVIDER_OAUTH_ERROR_ALREADY_LINKED' </li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16134">PHPBB3-16134</a>] - Exclude group leaders on group member purge</li>
+ </ul>
+ <h4>Security Issue</h4>
+ <ul>
+ <li>[SECURITY-243] - CSS injection via BBCode tag</li>
+ <li>[SECURITY-244] - Missing form token check when handling attachments</li>
+ <li>[SECURITY-246] - Missing form token check when managing BBCodes</li>
+ </ul>
+ <h4>Hardening</h4>
+ <ul>
+ <li>[SECURITY-247] - Disable MySQLi local infile to prevent local file inclusion</li>
+ </ul>
+
+ <a name="v327"></a><h3>Changes since 3.2.7</h3>
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13175">PHPBB3-13175</a>] - External accounts can be linked to more than one local account</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14459">PHPBB3-14459</a>] - Check language input for group</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15211">PHPBB3-15211</a>] - Emoji characters in forum name causing SQL errors</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15885">PHPBB3-15885</a>] - Group rank not displaying on memberlist_body</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15897">PHPBB3-15897</a>] - Unicode Characters in Attachment Comment Causes mySQL Error </li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15932">PHPBB3-15932</a>] - Users can delete their attachments in the UCP, even if the post is locked</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15961">PHPBB3-15961</a>] - SMTP support for TLS is forcing use of deprecated TLS 1.0</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15974">PHPBB3-15974</a>] - The link &quot;Back to previous page&quot; can redirect to another page, not the previous one</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15976">PHPBB3-15976</a>] - Changing account settings without changing password resets user_passchg</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15982">PHPBB3-15982</a>] - Q&amp;A captcha plug-in still throws PHP 7.2.x countable warning</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16003">PHPBB3-16003</a>] - Post count not updated when deleting only post in topic</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16021">PHPBB3-16021</a>] - Recognize number of Template Event instances in events.md file</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16040">PHPBB3-16040</a>] - Topic Icon with space in filename isn't displayed by viewforum_body.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16048">PHPBB3-16048</a>] - Unable to restore any backup from ACP</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16050">PHPBB3-16050</a>] - PHP warning in MCP banning tab on PHP 7.2+</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16053">PHPBB3-16053</a>] - BBCodes using {TEXT} in HTML tags no longer work</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16054">PHPBB3-16054</a>] - Style templates no longer able to login &quot;from any page.&quot;</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16055">PHPBB3-16055</a>] - Unable to login using Oauth via Forums, topics or posts</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16061">PHPBB3-16061</a>] - Migrator never drops unique indexes</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16063">PHPBB3-16063</a>] - board_dst config value is not removed from config table after conversion</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16066">PHPBB3-16066</a>] - Banned or suspended user receives &quot;The submitted form was invalid. Try submitting again.&quot;</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16071">PHPBB3-16071</a>] - Undefined index for custom attachments groups</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16073">PHPBB3-16073</a>] - Fix warning in ACP version check</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16074">PHPBB3-16074</a>] - Twemoji -fe0f sequence not rendering</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16075">PHPBB3-16075</a>] - PM filter “sent to my default usergroup” triggers array to string conversion warning</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16080">PHPBB3-16080</a>] - Warnings When a Style exists on database but not on FTP</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16093">PHPBB3-16093</a>] - Attach row template always gets displayed with JS disabled</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16096">PHPBB3-16096</a>] - MySQL full text search always uses MyISAM limits</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16124">PHPBB3-16124</a>] - Incorrect users search by last visit time in memberlist.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16126">PHPBB3-16126</a>] - AppVeyor builds fail due to chocolatey being unable to install PHP</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15745">PHPBB3-15745</a>] - Hardcoded lang in credit line</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15886">PHPBB3-15886</a>] - Group helper functions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15946">PHPBB3-15946</a>] - Add event - core.posting_modify_row_data</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15967">PHPBB3-15967</a>] - Unambiguous wording in user activation request email to Admin/Moderator</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15984">PHPBB3-15984</a>] - Use of 'Cache-Control: public' for serving files</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16000">PHPBB3-16000</a>] - Provide link to PHP Date Function in both ACP and UCP</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16013">PHPBB3-16013</a>] - Do not prevent username changes in ACP</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16019">PHPBB3-16019</a>] - Deny prosilver's uninstallation</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16024">PHPBB3-16024</a>] - Add core.topic_review_modify_sql_ary</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16025">PHPBB3-16025</a>] - Add 2 template events *_author_username_{append/prepend}</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16047">PHPBB3-16047</a>] - ACP Private Messages: Wording could be better</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16058">PHPBB3-16058</a>] - Remove sudo required from travis config</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16065">PHPBB3-16065</a>] - Undefined index: user_ip in oauth.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16068">PHPBB3-16068</a>] - Incorrect docblock parameter types</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16070">PHPBB3-16070</a>] - Remove support for WebSTAR and Xitami</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16078">PHPBB3-16078</a>] - Use chrome webdriver for UI tests</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16089">PHPBB3-16089</a>] - Add core.confirm_box_ajax_before</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16097">PHPBB3-16097</a>] - Add core.viewtopic_gen_sort_selects_before</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16102">PHPBB3-16102</a>] - Add core.posting_modify_post_subject</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16103">PHPBB3-16103</a>] - Add core.pm_modify_message_subject</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16106">PHPBB3-16106</a>] - Add core.mcp_main_before</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16107">PHPBB3-16107</a>] - Add mcp_move_destination_forum_before|after</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16108">PHPBB3-16108</a>] - Add topiclist_row_topic_by_author_before|after</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16109">PHPBB3-16109</a>] - Custom Profile Field visibility is incorrectly explained</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16111">PHPBB3-16111</a>] - Add core.message_history_modify_sql_ary</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16113">PHPBB3-16113</a>] - Add core.mcp_topic_modify_sql_ary</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16114">PHPBB3-16114</a>] - Add 2 mcp_topic_post_author_full_{append/prepend}</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16127">PHPBB3-16127</a>] - Add UI for Mass email $max_chunk_size</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16129">PHPBB3-16129</a>] - The attachment's ALT tag is supposed to describe the image, not the file.</li>
+ </ul>
+ <h4>Task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16067">PHPBB3-16067</a>] - Define trusty build environment for travis builds</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16112">PHPBB3-16112</a>] - Update composer dependencies to latest</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16119">PHPBB3-16119</a>] - The text input for poll question has a too high maxlength attribute</li>
+ </ul>
+ <h4>Hardening</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16101">PHPBB3-16101</a>] - Add Referrer-Policy header</li>
+ </ul>
+
+ <a name="v326"></a><h3>Changes since 3.2.6</h3>
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16034">PHPBB3-16034</a>] - Links created with [url=] - are sometimes incorrectly shortened</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16036">PHPBB3-16036</a>] - Cannot login with 3.2.6</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16037">PHPBB3-16037</a>] - Private message ViewFolder Broken</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16039">PHPBB3-16039</a>] - Unable to change announcement to standard topic due to missing global</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16042">PHPBB3-16042</a>] - Use S_LOGIN_REDIRECT to output login form token</li>
+ </ul>
+
+ <a name="v326rc1"></a><h3>Changes since 3.2.6-RC1</h3>
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16027">PHPBB3-16027</a>] - Appveyor builds fail on PHP 7.0</li>
+ </ul>
+ <h4>Security Issue</h4>
+ <ul>
+ <li>[SECURITY-231] - Remote avatar functionality allows checking for files and ports on local network</li>
+ <li>[SECURITY-235] - Fulltext native search can be used to cause long execution times</li>
+ </ul>
+ <h4>Hardening</h4>
+ <ul>
+ <li>[SECURITY-228] - Require form token in login_box</li>
+ <li>[SECURITY-233] - SMTP auth data shouldn't be cached</li>
+ <li>[SECURITY-234] - Main website URL in Admin Control Panel should not support JS URLs</li>
+ </ul>
+
+ <a name="v325"></a><h3>Changes since 3.2.5</h3>
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15509">PHPBB3-15509</a>] - Update database: info message is to scary</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15869">PHPBB3-15869</a>] - Cookies Problem with domains with special chars</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15876">PHPBB3-15876</a>] - Mysql 5.7 support Q&amp;A plugin</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15883">PHPBB3-15883</a>] - No error for invalid usernames on bulk add to usergroup</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15904">PHPBB3-15904</a>] - PHP warning when accessing modules in ACP System tab</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15917">PHPBB3-15917</a>] - Unapproved posts count towards forum post count</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15918">PHPBB3-15918</a>] - Ban reason messages show backslash (\) before apostrophe -- ex. (don\'t).</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15919">PHPBB3-15919</a>] - Lint test throws PHP warnings due to node modules folder</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15931">PHPBB3-15931</a>] - Issues in PM report emails</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15954">PHPBB3-15954</a>] - Some calls to include() don't have a safeguard</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15957">PHPBB3-15957</a>] - User preferences show notification method &quot;both&quot; with disabled Jabber in ACP</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15959">PHPBB3-15959</a>] - Travis Network Test is Failing for news.cnet.com</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15965">PHPBB3-15965</a>] - Console command to handle thumbnails have files directory hardcoded</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15975">PHPBB3-15975</a>] - Delete or prune an user doesn't remove its entries in the user_notifications table</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15986">PHPBB3-15986</a>] - Add missing language key for posting.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15996">PHPBB3-15996</a>] - Invalid data provider function name in migrator_tool_permission_test</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16006">PHPBB3-16006</a>] - Duplicate form IDs in UCP oauth form</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15884">PHPBB3-15884</a>] - Add memberlist_body_* events</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15889">PHPBB3-15889</a>] - Add core.memberlist_modify_memberrow_sql</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15890">PHPBB3-15890</a>] - Add core.memberlist_modify_viewprofile_sql</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15891">PHPBB3-15891</a>] - Add core.memberlist_modify_view_profile_template_vars</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15898">PHPBB3-15898</a>] - Add core.ucp_pm_compose_template</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15899">PHPBB3-15899</a>] - Add core.modify_attachment_sql_ary_on_* events</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15901">PHPBB3-15901</a>] - Add mcp_post_* template events</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15910">PHPBB3-15910</a>] - Pass object arguments by reference implicitly</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15914">PHPBB3-15914</a>] - Add core.modify_memberlist_viewprofile_group_sql and core.modify_memberlist_viewprofile_group_data</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15915">PHPBB3-15915</a>] - Add template events to posting_attach_body.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15924">PHPBB3-15924</a>] - Move from precise to trusty builds</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15926">PHPBB3-15926</a>] - Deny installs on PHP &gt;= 7.3@dev - Increase min. req. to 5.4.7</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15928">PHPBB3-15928</a>] - Remove support for backup download</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15939">PHPBB3-15939</a>] - Pagination docblocks</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15941">PHPBB3-15941</a>] - Replace MAX SQL in functions_posting.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15942">PHPBB3-15942</a>] - Array to string conversion when permanently deleting a post</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15948">PHPBB3-15948</a>] - Add core.mcp_change_topic_type_after/before</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15949">PHPBB3-15949</a>] - [Template] - ucp_profile_signature_posting_editor_options_prepend</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15950">PHPBB3-15950</a>] - Add SQL transactions to mcp_main.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15960">PHPBB3-15960</a>] - Add SQL transactions to functions_admin.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15970">PHPBB3-15970</a>] - Add core.message_admin_form_submit_before</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15972">PHPBB3-15972</a>] - Add core.markread_after</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15992">PHPBB3-15992</a>] - Fix breadcrumb schema</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15995">PHPBB3-15995</a>] - Add core.memberlist_modify_sort_pagination_params</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15997">PHPBB3-15997</a>] - Increase webdriver timeout for UI tests</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16001">PHPBB3-16001</a>] - Append data to the OAuth's redirect URL</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16009">PHPBB3-16009</a>] - Display OAuth login's buttons in a row.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16010">PHPBB3-16010</a>] - Automatically check order of events in events.md file</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16018">PHPBB3-16018</a>] - Update composer and dependencies for 3.2.6</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16020">PHPBB3-16020</a>] - Fix placement of event viewforum_body_topic_author_username_append</li>
+ </ul>
+ <h4>New Feature</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15944">PHPBB3-15944</a>] - Add core.posting_modify_quote_attributes</li>
+ </ul>
+ <h4>Task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15921">PHPBB3-15921</a>] - Update TextFormatter to 1.3.2</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15953">PHPBB3-15953</a>] - pm reported missing border color</li>
+ </ul>
+
<a name="v325rc1"></a><h3>Changes since 3.2.5-RC1</h3>
<h4>Bug</h4>
<ul>
diff --git a/phpBB/docs/CREDITS.txt b/phpBB/docs/CREDITS.txt
index 90e9a31127..596f4545fa 100644
--- a/phpBB/docs/CREDITS.txt
+++ b/phpBB/docs/CREDITS.txt
@@ -1,7 +1,7 @@
/**
*
-* phpBB © Copyright phpBB Limited 2003-2016
-* http://www.phpbb.com
+* phpBB © Copyright phpBB Limited 2003-2019
+* https://www.phpbb.com
*
* phpBB is free software. You can redistribute it and/or modify it
* under the terms of the GNU General Public License, version 2 (GPL-2.0)
@@ -27,7 +27,6 @@ phpBB Developers: bantu (Andreas Fischer)
Derky (Derk Ruitenbeek)
Elsensee (Oliver Schramm)
Hanakin (Michael Miday)
- MichaelC (Michael Cullum)
Nicofuma (Tristan Darricau)
rubencm (Rubén Calvo)
@@ -63,6 +62,7 @@ phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010]
igorw (Igor Wiedler) [08/2010 - 02/2013]
imkingdavid (David King) [11/2012 - 06/2014]
kellanved (Henry Sudhof) [04/2007 - 03/2011]
+ MichaelC (Michael Cullum) [11/2017 - 09/2019]
nickvergessen (Joas Schilling)[04/2010 - 12/2015]
Oleg (Oleg Pudeyev) [01/2011 - 05/2013]
prototech (Cesar Gallegos) [01/2014 - 12/2016]
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index fb782ee452..bfe26b4951 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -172,6 +172,18 @@ acp_group_options_before
* Since: 3.1.0-b4
* Purpose: Add additional options to group settings (before GROUP_FOUNDER_MANAGE)
+acp_group_types_append
+===
+* Location: adm/style/acp_groups.html
+* Since: 3.2.9-RC1
+* Purpose: Add additional group type options to group settings (append the list)
+
+acp_group_types_prepend
+===
+* Location: adm/style/acp_groups.html
+* Since: 3.2.9-RC1
+* Purpose: Add additional group type options to group settings (prepend the list)
+
acp_groups_find_username_append
===
* Location: adm/style/acp_groups.html
@@ -988,6 +1000,20 @@ mcp_move_before
* Since: 3.1.10-RC1
* Purpose: Add content before move topic/post form
+mcp_move_destination_forum_after
+===
+* Locations:
+ + styles/prosilver/template/mcp_move.html
+* Since: 3.2.8-RC1
+* Purpose: Add content after the destination select element in the move topic/post form
+
+mcp_move_destination_forum_before
+===
+* Locations:
+ + styles/prosilver/template/mcp_move.html
+* Since: 3.2.8-RC1
+* Purpose: Add content before the destination select element in the move topic/post form
+
mcp_post_additional_options
===
* Locations:
@@ -1037,6 +1063,20 @@ mcp_topic_options_before
* Since: 3.1.6-RC1
* Purpose: Add some options (field, checkbox, ...) before the subject field when split a subject
+mcp_topic_post_author_full_append
+===
+* Locations:
+ + styles/prosilver/template/mcp_topic.html
+* Since: 3.2.8-RC1
+* Purpose: Append information to message author username for post details in topic moderation
+
+mcp_topic_post_author_full_prepend
+===
+* Locations:
+ + styles/prosilver/template/mcp_topic.html
+* Since: 3.2.8-RC1
+* Purpose: Prepend information to message author username for post details in topic moderation
+
mcp_topic_postrow_attachments_after
===
* Locations:
@@ -1740,14 +1780,14 @@ posting_attach_body_file_list_after
* Locations:
+ styles/prosilver/template/posting_attach_body.html
* Since: 3.2.6-RC1
-* Purpose: Add content after attachments list
+* Purpose: Add content after attachments list
posting_attach_body_file_list_before
===
* Locations:
+ styles/prosilver/template/posting_attach_body.html
* Since: 3.2.6-RC1
-* Purpose: Add content before attachments list
+* Purpose: Add content before attachments list
posting_editor_add_panel_tab
===
@@ -1910,6 +1950,20 @@ posting_preview_poll_after
* Since: 3.1.7-RC1
* Purpose: Add content after the poll preview block
+posting_review_row_post_author_username_append
+===
+* Locations:
+ + styles/prosilver/template/posting_review.html
+* Since: 3.2.8-RC1
+* Purpose: Append information to post author username of member
+
+posting_review_row_post_author_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/posting_review.html
+* Since: 3.2.8-RC1
+* Purpose: Prepend information to post author username of member
+
posting_topic_review_row_content_after
===
* Locations:
@@ -1917,6 +1971,20 @@ posting_topic_review_row_content_after
* Since: 3.2.4-RC1
* Purpose: Add content after the message content in topic review
+posting_topic_review_row_post_author_username_append
+===
+* Locations:
+ + styles/prosilver/template/posting_topic_review.html
+* Since: 3.2.8-RC1
+* Purpose: Append information to post author username of member
+
+posting_topic_review_row_post_author_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/posting_topic_review.html
+* Since: 3.2.8-RC1
+* Purpose: Prepend information to post author username of member
+
posting_topic_review_row_post_details_after
===
* Locations:
@@ -2102,14 +2170,14 @@ search_results_header_before
search_results_last_post_author_username_append
===
* Locations:
- + styles/prosilver/template/search_results.html
+ + styles/prosilver/template/search_results.html (2)
* Since: 3.2.4-RC1
* Purpose: Append information to last post author username of member
search_results_last_post_author_username_prepend
===
* Locations:
- + styles/prosilver/template/search_results.html
+ + styles/prosilver/template/search_results.html (2)
* Since: 3.2.4-RC1
* Purpose: Prepend information to last post author username of member
@@ -2253,6 +2321,24 @@ topiclist_row_prepend
* Changed: 3.1.6-RC1 Added event to mcp_forum.html
* Purpose: Add content into topic rows (inside the elements containing topic titles)
+topiclist_row_topic_by_author_after
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+ + styles/prosilver/template/viewforum_body.html
+ + styles/prosilver/template/mcp_forum.html
+* Since: 3.2.8-RC1
+* Purpose: Add content into topic rows (after the "by topic author" row)
+
+topiclist_row_topic_by_author_before
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+ + styles/prosilver/template/viewforum_body.html
+ + styles/prosilver/template/mcp_forum.html
+* Since: 3.2.8-RC1
+* Purpose: Add content into topic rows (before the "by topic author" row)
+
topiclist_row_topic_title_after
===
* Locations:
@@ -2364,6 +2450,20 @@ ucp_pm_history_review_before
* Since: 3.1.6-RC1
* Purpose: Add content before the private messages history review.
+ucp_pm_history_row_message_author_username_append
+===
+* Locations:
+ + styles/prosilver/template/ucp_pm_history.html
+* Since: 3.2.8-RC1
+* Purpose: Append information to message author username of member
+
+ucp_pm_history_row_message_author_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/ucp_pm_history.html
+* Since: 3.2.8-RC1
+* Purpose: Prepend information to message author username of member
+
ucp_pm_viewmessage_avatar_after
===
* Locations:
@@ -2546,6 +2646,13 @@ ucp_profile_profile_info_before
* Since: 3.1.4-RC1
* Purpose: Add options in profile page fieldset - before jabber field.
+ucp_profile_profile_info_birthday_label_append
+===
+* Locations:
+ + styles/prosilver/template/ucp_profile_profile_info.html
+* Since: 3.2.9-RC1
+* Purpose: Add more text to birthday label, such as required asterisk
+
ucp_profile_register_details_after
===
* Locations:
@@ -2612,14 +2719,14 @@ ucp_register_profile_fields_before
viewforum_body_last_post_author_username_append
===
* Locations:
- + styles/prosilver/template/viewforum_body.html
+ + styles/prosilver/template/viewforum_body.html (2)
* Since: 3.2.4-RC1
* Purpose: Append information to last post author username of member
viewforum_body_last_post_author_username_prepend
===
* Locations:
- + styles/prosilver/template/viewforum_body.html
+ + styles/prosilver/template/viewforum_body.html (2)
* Since: 3.2.4-RC1
* Purpose: Prepend information to last post author username of member
diff --git a/phpBB/docs/nginx.sample.conf b/phpBB/docs/nginx.sample.conf
index 55c01a1fc9..c5a9472a1c 100644
--- a/phpBB/docs/nginx.sample.conf
+++ b/phpBB/docs/nginx.sample.conf
@@ -70,7 +70,7 @@ http {
}
# Deny access to internal phpbb files.
- location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb|store|vendor) {
+ location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb(?!\w+)|store|vendor) {
deny all;
# deny was ignored before 0.8.40 for connections over IPv6.
# Use internal directive to prohibit access on older versions.
@@ -93,7 +93,7 @@ http {
# Correctly pass scripts for installer
location /install/ {
# phpBB uses index.htm
- try_files $uri $uri/ @rewrite_installapp;
+ try_files $uri $uri/ @rewrite_installapp =404;
# Pass the php scripts to fastcgi server specified in upstream declaration.
location ~ \.php(/|$) {
@@ -104,7 +104,7 @@ http {
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
- try_files $uri $uri/ /install/app.php$is_args$args;
+ try_files $uri $uri/ /install/app.php$is_args$args =404;
fastcgi_pass php;
}
}
diff --git a/phpBB/docs/sphinx.sample.conf b/phpBB/docs/sphinx.sample.conf
index 85cba190d7..bf7c4a43a8 100644
--- a/phpBB/docs/sphinx.sample.conf
+++ b/phpBB/docs/sphinx.sample.conf
@@ -41,7 +41,7 @@ source source_phpbb_{SPHINX_ID}_main
}
source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main
{
- sql_query_pre =
+ sql_query_pre = SET NAMES 'utf8'
sql_query_range =
sql_range_step =
sql_query = SELECT \
@@ -61,7 +61,7 @@ source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main
WHERE \
p.topic_id = t.topic_id \
AND p.post_id >= ( SELECT max_doc_id FROM phpbb_sphinx WHERE counter_id=1 )
- sql_query_pre =
+ sql_query_post_index =
}
index index_phpbb_{SPHINX_ID}_main
{
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 5b1db5c31b..94e3660de8 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -27,6 +27,9 @@ class acp_attachments
/** @var \phpbb\config\config */
protected $config;
+ /** @var \phpbb\language\language */
+ protected $language;
+
/** @var ContainerBuilder */
protected $phpbb_container;
@@ -54,6 +57,7 @@ class acp_attachments
$this->id = $id;
$this->db = $db;
$this->config = $config;
+ $this->language = $phpbb_container->get('language');
$this->template = $template;
$this->user = $user;
$this->phpbb_container = $phpbb_container;
@@ -128,7 +132,7 @@ class acp_attachments
$s_assigned_groups = array();
while ($row = $db->sql_fetchrow($result))
{
- $row['group_name'] = (isset($user->lang['EXT_GROUP_' . $row['group_name']])) ? $user->lang['EXT_GROUP_' . $row['group_name']] : $row['group_name'];
+ $row['group_name'] = $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) : $row['group_name'];
$s_assigned_groups[$row['cat_id']][] = $row['group_name'];
}
$db->sql_freeresult($result);
@@ -573,7 +577,7 @@ class acp_attachments
$group_id = $db->sql_nextid();
}
- $group_name = (isset($user->lang['EXT_GROUP_' . $group_name])) ? $user->lang['EXT_GROUP_' . $group_name] : $group_name;
+ $group_name = $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($group_name)) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($group_name)) : $group_name;
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), false, array($group_name));
}
@@ -875,7 +879,7 @@ class acp_attachments
'U_EDIT' => $this->u_action . "&amp;action=edit&amp;g={$row['group_id']}",
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;g={$row['group_id']}",
- 'GROUP_NAME' => (isset($user->lang['EXT_GROUP_' . $row['group_name']])) ? $user->lang['EXT_GROUP_' . $row['group_name']] : $row['group_name'],
+ 'GROUP_NAME' => $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) : $row['group_name'],
'CATEGORY' => $cat_lang[$row['cat_id']],
)
);
@@ -1244,15 +1248,11 @@ class acp_attachments
'ATTACHMENT_POSTER' => get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']),
'FILESIZE' => get_formatted_filesize((int) $row['filesize']),
'FILETIME' => $user->format_date((int) $row['filetime']),
- 'REAL_FILENAME' => (!$row['in_message']) ? utf8_basename((string) $row['real_filename']) : '',
- 'PHYSICAL_FILENAME' => utf8_basename((string) $row['physical_filename']),
- 'EXT_GROUP_NAME' => (!empty($extensions[$row['extension']]['group_name'])) ? $user->lang['EXT_GROUP_' . $extensions[$row['extension']]['group_name']] : '',
+ 'REAL_FILENAME' => utf8_basename((string) $row['real_filename']),
+ 'EXT_GROUP_NAME' => $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($extensions[$row['extension']]['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($extensions[$row['extension']]['group_name'])) : $extensions[$row['extension']]['group_name'],
'COMMENT' => $comment,
'TOPIC_TITLE' => (!$row['in_message']) ? (string) $row['topic_title'] : '',
'ATTACH_ID' => (int) $row['attach_id'],
- 'POST_ID' => (int) $row['post_msg_id'],
- 'TOPIC_ID' => (int) $row['topic_id'],
- 'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? (int) $post_ids[$row['attach_id']] : '',
'L_DOWNLOAD_COUNT' => $user->lang($l_downloaded_viewed, (int) $row['download_count']),
@@ -1434,7 +1434,7 @@ class acp_attachments
$group_name = array();
while ($row = $db->sql_fetchrow($result))
{
- $row['group_name'] = (isset($user->lang['EXT_GROUP_' . $row['group_name']])) ? $user->lang['EXT_GROUP_' . $row['group_name']] : $row['group_name'];
+ $row['group_name'] = $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) : $row['group_name'];
$group_name[] = $row;
}
$db->sql_freeresult($result);
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index 1f7374a07f..bd8df6a63b 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -33,7 +33,6 @@ class acp_bbcodes
// Set up general vars
$action = $request->variable('action', '');
$bbcode_id = $request->variable('bbcode', 0);
- $submit = $request->is_set_post('submit');
$this->tpl_name = 'acp_bbcodes';
$this->page_title = 'ACP_BBCODES';
@@ -41,11 +40,6 @@ class acp_bbcodes
add_form_key($form_key);
- if ($submit && !check_form_key($form_key))
- {
- trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
// Set up mode-specific vars
switch ($action)
{
@@ -179,6 +173,12 @@ class acp_bbcodes
extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_modify_create', compact($vars)));
$warn_text = preg_match('%<[^>]*\{text[\d]*\}[^>]*>%i', $bbcode_tpl);
+
+ if (!$warn_text && !check_form_key($form_key))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
if (!$warn_text || confirm_box(true))
{
$data = $this->build_regexp($bbcode_match, $bbcode_tpl);
@@ -211,11 +211,6 @@ class acp_bbcodes
$test = $data['bbcode_tag'];
}
- if (!preg_match('%\\[' . $test . '[^]]*].*?\\[/' . $test . ']%s', $bbcode_match))
- {
- trigger_error($user->lang['BBCODE_OPEN_ENDED_TAG'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
if (strlen($data['bbcode_tag']) > 16)
{
trigger_error($user->lang['BBCODE_TAG_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index f89f5535eb..0730b4e285 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -30,10 +30,13 @@ class acp_board
function main($id, $mode)
{
- global $user, $template, $request;
+ global $user, $template, $request, $language;
global $config, $phpbb_root_path, $phpEx;
global $cache, $phpbb_container, $phpbb_dispatcher, $phpbb_log;
+ /** @var \phpbb\language\language $language Language object */
+ $language = $phpbb_container->get('language');
+
$user->add_lang('acp/board');
$submit = (isset($_POST['submit']) || isset($_POST['allow_quick_reply_enable'])) ? true : false;
@@ -56,7 +59,7 @@ class acp_board
'legend1' => 'ACP_BOARD_SETTINGS',
'sitename' => array('lang' => 'SITE_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
'site_desc' => array('lang' => 'SITE_DESC', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
- 'site_home_url' => array('lang' => 'SITE_HOME_URL', 'validate' => 'string', 'type' => 'url:40:255', 'explain' => true),
+ 'site_home_url' => array('lang' => 'SITE_HOME_URL', 'validate' => 'url', 'type' => 'url:40:255', 'explain' => true),
'site_home_text' => array('lang' => 'SITE_HOME_TEXT', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
'board_index_text' => array('lang' => 'BOARD_INDEX_TEXT', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
'board_disable' => array('lang' => 'DISABLE_BOARD', 'validate' => 'bool', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
@@ -122,6 +125,7 @@ class acp_board
$avatar_vars = array();
foreach ($avatar_drivers as $current_driver)
{
+ /** @var \phpbb\avatar\driver\driver_interface $driver */
$driver = $phpbb_avatar_manager->get_driver($current_driver, false);
/*
@@ -446,6 +450,7 @@ class acp_board
'email_enable' => array('lang' => 'ENABLE_EMAIL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'validate' => 'int:0', 'type' => 'number:0:99999', 'explain' => true),
+ 'email_max_chunk_size' => array('lang' => 'EMAIL_MAX_CHUNK_SIZE', 'validate' => 'int:1:99999', 'type' => 'number:1:99999', 'explain' => true),
'board_contact' => array('lang' => 'CONTACT_EMAIL', 'validate' => 'email', 'type' => 'email:25:100', 'explain' => true),
'board_contact_name' => array('lang' => 'CONTACT_EMAIL_NAME', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => true),
'board_email' => array('lang' => 'ADMIN_EMAIL', 'validate' => 'email', 'type' => 'email:25:100', 'explain' => true),
@@ -730,7 +735,7 @@ class acp_board
$template->assign_block_vars('options', array(
'KEY' => $config_key,
'TITLE' => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],
- 'S_EXPLAIN' => $vars['explain'],
+ 'S_EXPLAIN' => $vars['explain'] && !empty($l_explain),
'TITLE_EXPLAIN' => $l_explain,
'CONTENT' => $content,
)
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 05f2b98524..677fce7217 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -58,7 +58,6 @@ class acp_database
$type = $request->variable('type', '');
$table = array_intersect($this->db_tools->sql_list_tables(), $request->variable('table', array('')));
$format = $request->variable('method', '');
- $where = $request->variable('where', '');
if (!count($table))
{
@@ -70,12 +69,9 @@ class acp_database
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- $store = $structure = $schema_data = false;
-
- if ($where == 'store')
- {
- $store = true;
- }
+ $store = true;
+ $structure = false;
+ $schema_data = false;
if ($type == 'full' || $type == 'structure')
{
@@ -216,7 +212,7 @@ class acp_database
}
else if (confirm_box(true))
{
- switch ($backup_info['extensions'])
+ switch ($backup_info['extension'])
{
case 'sql':
$fp = fopen($backup_info['file_name'], 'rb');
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index be5a7a2f26..22c775b7c3 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -986,6 +986,23 @@ class acp_forums
$errors[] = $user->lang['FORUM_NAME_EMPTY'];
}
+ /**
+ * Replace Emojis and other 4bit UTF-8 chars not allowed by MySql to UCR / NCR.
+ * Using their Numeric Character Reference's Hexadecimal notation.
+ */
+ $forum_data_ary['forum_name'] = utf8_encode_ucr($forum_data_ary['forum_name']);
+
+ /**
+ * This should never happen again.
+ * Leaving the fallback here just in case there will be the need of it.
+ */
+ if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $forum_data_ary['forum_name'], $matches))
+ {
+ $character_list = implode('<br>', $matches[0]);
+
+ $errors[] = $user->lang('FORUM_NAME_EMOJI', $character_list);
+ }
+
if (utf8_strlen($forum_data_ary['forum_desc']) > 4000)
{
$errors[] = $user->lang['FORUM_DESC_TOO_LONG'];
@@ -1416,8 +1433,8 @@ class acp_forums
* This event may be triggered, when a forum is deleted
*
* @event core.acp_manage_forums_move_children
- * @var int from_id If of the current parent forum
- * @var int to_id If of the new parent forum
+ * @var int from_id Id of the current parent forum
+ * @var int to_id Id of the new parent forum
* @var array errors Array of errors, should be strings and not
* language key.
* @since 3.1.0-a1
@@ -1522,8 +1539,8 @@ class acp_forums
* Event when we move content from one forum to another
*
* @event core.acp_manage_forums_move_content
- * @var int from_id If of the current parent forum
- * @var int to_id If of the new parent forum
+ * @var int from_id Id of the current parent forum
+ * @var int to_id Id of the new parent forum
* @var bool sync Shall we sync the "to"-forum's data
* @var array errors Array of errors, should be strings and not
* language key. If this array is not empty,
@@ -1569,6 +1586,19 @@ class acp_forums
$db->sql_query($sql);
}
+ /**
+ * Event when content has been moved from one forum to another
+ *
+ * @event core.acp_manage_forums_move_content_after
+ * @var int from_id Id of the current parent forum
+ * @var int to_id Id of the new parent forum
+ * @var bool sync Shall we sync the "to"-forum's data
+ *
+ * @since 3.2.9-RC1
+ */
+ $vars = array('from_id', 'to_id', 'sync');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_move_content_after', compact($vars)));
+
if ($sync)
{
// Delete ghost topics that link back to the same forum then resync counters
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index 3eee4f7922..c5f7789de8 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -537,6 +537,7 @@ class acp_prune
AND ug.user_id <> ' . ANONYMOUS . '
AND u.user_type <> ' . USER_FOUNDER . '
AND ug.user_pending = 0
+ AND ug.group_leader = 0
AND u.user_id = ug.user_id
' . (!empty($user_ids) ? ' AND ' . $db->sql_in_set('ug.user_id', $user_ids) : '');
$result = $db->sql_query($sql);
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 1bf5a3c6a8..87c8d88f52 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -259,6 +259,19 @@ class acp_styles
// Get list of styles to uninstall
$ids = $this->request_vars('id', 0, true);
+ // Don't remove prosilver, you can still deactivate it.
+ $sql = 'SELECT style_id
+ FROM ' . STYLES_TABLE . "
+ WHERE style_name = '" . $this->db->sql_escape('prosilver') . "'";
+ $result = $this->db->sql_query($sql);
+ $prosilver_id = (int) $this->db->sql_fetchfield('style_id');
+ $this->db->sql_freeresult($result);
+
+ if ($prosilver_id && in_array($prosilver_id, $ids))
+ {
+ trigger_error($this->user->lang('UNINSTALL_PROSILVER') . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
// Check if confirmation box was submitted
if (confirm_box(true))
{
@@ -998,11 +1011,14 @@ class acp_styles
'L_ACTION' => $this->user->lang['EXPORT']
); */
- // Uninstall
- $actions[] = array(
- 'U_ACTION' => $this->u_action . '&amp;action=uninstall&amp;hash=' . generate_link_hash('uninstall') . '&amp;id=' . $style['style_id'],
- 'L_ACTION' => $this->user->lang['STYLE_UNINSTALL']
- );
+ if ($style['style_name'] !== 'prosilver')
+ {
+ // Uninstall
+ $actions[] = array(
+ 'U_ACTION' => $this->u_action . '&amp;action=uninstall&amp;hash=' . generate_link_hash('uninstall') . '&amp;id=' . $style['style_id'],
+ 'L_ACTION' => $this->user->lang['STYLE_UNINSTALL']
+ );
+ }
// Preview
$actions[] = array(
@@ -1123,7 +1139,14 @@ class acp_styles
*/
protected function read_style_cfg($dir)
{
+ // This should never happen, we give them a red warning because of its relevance.
+ if (!file_exists($this->styles_path . $dir . '/style.cfg'))
+ {
+ trigger_error($this->user->lang('NO_STYLE_CFG', $dir), E_USER_WARNING);
+ }
+
static $required = array('name', 'phpbb_version', 'copyright');
+
$cfg = parse_cfg_file($this->styles_path . $dir . '/style.cfg');
// Check if it is a valid file
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php
index 9124a59ef2..fa3afa6ce3 100644
--- a/phpBB/includes/acp/acp_update.php
+++ b/phpBB/includes/acp/acp_update.php
@@ -59,17 +59,19 @@ class acp_update
$update_link = $phpbb_root_path . 'install/app.' . $phpEx;
- $template->assign_vars(array(
- 'S_UP_TO_DATE' => empty($updates_available),
- 'U_ACTION' => $this->u_action,
- 'U_VERSIONCHECK_FORCE' => append_sid($this->u_action . '&amp;versioncheck_force=1'),
+ $template_ary = [
+ 'S_UP_TO_DATE' => empty($updates_available),
+ 'U_ACTION' => $this->u_action,
+ 'U_VERSIONCHECK_FORCE' => append_sid($this->u_action . '&amp;versioncheck_force=1'),
- 'CURRENT_VERSION' => $config['version'],
+ 'CURRENT_VERSION' => $config['version'],
- 'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $update_link),
+ 'UPDATE_INSTRUCTIONS' => $user->lang('UPDATE_INSTRUCTIONS', $update_link),
'S_VERSION_UPGRADEABLE' => !empty($upgrades_available),
'UPGRADE_INSTRUCTIONS' => !empty($upgrades_available) ? $user->lang('UPGRADE_INSTRUCTIONS', $upgrades_available['current'], $upgrades_available['announcement']) : false,
- ));
+ ];
+
+ $template->assign_vars($template_ary);
// Incomplete update?
if (phpbb_version_compare($config['version'], PHPBB_VERSION, '<'))
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 2d1eaadfae..fd4b5e8c24 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -855,7 +855,7 @@ class acp_users
$check_ary += array(
'username' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
- array('username', $user_row['username'])
+ array('username', $user_row['username'], true)
),
);
}
diff --git a/phpBB/includes/compatibility_globals.php b/phpBB/includes/compatibility_globals.php
index 0f403896a7..ad394e3782 100644
--- a/phpBB/includes/compatibility_globals.php
+++ b/phpBB/includes/compatibility_globals.php
@@ -29,7 +29,7 @@ function register_compatibility_globals()
{
global $phpbb_container;
- global $cache, $phpbb_dispatcher, $request, $user, $auth, $db, $config, $phpbb_log;
+ global $cache, $phpbb_dispatcher, $request, $user, $auth, $db, $config, $language, $phpbb_log;
global $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $phpbb_extension_manager, $template;
// set up caching
@@ -48,6 +48,9 @@ function register_compatibility_globals()
/* @var $user \phpbb\user */
$user = $phpbb_container->get('user');
+ /* @var \phpbb\language\language $language */
+ $language = $phpbb_container->get('language');
+
/* @var $auth \phpbb\auth\auth */
$auth = $phpbb_container->get('auth');
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index d80f348ac5..a2e7d92f7d 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.6-dev');
+@define('PHPBB_VERSION', '3.2.9-dev');
// QA-related
// define('PHPBB_QA', 1);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index e2ea7ad232..c9f589c174 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1843,27 +1843,6 @@ function redirect($url, $return = false, $disable_cd_check = false)
garbage_collection();
}
- // Redirect via an HTML form for PITA webservers
- if (@preg_match('#WebSTAR|Xitami#', getenv('SERVER_SOFTWARE')))
- {
- header('Refresh: 0; URL=' . $url);
-
- echo '<!DOCTYPE html>';
- echo '<html dir="' . $user->lang['DIRECTION'] . '" lang="' . $user->lang['USER_LANG'] . '">';
- echo '<head>';
- echo '<meta charset="utf-8">';
- echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
- echo '<meta http-equiv="refresh" content="0; url=' . str_replace('&', '&amp;', $url) . '" />';
- echo '<title>' . $user->lang['REDIRECT'] . '</title>';
- echo '</head>';
- echo '<body>';
- echo '<div style="text-align: center;">' . sprintf($user->lang['URL_REDIRECT'], '<a href="' . str_replace('&', '&amp;', $url) . '">', '</a>') . '</div>';
- echo '</body>';
- echo '</html>';
-
- exit;
- }
-
// Behave as per HTTP/1.1 spec for others
header('Location: ' . $url);
exit;
@@ -2143,25 +2122,29 @@ function check_form_key($form_name, $timespan = false)
/**
* Build Confirm box
* @param boolean $check True for checking if confirmed (without any additional parameters) and false for displaying the confirm box
-* @param string $title Title/Message used for confirm box.
+* @param string|array $title Title/Message used for confirm box.
* message text is _CONFIRM appended to title.
* If title cannot be found in user->lang a default one is displayed
* If title_CONFIRM cannot be found in user->lang the text given is used.
+* If title is an array, the first array value is used as explained per above,
+* all other array values are sent as parameters to the language function.
* @param string $hidden Hidden variables
* @param string $html_body Template used for confirm box
* @param string $u_action Custom form action
+*
+* @return bool True if confirmation was successful, false if not
*/
function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html', $u_action = '')
{
global $user, $template, $db, $request;
- global $config, $phpbb_path_helper;
+ global $config, $language, $phpbb_path_helper, $phpbb_dispatcher;
if (isset($_POST['cancel']))
{
return false;
}
- $confirm = ($user->lang['YES'] === $request->variable('confirm', '', true, \phpbb\request\request_interface::POST));
+ $confirm = ($language->lang('YES') === $request->variable('confirm', '', true, \phpbb\request\request_interface::POST));
if ($check && $confirm)
{
@@ -2195,13 +2178,27 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
// generate activation key
$confirm_key = gen_rand_string(10);
+ // generate language strings
+ if (is_array($title))
+ {
+ $key = array_shift($title);
+ $count = array_shift($title);
+ $confirm_title = $language->is_set($key) ? $language->lang($key, $count, $title) : $language->lang('CONFIRM');
+ $confirm_text = $language->is_set($key . '_CONFIRM') ? $language->lang($key . '_CONFIRM', $count, $title) : $key;
+ }
+ else
+ {
+ $confirm_title = $language->is_set($title) ? $language->lang($title) : $language->lang('CONFIRM');
+ $confirm_text = $language->is_set($title . '_CONFIRM') ? $language->lang($title . '_CONFIRM') : $title;
+ }
+
if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])
{
- adm_page_header((!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title]);
+ adm_page_header($confirm_title);
}
else
{
- page_header((!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title]);
+ page_header($confirm_title);
}
$template->set_filenames(array(
@@ -2221,10 +2218,10 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
$u_action .= ((strpos($u_action, '?') === false) ? '?' : '&amp;') . 'confirm_key=' . $confirm_key;
$template->assign_vars(array(
- 'MESSAGE_TITLE' => (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang($title, 1),
- 'MESSAGE_TEXT' => (!isset($user->lang[$title . '_CONFIRM'])) ? $title : $user->lang[$title . '_CONFIRM'],
+ 'MESSAGE_TITLE' => $confirm_title,
+ 'MESSAGE_TEXT' => $confirm_text,
- 'YES_VALUE' => $user->lang['YES'],
+ 'YES_VALUE' => $language->lang('YES'),
'S_CONFIRM_ACTION' => $u_action,
'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields,
'S_AJAX_REQUEST' => $request->is_ajax(),
@@ -2237,16 +2234,36 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
if ($request->is_ajax())
{
$u_action .= '&confirm_uid=' . $user->data['user_id'] . '&sess=' . $user->session_id . '&sid=' . $user->session_id;
- $json_response = new \phpbb\json_response;
- $json_response->send(array(
+ $data = array(
'MESSAGE_BODY' => $template->assign_display('body'),
- 'MESSAGE_TITLE' => (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title],
- 'MESSAGE_TEXT' => (!isset($user->lang[$title . '_CONFIRM'])) ? $title : $user->lang[$title . '_CONFIRM'],
+ 'MESSAGE_TITLE' => $confirm_title,
+ 'MESSAGE_TEXT' => $confirm_text,
- 'YES_VALUE' => $user->lang['YES'],
+ 'YES_VALUE' => $language->lang('YES'),
'S_CONFIRM_ACTION' => str_replace('&amp;', '&', $u_action), //inefficient, rewrite whole function
'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields
- ));
+ );
+
+ /**
+ * This event allows an extension to modify the ajax output of confirm box.
+ *
+ * @event core.confirm_box_ajax_before
+ * @var string u_action Action of the form
+ * @var array data Data to be sent
+ * @var string hidden Hidden fields generated by caller
+ * @var string s_hidden_fields Hidden fields generated by this function
+ * @since 3.2.8-RC1
+ */
+ $vars = array(
+ 'u_action',
+ 'data',
+ 'hidden',
+ 's_hidden_fields',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.confirm_box_ajax_before', compact($vars)));
+
+ $json_response = new \phpbb\json_response;
+ $json_response->send($data);
}
if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])
@@ -2257,6 +2274,8 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
{
page_footer();
}
+
+ exit; // unreachable, page_footer() above will call exit()
}
/**
@@ -2268,6 +2287,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
global $request, $phpbb_container, $phpbb_dispatcher, $phpbb_log;
$err = '';
+ $form_name = 'login';
// Make sure user->setup() has been called
if (!$user->is_setup())
@@ -2343,8 +2363,19 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
trigger_error('NO_AUTH_ADMIN_USER_DIFFER');
}
- // If authentication is successful we redirect user to previous page
- $result = $auth->login($username, $password, $autologin, $viewonline, $admin);
+ // Check form key
+ if ($password && !defined('IN_CHECK_BAN') && !check_form_key($form_name))
+ {
+ $result = array(
+ 'status' => false,
+ 'error_msg' => 'FORM_INVALID',
+ );
+ }
+ else
+ {
+ // If authentication is successful we redirect user to previous page
+ $result = $auth->login($username, $password, $autologin, $viewonline, $admin);
+ }
// If admin authentication and login, we will log if it was a success or not...
// We also break the operation on the first non-success login - it could be argued that the user already knows
@@ -4094,9 +4125,9 @@ function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config =
*
* @return string Avatar html
*/
-function phpbb_get_group_avatar($user_row, $alt = 'GROUP_AVATAR', $ignore_config = false, $lazy = false)
+function phpbb_get_group_avatar($group_row, $alt = 'GROUP_AVATAR', $ignore_config = false, $lazy = false)
{
- $row = \phpbb\avatar\manager::clean_row($user_row, 'group');
+ $row = \phpbb\avatar\manager::clean_row($group_row, 'group');
return phpbb_get_avatar($row, $alt, $ignore_config, $lazy);
}
@@ -4401,6 +4432,23 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
$controller_helper = $phpbb_container->get('controller.helper');
$notification_mark_hash = generate_link_hash('mark_all_notifications_read');
+ $s_login_redirect = build_hidden_fields(array('redirect' => $phpbb_path_helper->remove_web_root_path(build_url())));
+
+ // Add form token for login box, in case page is presenting a login form.
+ add_form_key('login', '_LOGIN');
+
+ /**
+ * Workaround for missing template variable in pre phpBB 3.2.6 styles.
+ * @deprecated 3.2.7 (To be removed: 3.3.0-a1)
+ */
+ $form_token_login = $template->retrieve_var('S_FORM_TOKEN_LOGIN');
+ if (!empty($form_token_login))
+ {
+ $s_login_redirect .= $form_token_login;
+ // Remove S_FORM_TOKEN_LOGIN as it's already appended to S_LOGIN_REDIRECT
+ $template->assign_var('S_FORM_TOKEN_LOGIN', '');
+ }
+
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
'SITENAME' => $config['sitename'],
@@ -4490,7 +4538,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'S_TOPIC_ID' => $topic_id,
'S_LOGIN_ACTION' => ((!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("{$phpbb_admin_path}index.$phpEx", false, true, $user->session_id)),
- 'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => $phpbb_path_helper->remove_web_root_path(build_url()))),
+ 'S_LOGIN_REDIRECT' => $s_login_redirect,
'S_ENABLE_FEEDS' => ($config['feed_enable']) ? true : false,
'S_ENABLE_FEEDS_OVERALL' => ($config['feed_overall']) ? true : false,
@@ -4541,12 +4589,13 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
if ($send_headers)
{
- // An array of http headers that phpbb will set. The following event may override these.
+ // An array of http headers that phpBB will set. The following event may override these.
$http_headers += array(
// application/xhtml+xml not used because of IE
'Content-type' => 'text/html; charset=UTF-8',
'Cache-Control' => 'private, no-cache="set-cookie"',
'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
+ 'Referrer-Policy' => 'strict-origin-when-cross-origin',
);
if (!empty($user->data['is_bot']))
{
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php
index 9b7491305c..a2014a7d5b 100644
--- a/phpBB/includes/functions_acp.php
+++ b/phpBB/includes/functions_acp.php
@@ -112,12 +112,13 @@ function adm_page_header($page_title)
'CONTAINER_EXCEPTION' => $phpbb_container->hasParameter('container_exception') ? $phpbb_container->getParameter('container_exception') : false,
));
- // An array of http headers that phpbb will set. The following event may override these.
+ // An array of http headers that phpBB will set. The following event may override these.
$http_headers = array(
// application/xhtml+xml not used because of IE
'Content-type' => 'text/html; charset=UTF-8',
'Cache-Control' => 'private, no-cache="set-cookie"',
'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
+ 'Referrer-Policy' => 'strict-origin-when-cross-origin',
);
/**
@@ -419,7 +420,7 @@ function build_cfg_template($tpl_type, $key, &$new_ary, $config_key, $vars)
*/
function validate_config_vars($config_vars, &$cfg_array, &$error)
{
- global $phpbb_root_path, $user, $phpbb_dispatcher, $phpbb_filesystem;
+ global $phpbb_root_path, $user, $phpbb_dispatcher, $phpbb_filesystem, $language;
$type = 0;
$min = 1;
@@ -442,6 +443,16 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
// Validate a bit. ;) (0 = type, 1 = min, 2= max)
switch ($validator[$type])
{
+ case 'url':
+ $cfg_array[$config_name] = trim($cfg_array[$config_name]);
+
+ if (!empty($cfg_array[$config_name]) && !preg_match('#^' . get_preg_expression('url') . '$#iu', $cfg_array[$config_name]))
+ {
+ $error[] = $language->lang('URL_INVALID', $language->lang($config_definition['lang']));
+ }
+
+ // no break here
+
case 'string':
$length = utf8_strlen($cfg_array[$config_name]);
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index c19d48b0be..cc82fdbda3 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -543,6 +543,20 @@ function move_topics($topic_ids, $forum_id, $auto_sync = true)
$topic_ids = array($topic_ids);
}
+ /**
+ * Perform additional actions before topics move
+ *
+ * @event core.move_topics_before
+ * @var array topic_ids Array of the moved topic ids
+ * @var string forum_id The forum id from where the topics are moved
+ * @since 3.2.9-RC1
+ */
+ $vars = array(
+ 'topic_ids',
+ 'forum_id',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.move_topics_before', compact($vars)));
+
$sql = 'DELETE FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('topic_moved_id', $topic_ids) . '
AND forum_id = ' . $forum_id;
@@ -593,6 +607,22 @@ function move_topics($topic_ids, $forum_id, $auto_sync = true)
}
unset($table_ary);
+ /**
+ * Perform additional actions after topics move
+ *
+ * @event core.move_topics_after
+ * @var array topic_ids Array of the moved topic ids
+ * @var string forum_id The forum id from where the topics were moved
+ * @var array forum_ids Array of the forums where the topics were moved (includes also forum_id)
+ * @since 3.2.9-RC1
+ */
+ $vars = array(
+ 'topic_ids',
+ 'forum_id',
+ 'forum_ids',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.move_topics_after', compact($vars)));
+
if ($auto_sync)
{
sync('forum', 'forum_id', $forum_ids, true, true);
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index a15a03f966..2542be5e02 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -1482,6 +1482,8 @@ function truncate_string($string, $max_length = 60, $max_store_length = 255, $al
* Get username details for placing into templates.
* This function caches all modes on first call, except for no_profile and anonymous user - determined by $user_id.
*
+* @html Username spans and links
+*
* @param string $mode Can be profile (for getting an url to the profile), username (for obtaining the username), colour (for obtaining the user colour), full (for obtaining a html string representing a coloured link to the users profile) or no_profile (the same as full but forcing no profile link)
* @param int $user_id The users id
* @param string $username The users name
@@ -1501,6 +1503,7 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
{
global $phpbb_root_path, $phpEx;
+ /** @html Username spans and links for usage in the template */
$_profile_cache['base_url'] = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u={USER_ID}');
$_profile_cache['tpl_noprofile'] = '<span class="username">{USERNAME}</span>';
$_profile_cache['tpl_noprofile_colour'] = '<span style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</span>';
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 792467019f..e4adce14fc 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -70,7 +70,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$data = array(
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
- 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time()) : '',
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time(), false) : '',
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']
);
@@ -355,7 +355,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$data = array(
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
- 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums&mark_time=' . time()) : '',
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums&mark_time=' . time(), false) : '',
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']
);
@@ -539,7 +539,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
{
if ($row['forum_password_last_post'] === '' && $auth->acl_gets('f_read', 'f_list_topics', $row['forum_id_last_post']))
{
- $last_post_subject = censor_text($row['forum_last_post_subject']);
+ $last_post_subject = utf8_decode_ncr(censor_text($row['forum_last_post_subject']));
+
$last_post_subject_truncated = truncate_string($last_post_subject, 30, 255, false, $user->lang['ELLIPSIS']);
}
else
@@ -547,11 +548,12 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$last_post_subject = $last_post_subject_truncated = '';
}
$last_post_time = $user->format_date($row['forum_last_post_time']);
+ $last_post_time_rfc3339 = gmdate(DATE_RFC3339, $row['forum_last_post_time']);
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
}
else
{
- $last_post_subject = $last_post_time = $last_post_url = $last_post_subject_truncated = '';
+ $last_post_subject = $last_post_time = $last_post_time_rfc3339 = $last_post_url = $last_post_subject_truncated = '';
}
// Output moderator listing ... if applicable
@@ -622,6 +624,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'LAST_POST_SUBJECT' => $last_post_subject,
'LAST_POST_SUBJECT_TRUNCATED' => $last_post_subject_truncated,
'LAST_POST_TIME' => $last_post_time,
+ 'LAST_POST_TIME_RFC3339'=> $last_post_time_rfc3339,
'LAST_POSTER' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'LAST_POSTER_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'LAST_POSTER_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
@@ -1117,7 +1120,6 @@ function display_custom_bbcodes()
'BBCODE_TAG' => $row['bbcode_tag'],
'BBCODE_TAG_CLEAN' => str_replace('=', '-', $row['bbcode_tag']),
'BBCODE_HELPLINE' => $row['bbcode_helpline'],
- 'A_BBCODE_HELPLINE' => str_replace(array('&amp;', '&quot;', "'", '&lt;', '&gt;'), array('&', '"', "\'", '<', '>'), $row['bbcode_helpline']),
);
/**
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index 7be12baa13..1f409be58c 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -196,7 +196,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
}
// Now the tricky part... let's dance
- header('Cache-Control: public');
+ header('Cache-Control: private');
// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
header('Content-Type: ' . $attachment['mimetype']);
@@ -451,7 +451,7 @@ function set_modified_headers($stamp, $browser)
{
send_status_line(304, 'Not Modified');
// seems that we need those too ... browsers
- header('Cache-Control: public');
+ header('Cache-Control: private');
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');
return true;
}
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 4f0d40031d..ec297b536a 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -181,10 +181,9 @@ class messenger
/**
* Adds X-AntiAbuse headers
*
- * @param array $config Configuration array
- * @param user $user A user object
- *
- * @return null
+ * @param \phpbb\config\config $config Config object
+ * @param \phpbb\user $user User object
+ * @return void
*/
function anti_abuse_headers($config, $user)
{
@@ -1582,6 +1581,14 @@ class smtp_class
*/
protected function starttls()
{
+ global $config;
+
+ // allow SMTPS (what was used by phpBB 3.0) if hostname is prefixed with tls:// or ssl://
+ if (strpos($config['smtp_host'], 'tls://') === 0 || strpos($config['smtp_host'], 'ssl://') === 0)
+ {
+ return true;
+ }
+
if (!function_exists('stream_socket_enable_crypto'))
{
return false;
@@ -1604,7 +1611,9 @@ class smtp_class
if (socket_set_blocking($this->socket, 1))
{
- $result = stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
+ // https://secure.php.net/manual/en/function.stream-socket-enable-crypto.php#119122
+ $crypto = (phpbb_version_compare(PHP_VERSION, '5.6.7', '<')) ? STREAM_CRYPTO_METHOD_TLS_CLIENT : STREAM_CRYPTO_METHOD_SSLv23_CLIENT;
+ $result = stream_socket_enable_crypto($this->socket, true, $crypto);
socket_set_blocking($this->socket, (int) $stream_meta['blocked']);
}
@@ -1884,14 +1893,21 @@ function mail_encode($str, $eol = "\r\n")
}
/**
-* Wrapper for sending out emails with the PHP's mail function
-*/
+ * Wrapper for sending out emails with the PHP's mail function
+ */
function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
{
global $config, $phpbb_root_path, $phpEx;
- // We use the EOL character for the OS here because the PHP mail function does not correctly transform line endings. On Windows SMTP is used (SMTP is \r\n), on UNIX a command is used...
- // Reference: http://bugs.php.net/bug.php?id=15841
+ // Convert Numeric Character References to UTF-8 chars (ie. Emojis)
+ $subject = utf8_decode_ncr($subject);
+ $msg = utf8_decode_ncr($msg);
+
+ /**
+ * We use the EOL character for the OS here because the PHP mail function does not correctly transform line endings.
+ * On Windows SMTP is used (SMTP is \r\n), on UNIX a command is used...
+ * Reference: http://bugs.php.net/bug.php?id=15841
+ */
$headers = implode($eol, $headers);
if (!class_exists('\phpbb\error_collector'))
@@ -1902,10 +1918,14 @@ function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
$collector = new \phpbb\error_collector;
$collector->install();
- // On some PHP Versions mail() *may* fail if there are newlines within the subject.
- // Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
- // Because PHP can't decide what is wanted we revert back to the non-RFC-compliant way of separating by one space (Use '' as parameter to mail_encode() results in SPACE used)
+ /**
+ * On some PHP Versions mail() *may* fail if there are newlines within the subject.
+ * Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
+ * Because PHP can't decide what is wanted we revert back to the non-RFC-compliant way of separating by one space
+ * (Use '' as parameter to mail_encode() results in SPACE used)
+ */
$additional_parameters = $config['email_force_sender'] ? '-f' . $config['board_email'] : '';
+
$result = mail($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers, $additional_parameters);
$collector->uninstall();
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 3640f543d9..1956f65666 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -52,9 +52,29 @@ function generate_smilies($mode, $forum_id)
page_header($user->lang['SMILIES']);
- $sql = 'SELECT COUNT(smiley_id) AS item_count
- FROM ' . SMILIES_TABLE . '
- GROUP BY smiley_url';
+ $sql_ary = [
+ 'SELECT' => 'COUNT(s.smiley_id) AS item_count',
+ 'FROM' => [
+ SMILIES_TABLE => 's',
+ ],
+ 'GROUP_BY' => 's.smiley_url',
+ ];
+
+ /**
+ * Modify SQL query that fetches the total number of smilies in window mode
+ *
+ * @event core.generate_smilies_count_sql_before
+ * @var int forum_id Forum where smilies are generated
+ * @var array sql_ary Array with the SQL query
+ * @since 3.2.9-RC1
+ */
+ $vars = [
+ 'forum_id',
+ 'sql_ary',
+ ];
+ extract($phpbb_dispatcher->trigger_event('core.generate_smilies_count_sql_before', compact($vars)));
+
+ $sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql, 3600);
$smiley_count = 0;
@@ -114,6 +134,22 @@ function generate_smilies($mode, $forum_id)
}
$db->sql_freeresult($result);
+ /**
+ * Modify smilies before they are assigned to the template
+ *
+ * @event core.generate_smilies_modify_rowset
+ * @var string mode Smiley mode, either window or inline
+ * @var int forum_id Forum where smilies are generated
+ * @var array smilies Smiley rows fetched from the database
+ * @since 3.2.9-RC1
+ */
+ $vars = [
+ 'mode',
+ 'forum_id',
+ 'smilies',
+ ];
+ extract($phpbb_dispatcher->trigger_event('core.generate_smilies_modify_rowset', compact($vars)));
+
if (count($smilies))
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();
@@ -978,6 +1014,30 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
AND u.user_id = p.poster_id',
);
+ /**
+ * Event to modify the SQL query for topic reviews
+ *
+ * @event core.topic_review_modify_sql_ary
+ * @var int topic_id The topic ID that is being reviewed
+ * @var int forum_id The topic's forum ID
+ * @var string mode The topic review mode
+ * @var int cur_post_id Post offset ID
+ * @var bool show_quote_button Flag indicating if the quote button should be displayed
+ * @var array post_list Array with the post IDs
+ * @var array sql_ary Array with the SQL query
+ * @since 3.2.8-RC1
+ */
+ $vars = array(
+ 'topic_id',
+ 'forum_id',
+ 'mode',
+ 'cur_post_id',
+ 'show_quote_button',
+ 'post_list',
+ 'sql_ary',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.topic_review_modify_sql_ary', compact($vars)));
+
$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
@@ -1284,6 +1344,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
delete_topics('topic_id', array($topic_id), false);
$phpbb_content_visibility->remove_topic_from_statistic($data, $sql_data);
+ $config->increment('num_posts', -1, false);
$update_sql = update_post_information('forum', $forum_id, true);
if (count($update_sql))
@@ -2054,6 +2115,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
continue;
}
+ if (preg_match('/[\x{10000}-\x{10FFFF}]/u', $attach_row['attach_comment']))
+ {
+ trigger_error('ATTACH_COMMENT_NO_EMOJIS');
+ }
+
if (!$attach_row['is_orphan'])
{
// update entry in db if attachment already stored in db and filespace
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 444bf2c7e0..f07512d623 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -490,7 +490,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
'bcc' => explode(':', $row['bcc_address']),
'friend' => (isset($zebra[$row['author_id']])) ? $zebra[$row['author_id']]['friend'] : 0,
'foe' => (isset($zebra[$row['author_id']])) ? $zebra[$row['author_id']]['foe'] : 0,
- 'user_in_group' => array($user->data['group_id']),
+ 'user_in_group' => $user->data['group_id'],
'author_in_group' => array())
);
@@ -1966,7 +1966,7 @@ function submit_pm($mode, $subject, &$data_ary, $put_in_outbox = true)
*/
function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode = false)
{
- global $db, $user, $template, $phpbb_root_path, $phpEx, $auth;
+ global $db, $user, $template, $phpbb_root_path, $phpEx, $auth, $phpbb_dispatcher;
// Select all receipts and the author from the pm we currently view, to only display their pm-history
$sql = 'SELECT author_id, user_id
@@ -1985,9 +1985,7 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
$recipients = array_unique($recipients);
// Get History Messages (could be newer)
- $sql = 'SELECT t.*, p.*, u.*
- FROM ' . PRIVMSGS_TABLE . ' p, ' . PRIVMSGS_TO_TABLE . ' t, ' . USERS_TABLE . ' u
- WHERE t.msg_id = p.msg_id
+ $sql_where = 't.msg_id = p.msg_id
AND p.author_id = u.user_id
AND t.folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ')
AND ' . $db->sql_in_set('t.author_id', $recipients, false, true) . "
@@ -1998,13 +1996,37 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
if (!$message_row['root_level'])
{
- $sql .= " AND (p.root_level = $msg_id OR (p.root_level = 0 AND p.msg_id = $msg_id))";
+ $sql_where .= " AND (p.root_level = $msg_id OR (p.root_level = 0 AND p.msg_id = $msg_id))";
}
else
{
- $sql .= " AND (p.root_level = " . $message_row['root_level'] . ' OR p.msg_id = ' . $message_row['root_level'] . ')';
+ $sql_where .= " AND (p.root_level = " . $message_row['root_level'] . ' OR p.msg_id = ' . $message_row['root_level'] . ')';
}
- $sql .= ' ORDER BY p.message_time DESC';
+
+ $sql_ary = array(
+ 'SELECT' => 't.*, p.*, u.*',
+ 'FROM' => array(
+ PRIVMSGS_TABLE => 'p',
+ PRIVMSGS_TO_TABLE => 't',
+ USERS_TABLE => 'u'
+ ),
+ 'LEFT_JOIN' => array(),
+ 'WHERE' => $sql_where,
+ 'ORDER_BY' => 'p.message_time DESC',
+ );
+
+ /**
+ * Event to modify the SQL query before the message history in private message is queried
+ *
+ * @event core.message_history_modify_sql_ary
+ * @var array sql_ary The SQL array to get the data of the message history in private message
+ * @since 3.2.8-RC1
+ */
+ $vars = array('sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.message_history_modify_sql_ary', compact($vars)));
+
+ $sql = $db->sql_build_query('SELECT', $sql_ary);
+ unset($sql_ary);
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
@@ -2087,7 +2109,7 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
$previous_history_pm = $prev_id;
}
- $template->assign_block_vars('history_row', array(
+ $template_vars = array(
'MESSAGE_AUTHOR_QUOTE' => (($decoded_message) ? addslashes(get_username_string('username', $author_id, $row['username'], $row['user_colour'], $row['username'])) : ''),
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $row['username'], $row['user_colour'], $row['username']),
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $row['username'], $row['user_colour'], $row['username']),
@@ -2109,8 +2131,25 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
'USER_ID' => $row['user_id'],
'U_VIEW_MESSAGE' => "$url&amp;f=$folder_id&amp;p=" . $row['msg_id'],
'U_QUOTE' => (!$in_post_mode && $auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=quote&amp;f=" . $folder_id . "&amp;p=" . $row['msg_id'] : '',
- 'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $author_id != ANONYMOUS && $auth->acl_get('u_sendpm')) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $row['msg_id'] : '')
+ 'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $author_id != ANONYMOUS && $auth->acl_get('u_sendpm')) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $row['msg_id'] : ''
+ );
+
+ /**
+ * Modify the template vars for displaying the message history in private message
+ *
+ * @event core.message_history_modify_template_vars
+ * @var array template_vars Array containing the query
+ * @var array row Array containing the action user row
+ * @since 3.2.8-RC1
+ */
+ $vars = array(
+ 'template_vars',
+ 'row',
);
+ extract($phpbb_dispatcher->trigger_event('core.message_history_modify_template_vars', compact($vars)));
+
+ $template->assign_block_vars('history_row', $template_vars);
+
unset($rowset[$i]);
$prev_id = $id;
}
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index d86470adf9..e0b6a9d0c6 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -1732,7 +1732,7 @@ function phpbb_validate_timezone($timezone)
* @return mixed Either false if validation succeeded or a string which will be
* used as the error message (with the variable name appended)
*/
-function validate_username($username, $allowed_username = false)
+function validate_username($username, $allowed_username = false, $allow_all_names = false)
{
global $config, $db, $user, $cache;
@@ -1815,13 +1815,16 @@ function validate_username($username, $allowed_username = false)
return 'USERNAME_TAKEN';
}
- $bad_usernames = $cache->obtain_disallowed_usernames();
-
- foreach ($bad_usernames as $bad_username)
+ if (!$allow_all_names)
{
- if (preg_match('#^' . $bad_username . '$#', $clean_username))
+ $bad_usernames = $cache->obtain_disallowed_usernames();
+
+ foreach ($bad_usernames as $bad_username)
{
- return 'USERNAME_DISALLOWED';
+ if (preg_match('#^' . $bad_username . '$#', $clean_username))
+ {
+ return 'USERNAME_DISALLOWED';
+ }
}
}
@@ -1942,9 +1945,10 @@ function validate_user_email($email, $allowed_email = false)
return $validate_email;
}
- if (($ban_reason = $user->check_ban(false, false, $email, true)) !== false)
+ $ban = $user->check_ban(false, false, $email, true);
+ if (!empty($ban))
{
- return ($ban_reason === true) ? 'EMAIL_BANNED' : $ban_reason;
+ return !empty($ban['ban_give_reason']) ? $ban['ban_give_reason'] : 'EMAIL_BANNED';
}
if (!$config['allow_emailreuse'])
diff --git a/phpBB/includes/mcp/mcp_ban.php b/phpBB/includes/mcp/mcp_ban.php
index 8797f06db8..6f748f5433 100644
--- a/phpBB/includes/mcp/mcp_ban.php
+++ b/phpBB/includes/mcp/mcp_ban.php
@@ -269,7 +269,7 @@ class mcp_ban
}
else if ($post_id)
{
- $post_info = phpbb_get_post_data($post_id, 'm_ban');
+ $post_info = phpbb_get_post_data(array($post_id), 'm_ban');
if (count($post_info) && !empty($post_info[$post_id]))
{
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 065e9bba12..744eaebd7d 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -41,6 +41,22 @@ class mcp_main
$quickmod = ($mode == 'quickmod') ? true : false;
+ /**
+ * Event to perform additional actions before an MCP action is executed.
+ *
+ * @event core.mcp_main_before
+ * @var string action The action that is about to be performed
+ * @var string mode The mode in which the MCP is accessed, e.g. front, forum_view, topic_view, post_details, quickmod
+ * @var boolean quickmod Whether or not the action is performed via QuickMod
+ * @since 3.2.8-RC1
+ */
+ $vars = [
+ 'action',
+ 'mode',
+ 'quickmod',
+ ];
+ extract($phpbb_dispatcher->trigger_event('core.mcp_main_before', compact($vars)));
+
switch ($action)
{
case 'lock':
@@ -378,7 +394,7 @@ function lock_unlock($action, $ids)
*/
function change_topic_type($action, $topic_ids)
{
- global $user, $db, $request, $phpbb_log;
+ global $user, $db, $request, $phpbb_log, $phpbb_dispatcher;
switch ($action)
{
@@ -974,10 +990,11 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
'DELETE_TOPIC_PERMANENTLY_EXPLAIN' => $user->lang('DELETE_TOPIC_PERMANENTLY', count($topic_ids)),
));
- $l_confirm = (count($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS';
+ $count = count($topic_ids);
+ $l_confirm = $count === 1 ? 'DELETE_TOPIC' : 'DELETE_TOPICS';
if ($only_softdeleted)
{
- $l_confirm .= '_PERMANENTLY';
+ $l_confirm = array($l_confirm . '_PERMANENTLY', $count);
$s_hidden_fields['delete_permanent'] = '1';
}
else if ($only_shadow || !$auth->acl_get('m_softdelete', $forum_id))
@@ -1228,10 +1245,11 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
'DELETE_POST_PERMANENTLY_EXPLAIN' => $user->lang('DELETE_POST_PERMANENTLY', count($post_ids)),
));
- $l_confirm = (count($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS';
+ $count = count($post_ids);
+ $l_confirm = $count === 1 ? 'DELETE_POST' : 'DELETE_POSTS';
if ($only_softdeleted)
{
- $l_confirm .= '_PERMANENTLY';
+ $l_confirm = array($l_confirm . '_PERMANENTLY', $count);
$s_hidden_fields['delete_permanent'] = '1';
}
else if (!$auth->acl_get('m_softdelete', $forum_id))
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 68a65aafdd..83ad56f3e4 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -142,14 +142,36 @@ function mcp_topic_view($id, $mode, $action)
}
$start = $pagination->validate_start($start, $posts_per_page, $total);
- $sql = 'SELECT u.username, u.username_clean, u.user_colour, p.*
- FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
- WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . '
+ $sql_where = (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . '
p.topic_id = ' . $topic_id . '
AND ' . $phpbb_content_visibility->get_visibility_sql('post', $topic_info['forum_id'], 'p.') . '
AND p.poster_id = u.user_id ' .
- $limit_time_sql . '
- ORDER BY ' . $sort_order_sql;
+ $limit_time_sql;
+
+ $sql_ary = array(
+ 'SELECT' => 'u.username, u.username_clean, u.user_colour, p.*',
+ 'FROM' => array(
+ POSTS_TABLE => 'p',
+ USERS_TABLE => 'u'
+ ),
+ 'LEFT_JOIN' => array(),
+ 'WHERE' => $sql_where,
+ 'ORDER_BY' => $sort_order_sql,
+ );
+
+ /**
+ * Event to modify the SQL query before the MCP topic review posts is queried
+ *
+ * @event core.mcp_topic_modify_sql_ary
+ * @var array sql_ary The SQL array to get the data of the MCP topic review posts
+ * @since 3.2.8-RC1
+ */
+ $vars = array('sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.mcp_topic_modify_sql_ary', compact($vars)));
+
+ $sql = $db->sql_build_query('SELECT', $sql_ary);
+ unset($sql_ary);
+
$result = $db->sql_query_limit($sql, $posts_per_page, $start);
$rowset = $post_id_list = array();
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 0b79cca864..e1c28223dc 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1525,6 +1525,35 @@ class parse_message extends bbcode_firstpass
}
/**
+ * Check attachment form token depending on submit type
+ *
+ * @param \phpbb\language\language $language Language
+ * @param \phpbb\request\request_interface $request Request
+ * @param string $form_name Form name for checking form key
+ *
+ * @return bool True if form token is not needed or valid, false if needed and invalid
+ */
+ function check_attachment_form_token(\phpbb\language\language $language, \phpbb\request\request_interface $request, $form_name)
+ {
+ $add_file = $request->is_set_post('add_file');
+ $delete_file = $request->is_set_post('delete_file');
+
+ if (($add_file || $delete_file) && !check_form_key($form_name))
+ {
+ $this->warn_msg[] = $language->lang('FORM_INVALID');
+
+ if ($request->is_ajax() && $this->plupload)
+ {
+ $this->plupload->emit_error(-400, 'FORM_INVALID');
+ }
+
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
* Parse Attachments
*/
function parse_attachments($form_name, $mode, $forum_id, $submit, $preview, $refresh, $is_message = false)
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php
index c1b623cd71..7808fed325 100644
--- a/phpBB/includes/ucp/ucp_attachments.php
+++ b/phpBB/includes/ucp/ucp_attachments.php
@@ -29,7 +29,7 @@ class ucp_attachments
function main($id, $mode)
{
- global $template, $user, $db, $config, $phpEx, $phpbb_root_path, $phpbb_container, $request;
+ global $template, $user, $db, $config, $phpEx, $phpbb_root_path, $phpbb_container, $request, $auth;
$start = $request->variable('start', 0);
$sort_key = $request->variable('sk', 'a');
@@ -41,16 +41,27 @@ class ucp_attachments
if ($delete && count($delete_ids))
{
// Validate $delete_ids...
- $sql = 'SELECT attach_id
- FROM ' . ATTACHMENTS_TABLE . '
- WHERE poster_id = ' . $user->data['user_id'] . '
- AND is_orphan = 0
- AND ' . $db->sql_in_set('attach_id', $delete_ids);
+ $sql = 'SELECT a.attach_id, p.post_edit_locked, t.topic_status, f.forum_id, f.forum_status
+ FROM ' . ATTACHMENTS_TABLE . ' a
+ LEFT JOIN ' . POSTS_TABLE . ' p
+ ON (a.post_msg_id = p.post_id AND a.in_message = 0)
+ LEFT JOIN ' . TOPICS_TABLE . ' t
+ ON (t.topic_id = p.topic_id AND a.in_message = 0)
+ LEFT JOIN ' . FORUMS_TABLE . ' f
+ ON (f.forum_id = t.forum_id AND a.in_message = 0)
+ WHERE a.poster_id = ' . $user->data['user_id'] . '
+ AND a.is_orphan = 0
+ AND ' . $db->sql_in_set('a.attach_id', $delete_ids);
$result = $db->sql_query($sql);
$delete_ids = array();
while ($row = $db->sql_fetchrow($result))
{
+ if (!$auth->acl_get('m_edit', $row['forum_id']) && ($row['forum_status'] == ITEM_LOCKED || $row['topic_status'] == ITEM_LOCKED || $row['post_edit_locked']))
+ {
+ continue;
+ }
+
$delete_ids[] = $row['attach_id'];
}
$db->sql_freeresult($result);
@@ -124,10 +135,12 @@ class ucp_attachments
$pagination = $phpbb_container->get('pagination');
$start = $pagination->validate_start($start, $config['topics_per_page'], $num_attachments);
- $sql = 'SELECT a.*, t.topic_title, p.message_subject as message_title
+ $sql = 'SELECT a.*, t.topic_title, pr.message_subject as message_title, p.post_edit_locked, t.topic_status, f.forum_id, f.forum_status
FROM ' . ATTACHMENTS_TABLE . ' a
+ LEFT JOIN ' . POSTS_TABLE . ' p ON (a.post_msg_id = p.post_id AND a.in_message = 0)
LEFT JOIN ' . TOPICS_TABLE . ' t ON (a.topic_id = t.topic_id AND a.in_message = 0)
- LEFT JOIN ' . PRIVMSGS_TABLE . ' p ON (a.post_msg_id = p.msg_id AND a.in_message = 1)
+ LEFT JOIN ' . FORUMS_TABLE . ' f ON (f.forum_id = t.forum_id AND a.in_message = 0)
+ LEFT JOIN ' . PRIVMSGS_TABLE . ' pr ON (a.post_msg_id = pr.msg_id AND a.in_message = 1)
WHERE a.poster_id = ' . $user->data['user_id'] . "
AND a.is_orphan = 0
ORDER BY $order_by";
@@ -164,6 +177,7 @@ class ucp_attachments
'TOPIC_ID' => $row['topic_id'],
'S_IN_MESSAGE' => $row['in_message'],
+ 'S_LOCKED' => !$row['in_message'] && !$auth->acl_get('m_edit', $row['forum_id']) && ($row['forum_status'] == ITEM_LOCKED || $row['topic_status'] == ITEM_LOCKED || $row['post_edit_locked']),
'U_VIEW_ATTACHMENT' => append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $row['attach_id']),
'U_VIEW_TOPIC' => $view_topic)
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 543db4f889..87a8c91fd2 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -26,7 +26,7 @@ if (!defined('IN_PHPBB'))
function compose_pm($id, $mode, $action, $user_folders = array())
{
global $template, $db, $auth, $user, $cache;
- global $phpbb_root_path, $phpEx, $config;
+ global $phpbb_root_path, $phpEx, $config, $language;
global $request, $phpbb_dispatcher, $phpbb_container;
// Damn php and globals - i know, this is horrible
@@ -799,7 +799,10 @@ function compose_pm($id, $mode, $action, $user_folders = array())
extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_modify_parse_before', compact($vars)));
// Parse Attachments - before checksum is calculated
- $message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true);
+ if ($message_parser->check_attachment_form_token($language, $request, 'ucp_pm_compose'))
+ {
+ $message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true);
+ }
if (count($message_parser->warn_msg) && !($remove_u || $remove_g || $add_to || $add_bcc))
{
@@ -996,7 +999,10 @@ function compose_pm($id, $mode, $action, $user_folders = array())
{
$quote_attributes['post_id'] = $post['msg_id'];
}
-
+ if ($action === 'quote')
+ {
+ $quote_attributes['msg_id'] = $post['msg_id'];
+ }
/** @var \phpbb\language\language $language */
$language = $phpbb_container->get('language');
/** @var \phpbb\textformatter\utils_interface $text_formatter_utils */
@@ -1007,6 +1013,16 @@ function compose_pm($id, $mode, $action, $user_folders = array())
if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh)
{
$message_subject = ((!preg_match('/^Re:/', $message_subject)) ? 'Re: ' : '') . censor_text($message_subject);
+
+ /**
+ * This event allows you to modify the PM subject of the PM being quoted
+ *
+ * @event core.pm_modify_message_subject
+ * @var string message_subject String with the PM subject already censored.
+ * @since 3.2.8-RC1
+ */
+ $vars = array('message_subject');
+ extract($phpbb_dispatcher->trigger_event('core.pm_modify_message_subject', compact($vars)));
}
if ($action == 'forward' && !$preview && !$refresh && !$submit)
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index a0b535d683..09e7bf4d7c 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -138,9 +138,9 @@ function view_folder($id, $mode, $folder_id, $folder)
$row_indicator = '';
foreach ($color_rows as $var)
{
- if (($var != 'friend' && $var != 'foe' && $row['pm_' . $var])
+ if (($var !== 'friend' && $var !== 'foe' && $row[($var === 'message_reported') ? $var : "pm_{$var}"])
||
- (($var == 'friend' || $var == 'foe') && isset(${$var}[$row['author_id']]) && ${$var}[$row['author_id']]))
+ (($var === 'friend' || $var === 'foe') && isset(${$var}[$row['author_id']]) && ${$var}[$row['author_id']]))
{
$row_indicator = $var;
break;
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index 9a1284083f..36ab3d0463 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -133,7 +133,6 @@ class ucp_profile
'user_email' => ($auth->acl_get('u_chgemail')) ? $data['email'] : $user->data['user_email'],
'user_email_hash' => ($auth->acl_get('u_chgemail')) ? phpbb_email_hash($data['email']) : $user->data['user_email_hash'],
'user_password' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? $passwords_manager->hash($data['new_password']) : $user->data['user_password'],
- 'user_passchg' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? time() : 0,
);
if ($auth->acl_get('u_chgname') && $config['allow_namechange'] && $data['username'] != $user->data['username'])
@@ -147,6 +146,8 @@ class ucp_profile
if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && !$passwords_manager->check($data['new_password'], $user->data['user_password']))
{
+ $sql_ary['user_passchg'] = time();
+
$user->reset_login_keys();
$phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_NEW_PASSWORD', false, array(
'reportee_id' => $user->data['user_id'],
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 0e673cb692..03ac63b12b 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -39,12 +39,23 @@ class ucp_register
trigger_error('UCP_REGISTER_DISABLE');
}
- $coppa = $request->is_set('coppa') ? (int) $request->variable('coppa', false) : false;
+ $coppa = $request->is_set('coppa_yes') ? 1 : ($request->is_set('coppa_no') ? 0 : false);
+ $coppa = $request->is_set('coppa') ? $request->variable('coppa', 0) : $coppa;
$agreed = $request->variable('agreed', false);
$submit = $request->is_set_post('submit');
$change_lang = $request->variable('change_lang', '');
$user_lang = $request->variable('lang', $user->lang_name);
+ if ($agreed && !check_form_key('ucp_register'))
+ {
+ $agreed = false;
+ }
+
+ if ($coppa !== false && !check_form_key('ucp_register'))
+ {
+ $coppa = false;
+ }
+
/**
* Add UCP register data before they are assigned to the template or submitted
*
@@ -67,14 +78,7 @@ class ucp_register
);
extract($phpbb_dispatcher->trigger_event('core.ucp_register_requests_after', compact($vars)));
- if ($agreed)
- {
- add_form_key('ucp_register');
- }
- else
- {
- add_form_key('ucp_register_terms');
- }
+ add_form_key('ucp_register');
if ($change_lang || $user_lang != $config['default_lang'])
{
@@ -168,11 +172,8 @@ class ucp_register
$template_vars = array(
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($user_lang) : '',
- 'L_COPPA_NO' => sprintf($user->lang['UCP_COPPA_BEFORE'], $coppa_birthday),
- 'L_COPPA_YES' => sprintf($user->lang['UCP_COPPA_ON_AFTER'], $coppa_birthday),
-
- 'U_COPPA_NO' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&amp;coppa=0'),
- 'U_COPPA_YES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&amp;coppa=1'),
+ 'L_COPPA_NO' => $user->lang('UCP_COPPA_BEFORE', $coppa_birthday),
+ 'L_COPPA_YES' => $user->lang('UCP_COPPA_ON_AFTER', $coppa_birthday),
'S_SHOW_COPPA' => true,
'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index 89de454427..bb155aeae5 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -418,24 +418,43 @@ function utf8_recode($string, $encoding)
}
/**
-* Replace all UTF-8 chars that are not in ASCII with their NCR
-*
-* @param string $text UTF-8 string in NFC
-* @return string ASCII string using NCRs for non-ASCII chars
-*/
+ * Replace some special UTF-8 chars that are not in ASCII with their UCR.
+ * using their Numeric Character Reference's Hexadecimal notation.
+ *
+ * Doesn't interfere with Japanese or Cyrillic etc.
+ * Unicode character visualization will depend on the character support
+ * of your web browser and the fonts installed on your system.
+ *
+ * @see https://en.wikibooks.org/wiki/Unicode/Character_reference/1F000-1FFFF
+ *
+ * @param string $text UTF-8 string in NFC
+ * @return string ASCII string using NCR for non-ASCII chars
+ */
+function utf8_encode_ucr($text)
+{
+ return preg_replace_callback('/[\\xF0-\\xF4].../', 'utf8_encode_ncr_callback', $text);
+}
+
+/**
+ * Replace all UTF-8 chars that are not in ASCII with their NCR
+ * using their Numeric Character Reference's Hexadecimal notation.
+ *
+ * @param string $text UTF-8 string in NFC
+ * @return string ASCII string using NCRs for non-ASCII chars
+ */
function utf8_encode_ncr($text)
{
return preg_replace_callback('#[\\xC2-\\xF4][\\x80-\\xBF]{1,3}#', 'utf8_encode_ncr_callback', $text);
}
/**
-* Callback used in encode_ncr()
-*
-* Takes a UTF-8 char and replaces it with its NCR. Attention, $m is an array
-*
-* @param array $m 0-based numerically indexed array passed by preg_replace_callback()
-* @return string A HTML NCR if the character is valid, or the original string otherwise
-*/
+ * Callback used in utf8_encode_ncr() and utf8_encode_ucr()
+ *
+ * Takes a UTF-8 char and replaces it with its NCR. Attention, $m is an array
+ *
+ * @param array $m 0-based numerically indexed array passed by preg_replace_callback()
+ * @return string A HTML NCR if the character is valid, or the original string otherwise
+ */
function utf8_encode_ncr_callback($m)
{
return '&#' . utf8_ord($m[0]) . ';';
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index 2b4da2bb7f..654f705967 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.5',
+ 'phpbb_version' => '3.2.8',
'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 f6893f0944..ddf17fa5f6 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.5');
+define('PHPBB_VERSION', '3.2.8');
$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 2a032bb991..d614579f3d 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -269,9 +269,9 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_per_page',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_auth_method', 'PLAIN');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host', '');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password', '');
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('smtp_password', '', 1);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_port', '25');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username', '');
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('smtp_username', '', 1);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('teampage_memberships', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('teampage_forums', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', '25');
@@ -279,7 +279,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.6-dev');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.9-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/acp/board.php b/phpBB/language/en/acp/board.php
index eb53ac0370..e237446dde 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -44,7 +44,7 @@ $lang = array_merge($lang, array(
'BOARD_STYLE' => 'Board style',
'CUSTOM_DATEFORMAT' => 'Custom…',
'DEFAULT_DATE_FORMAT' => 'Date format',
- 'DEFAULT_DATE_FORMAT_EXPLAIN' => 'The date format is the same as the PHP <code>date</code> function.',
+ 'DEFAULT_DATE_FORMAT_EXPLAIN' => 'The date format is the same as the PHP <code><a href="https://secure.php.net/manual/function.date.php">date()</a></code> function.',
'DEFAULT_LANGUAGE' => 'Default language',
'DEFAULT_STYLE' => 'Default style',
'DEFAULT_STYLE_EXPLAIN' => 'The default style for new users.',
@@ -111,9 +111,9 @@ $lang = array_merge($lang, array(
'ALLOW_GRAVATAR' => 'Enable gravatar avatars',
'ALLOW_LOCAL' => 'Enable gallery avatars',
'ALLOW_REMOTE' => 'Enable remote avatars',
- 'ALLOW_REMOTE_EXPLAIN' => 'Avatars linked to from another website.',
+ 'ALLOW_REMOTE_EXPLAIN' => 'Avatars linked to from another website.<br><em><strong class="error">Warning:</strong> Enabling this feature might allow users to check for the existence of files and services that are only accessible on the local network.</em>',
'ALLOW_REMOTE_UPLOAD' => 'Enable remote avatar uploading',
- 'ALLOW_REMOTE_UPLOAD_EXPLAIN' => 'Allow uploading of avatars from another website.',
+ 'ALLOW_REMOTE_UPLOAD_EXPLAIN' => 'Allow uploading of avatars from another website.<br><em><strong class="error">Warning:</strong> Enabling this feature might allow users to check for the existence of files and services that are only accessible on the local network.</em>',
'ALLOW_UPLOAD' => 'Enable avatar uploading',
'AVATAR_GALLERY_PATH' => 'Avatar gallery path',
'AVATAR_GALLERY_PATH_EXPLAIN' => 'Path under your phpBB root directory for pre-loaded images, e.g. <samp>images/avatars/gallery</samp>.<br>Double dots like <samp>../</samp> will be stripped from the path for security reasons.',
@@ -568,6 +568,8 @@ $lang = array_merge($lang, array(
'EMAIL_FORCE_SENDER_EXPLAIN' => 'This will set the <samp>Return-Path</samp> to the from email address instead of using the local user and hostname of the server. This setting does not apply when using SMTP.<br><em><strong>Warning:</strong> Requires the user that the webserver runs as to be added as trusted user to the sendmail configuration.</em>',
'EMAIL_PACKAGE_SIZE' => 'Email package size',
'EMAIL_PACKAGE_SIZE_EXPLAIN' => 'This is the number of maximum emails sent out in one package. This setting is applied to the internal message queue; set this value to 0 if you have problems with non-delivered notification emails.',
+ 'EMAIL_MAX_CHUNK_SIZE' => 'Maximum allowed email recipients',
+ 'EMAIL_MAX_CHUNK_SIZE_EXPLAIN' => 'If necessary, set this to not exceed the maximum number of recipients that your email server will allow in one email message.',
'EMAIL_SIG' => 'Email signature',
'EMAIL_SIG_EXPLAIN' => 'This text will be attached to all emails the board sends.',
'ENABLE_EMAIL' => 'Enable board-wide emails',
@@ -587,8 +589,8 @@ $lang = array_merge($lang, array(
'SMTP_POP_BEFORE_SMTP' => 'POP-BEFORE-SMTP',
'SMTP_PORT' => 'SMTP server port',
'SMTP_PORT_EXPLAIN' => 'Only change this if you know your SMTP server is on a different port.',
- 'SMTP_SERVER' => 'SMTP server address and protocol',
- 'SMTP_SERVER_EXPLAIN' => 'Note that you have to provide the protocol that your server uses. If you are using SSL, this has to be "ssl://your.mailserver.com"',
+ 'SMTP_SERVER' => 'SMTP server address',
+ 'SMTP_SERVER_EXPLAIN' => 'Do not provide a protocol (<samp>ssl://</samp> or <samp>tls://</samp>) unless your mail host tells you to do so.',
'SMTP_SETTINGS' => 'SMTP settings',
'SMTP_USERNAME' => 'SMTP username',
'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.',
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 0d5f6fee25..1c2253542c 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -325,6 +325,7 @@ $lang = array_merge($lang, array(
'TOTAL_SIZE' => 'Total size',
'UCP' => 'User Control Panel',
+ 'URL_INVALID' => 'The provided URL for the setting “%1$s” is invalid.',
'USERNAMES_EXPLAIN' => 'Place each username on a separate line.',
'USER_CONTROL_PANEL' => 'User Control Panel',
diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php
index 7a7176369f..d92d3f8c9e 100644
--- a/phpBB/language/en/acp/forums.php
+++ b/phpBB/language/en/acp/forums.php
@@ -97,6 +97,7 @@ $lang = array_merge($lang, array(
'FORUM_LINK_TRACK_EXPLAIN' => 'Records the number of times a forum link was clicked.',
'FORUM_NAME' => 'Forum name',
'FORUM_NAME_EMPTY' => 'You must enter a name for this forum.',
+ 'FORUM_NAME_EMOJI' => 'The forum name you entered is invalid.<br>It contains the following unsupported characters:<br>%s',
'FORUM_PARENT' => 'Parent forum',
'FORUM_PASSWORD' => 'Forum password',
'FORUM_PASSWORD_CONFIRM' => 'Confirm forum password',
diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php
index 64740b311b..2c7b3d3aee 100644
--- a/phpBB/language/en/acp/permissions_phpbb.php
+++ b/phpBB/language/en/acp/permissions_phpbb.php
@@ -81,8 +81,8 @@ $lang = array_merge($lang, array(
'ACL_U_SIG' => 'Can use signature',
'ACL_U_SENDPM' => 'Can send private messages',
- 'ACL_U_MASSPM' => 'Can send messages to multiple users',
- 'ACL_U_MASSPM_GROUP'=> 'Can send messages to groups',
+ 'ACL_U_MASSPM' => 'Can send private messages to multiple users',
+ 'ACL_U_MASSPM_GROUP'=> 'Can send private messages to groups',
'ACL_U_READPM' => 'Can read private messages',
'ACL_U_PM_EDIT' => 'Can edit own private messages',
'ACL_U_PM_DELETE' => 'Can remove private messages from own folder',
diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php
index 119ad2d7e9..1667aa6011 100644
--- a/phpBB/language/en/acp/posting.php
+++ b/phpBB/language/en/acp/posting.php
@@ -56,7 +56,6 @@ $lang = array_merge($lang, array(
'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists.',
'BBCODE_INVALID' => 'Your BBCode is constructed in an invalid form.',
- 'BBCODE_OPEN_ENDED_TAG' => 'Your custom BBCode must contain both an opening and a closing tag.',
'BBCODE_TAG' => 'Tag',
'BBCODE_TAG_TOO_LONG' => 'The tag name you selected is too long.',
'BBCODE_TAG_DEF_TOO_LONG' => 'The tag definition that you have entered is too long, please shorten your tag definition.',
@@ -78,13 +77,13 @@ $lang = array_merge($lang, array(
'TOO_MANY_BBCODES' => 'You cannot create any more BBCodes. Please remove one or more BBCodes then try again.',
'tokens' => array(
- 'TEXT' => 'Any text, including foreign characters, numbers, etc… You should not use this token in HTML tags. Instead try to use IDENTIFIER, INTTEXT or SIMPLETEXT.',
+ 'TEXT' => 'Any text, including foreign characters, numbers, etc…',
'SIMPLETEXT' => 'Characters from the latin alphabet (A-Z), numbers, spaces, commas, dots, minus, plus, hyphen and underscore',
'INTTEXT' => 'Unicode letter characters, numbers, spaces, commas, dots, minus, plus, hyphen, underscore and whitespaces.',
'IDENTIFIER' => 'Characters from the latin alphabet (A-Z), numbers, hyphen and underscore',
'NUMBER' => 'Any series of digits',
'EMAIL' => 'A valid email address',
- 'URL' => 'A valid URL using any protocol (http, ftp, etc… cannot be used for javascript exploits). If none is given, “http://” is prefixed to the string.',
+ 'URL' => 'A valid URL using any allowed protocol (http, ftp, etc… cannot be used for javascript exploits). If none is given, “http://” is prefixed to the string.',
'LOCAL_URL' => 'A local URL. The URL must be relative to the topic page and cannot contain a server name or protocol, as links are prefixed with “%s”',
'RELATIVE_URL' => 'A relative URL. You can use this to match parts of a URL, but be careful: a full URL is a valid relative URL. When you want to use relative URLs of your board, use the LOCAL_URL token.',
'COLOR' => 'A HTML colour, can be either in the numeric form <samp>#FF1234</samp> or a <a href="http://www.w3.org/TR/CSS21/syndata.html#value-def-color">CSS colour keyword</a> such as <samp>fuchsia</samp> or <samp>InactiveBorder</samp>',
diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php
index 41cbd9cb93..87c950581e 100644
--- a/phpBB/language/en/acp/profile.php
+++ b/phpBB/language/en/acp/profile.php
@@ -111,7 +111,7 @@ $lang = array_merge($lang, array(
'FIRST_OPTION' => 'First option',
'HIDE_PROFILE_FIELD' => 'Hide profile field',
- 'HIDE_PROFILE_FIELD_EXPLAIN' => 'Hide the profile field from all other users except the user, administrators and moderators who are still able to see this field. If the Display in user control panel option is disabled, the user will not be able to see or change this field and the field can only be changed by administrators.',
+ 'HIDE_PROFILE_FIELD_EXPLAIN' => 'Hide the profile field from all users except administrators and moderators, who are still able to see this field. If the Display in user control panel option is disabled, the user will not be able to see or change this field and the field can only be changed by administrators.',
'INVALID_CHARS_FIELD_IDENT' => 'Field identification can only contain lowercase a-z and _',
'INVALID_FIELD_IDENT_LEN' => 'Field identification can only be 17 characters long',
diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php
index ab85d9d2f5..44be3c11cd 100644
--- a/phpBB/language/en/acp/styles.php
+++ b/phpBB/language/en/acp/styles.php
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// DEVELOPERS PLEASE NOTE
@@ -36,55 +36,56 @@ if (empty($lang) || !is_array($lang))
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
-$lang = array_merge($lang, array(
- 'ACP_STYLES_EXPLAIN' => 'Here you can manage the available styles on your board. You may alter existing styles, delete, deactivate, reactivate, install new ones. You can also see what a style will look like using the preview function. Also listed is the total user count for each style, note that overriding user styles will not be reflected here.',
+$lang = array_merge($lang, [
+ 'ACP_STYLES_EXPLAIN' => 'Here you can manage the styles available on your board.<br>Please note you cannot uninstall the “<strong>prosilver</strong>” style as it is phpBB’s default and primary parent style.',
- 'CANNOT_BE_INSTALLED' => 'Cannot be installed',
- 'CONFIRM_UNINSTALL_STYLES' => 'Are you sure you wish to uninstall selected styles?',
- 'COPYRIGHT' => 'Copyright',
+ 'CANNOT_BE_INSTALLED' => 'Cannot be installed',
+ 'CONFIRM_UNINSTALL_STYLES' => 'Are you sure you wish to uninstall selected styles?',
+ 'COPYRIGHT' => 'Copyright',
- 'DEACTIVATE_DEFAULT' => 'You cannot deactivate the default style.',
- 'DELETE_FROM_FS' => 'Delete from filesystem',
- 'DELETE_STYLE_FILES_FAILED' => 'Error deleting files for style "%s".',
- 'DELETE_STYLE_FILES_SUCCESS' => 'Files for style "%s" have been deleted.',
- 'DETAILS' => 'Details',
+ 'DEACTIVATE_DEFAULT' => 'You cannot deactivate the default style.',
+ 'DELETE_FROM_FS' => 'Delete from filesystem',
+ 'DELETE_STYLE_FILES_FAILED' => 'Error deleting files for style "%s".',
+ 'DELETE_STYLE_FILES_SUCCESS' => 'Files for style "%s" have been deleted.',
+ 'DETAILS' => 'Details',
- 'INHERITING_FROM' => 'Inherits from',
- 'INSTALL_STYLE' => 'Install style',
- 'INSTALL_STYLES' => 'Install styles',
- 'INSTALL_STYLES_EXPLAIN' => 'Here you can install new styles.<br />If you cannot find a specific style in list below, check to make sure style is already installed. If it is not installed, check if it was uploaded correctly.',
- 'INVALID_STYLE_ID' => 'Invalid style ID.',
+ 'INHERITING_FROM' => 'Inherits from',
+ 'INSTALL_STYLE' => 'Install style',
+ 'INSTALL_STYLES' => 'Install styles',
+ 'INSTALL_STYLES_EXPLAIN' => 'Here you can install new styles.<br>If you cannot find a specific style in list below, check to make sure style is already installed. If it is not installed, check if it was uploaded correctly.',
+ 'INVALID_STYLE_ID' => 'Invalid style ID.',
- 'NO_MATCHING_STYLES_FOUND' => 'No styles match your query.',
- 'NO_UNINSTALLED_STYLE' => 'No uninstalled styles detected.',
+ 'NO_MATCHING_STYLES_FOUND' => 'No styles match your query.',
+ 'NO_UNINSTALLED_STYLE' => 'No uninstalled styles detected.',
- 'PURGED_CACHE' => 'Cache was purged.',
+ 'PURGED_CACHE' => 'Cache was purged.',
- 'REQUIRES_STYLE' => 'This style requires the style "%s" to be installed.',
+ 'REQUIRES_STYLE' => 'This style requires the style "%s" to be installed.',
- 'STYLE_ACTIVATE' => 'Activate',
- 'STYLE_ACTIVE' => 'Active',
- 'STYLE_DEACTIVATE' => 'Deactivate',
- 'STYLE_DEFAULT' => 'Make default style',
- 'STYLE_DEFAULT_CHANGE_INACTIVE' => 'You must activate style before making it default style.',
- 'STYLE_ERR_INVALID_PARENT' => 'Invalid parent style.',
- 'STYLE_ERR_NAME_EXIST' => 'A style with that name already exists.',
- 'STYLE_ERR_STYLE_NAME' => 'You must supply a name for this style.',
- 'STYLE_INSTALLED' => 'Style "%s" has been installed.',
+ 'STYLE_ACTIVATE' => 'Activate',
+ 'STYLE_ACTIVE' => 'Active',
+ 'STYLE_DEACTIVATE' => 'Deactivate',
+ 'STYLE_DEFAULT' => 'Make default style',
+ 'STYLE_DEFAULT_CHANGE_INACTIVE' => 'You must activate style before making it default style.',
+ 'STYLE_ERR_INVALID_PARENT' => 'Invalid parent style.',
+ 'STYLE_ERR_NAME_EXIST' => 'A style with that name already exists.',
+ 'STYLE_ERR_STYLE_NAME' => 'You must supply a name for this style.',
+ 'STYLE_INSTALLED' => 'Style "%s" has been installed.',
'STYLE_INSTALLED_RETURN_INSTALLED_STYLES' => 'Return to installed styles list',
'STYLE_INSTALLED_RETURN_UNINSTALLED_STYLES' => 'Install more styles',
- 'STYLE_NAME' => 'Style name',
- 'STYLE_NAME_RESERVED' => 'Style "%s" can not be installed, because the name is reserved.',
- 'STYLE_NOT_INSTALLED' => 'Style "%s" was not installed.',
- 'STYLE_PATH' => 'Style path',
- 'STYLE_UNINSTALL' => 'Uninstall',
- 'STYLE_UNINSTALL_DEPENDENT' => 'Style "%s" cannot be uninstalled because it has one or more child styles.',
- 'STYLE_UNINSTALLED' => 'Style "%s" uninstalled successfully.',
- 'STYLE_PHPBB_VERSION' => 'phpBB Version',
- 'STYLE_USED_BY' => 'Used by (including robots)',
- 'STYLE_VERSION' => 'Style version',
+ 'STYLE_NAME' => 'Style name',
+ 'STYLE_NAME_RESERVED' => 'Style "%s" can not be installed, because the name is reserved.',
+ 'STYLE_NOT_INSTALLED' => 'Style "%s" was not installed.',
+ 'STYLE_PATH' => 'Style path',
+ 'STYLE_UNINSTALL' => 'Uninstall',
+ 'STYLE_UNINSTALL_DEPENDENT' => 'Style "%s" cannot be uninstalled because it has one or more child styles.',
+ 'STYLE_UNINSTALLED' => 'Style "%s" uninstalled successfully.',
+ 'STYLE_PHPBB_VERSION' => 'phpBB Version',
+ 'STYLE_USED_BY' => 'Used by (including robots)',
+ 'STYLE_VERSION' => 'Style version',
- 'UNINSTALL_DEFAULT' => 'You cannot uninstall the default style.',
+ 'UNINSTALL_PROSILVER' => 'You cannot uninstall the style “prosilver”.',
+ 'UNINSTALL_DEFAULT' => 'You cannot uninstall the default style.',
- 'BROWSE_STYLES_DATABASE' => 'Browse styles database',
-));
+ 'BROWSE_STYLES_DATABASE' => 'Browse styles database',
+]);
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 835030762c..3ba63746c8 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -91,6 +91,7 @@ $lang = array_merge($lang, array(
'ATTACHED_IMAGE_NOT_IMAGE' => 'The image file you tried to attach is invalid.',
'AUTHOR' => 'Author',
'AUTH_NO_PROFILE_CREATED' => 'The creation of a user profile was unsuccessful.',
+ 'AUTH_PROVIDER_OAUTH_ERROR_ALREADY_LINKED' => 'This external service is already associated with another board account.',
'AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY' => 'Invalid database entry.',
'AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE' => 'Invalid service type provided to OAuth service handler.',
'AUTH_PROVIDER_OAUTH_ERROR_SERVICE_NOT_CREATED' => 'OAuth service not created',
@@ -518,7 +519,8 @@ $lang = array_merge($lang, array(
'NO_POSTS_TIME_FRAME' => 'No posts exist inside this topic for the selected time frame.',
'NO_FEED_ENABLED' => 'Feeds are not available on this board.',
'NO_FEED' => 'The requested feed is not available.',
- 'NO_STYLE_DATA' => 'Could not get style data',
+ 'NO_STYLE_DATA' => 'Could not get style data for user_style %s and set for user_id %s',
+ 'NO_STYLE_CFG' => 'Could not get the style configuration file for: %s',
'NO_SUBJECT' => 'No subject specified', // Used for posts having no subject defined but displayed within management pages.
'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn’t exist.',
'NO_SUPPORTED_AUTH_METHODS' => 'No supported authentication methods.',
diff --git a/phpBB/language/en/email/admin_activate.txt b/phpBB/language/en/email/admin_activate.txt
index a53ab1269e..71faca70b2 100644
--- a/phpBB/language/en/email/admin_activate.txt
+++ b/phpBB/language/en/email/admin_activate.txt
@@ -7,7 +7,7 @@ The account owned by "{USERNAME}" has been deactivated or newly created, you sho
Use this link to view the user's profile:
{U_USER_DETAILS}
-Use this link to activate the account:
+You may activate the account immediately by clicking on this link:
{U_ACTIVATE}
{EMAIL_SIG}
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index 11ea6483e1..426475e77a 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -43,6 +43,7 @@ $lang = array_merge($lang, array(
'ADD_POLL' => 'Poll creation',
'ADD_POLL_EXPLAIN' => 'If you do not want to add a poll to your topic leave the fields blank.',
'ALREADY_DELETED' => 'Sorry but this message is already deleted.',
+ 'ATTACH_COMMENT_NO_EMOJIS' => 'The attachment comment contains forbidden characters (Emoji).',
'ATTACH_DISK_FULL' => 'There is not enough free disk space to post this attachment.',
'ATTACH_QUOTA_REACHED' => 'Sorry, the board attachment quota has been reached.',
'ATTACH_SIG' => 'Attach a signature (signatures can be altered via the UCP)',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 2622fb57b7..8549230b9f 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -89,6 +89,7 @@ $lang = array_merge($lang, array(
'ATTACHMENTS_EXPLAIN' => 'This is a list of attachments you have made in posts to this board.',
'ATTACHMENTS_DELETED' => 'Attachments successfully deleted.',
'ATTACHMENT_DELETED' => 'Attachment successfully deleted.',
+ 'ATTACHMENT_LOCKED' => 'This topic is locked, you cannot delete the attachment.',
'AUTOLOGIN_SESSION_KEYS_DELETED'=> 'The selected "Remember Me" login keys were successfully deleted.',
'AVATAR_CATEGORY' => 'Category',
'AVATAR_DRIVER_GRAVATAR_TITLE' => 'Gravatar',
@@ -115,7 +116,7 @@ $lang = array_merge($lang, array(
'BIRTHDAY' => 'Birthday',
'BIRTHDAY_EXPLAIN' => 'Setting a year will list your age when it is your birthday.',
'BOARD_DATE_FORMAT' => 'My date format',
- 'BOARD_DATE_FORMAT_EXPLAIN' => 'The syntax used is identical to the PHP <a href="http://www.php.net/date">date()</a> function.',
+ 'BOARD_DATE_FORMAT_EXPLAIN' => 'The syntax used is identical to the PHP <a href="https://secure.php.net/manual/function.date.php">date()</a> function.',
'BOARD_LANGUAGE' => 'My language',
'BOARD_STYLE' => 'My board style',
'BOARD_TIMEZONE' => 'My timezone',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index b26d7c8f94..1343bd7c60 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1073,7 +1073,18 @@ switch ($mode)
if ($active_time !== false)
{
- $sql_where .= " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . $active_time;
+ if ($active_select === 'lt' && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
+ {
+ $sql_where .= ' AND u.user_lastvisit = 0';
+ }
+ else if ($active_select === 'gt')
+ {
+ $sql_where .= ' AND u.user_lastvisit ' . $find_key_match[$active_select] . ' ' . $active_time;
+ }
+ else
+ {
+ $sql_where .= ' AND (u.user_lastvisit > 0 AND u.user_lastvisit < ' . $active_time . ')';
+ }
}
}
@@ -1223,18 +1234,18 @@ switch ($mode)
$avatar_img = phpbb_get_group_avatar($group_row);
// ... same for group rank
- $user_rank_data = array(
+ $group_rank_data = array(
'title' => null,
'img' => null,
'img_src' => null,
);
if ($group_row['group_rank'])
{
- $user_rank_data = phpbb_get_user_rank($group_row, false);
+ $group_rank_data = $group_helper->get_rank($group_row);
- if ($user_rank_data['img'])
+ if ($group_rank_data['img'])
{
- $user_rank_data['img'] .= '<br />';
+ $group_rank_data['img'] .= '<br />';
}
}
// include modules for manage groups link display or not
@@ -1261,11 +1272,11 @@ switch ($mode)
'GROUP_NAME' => $group_helper->get_name($group_row['group_name']),
'GROUP_COLOR' => $group_row['group_colour'],
'GROUP_TYPE' => $user->lang['GROUP_IS_' . $group_row['l_group_type']],
- 'GROUP_RANK' => $user_rank_data['title'],
+ 'GROUP_RANK' => $group_rank_data['title'],
'AVATAR_IMG' => $avatar_img,
- 'RANK_IMG' => $user_rank_data['img'],
- 'RANK_IMG_SRC' => $user_rank_data['img_src'],
+ 'RANK_IMG' => $group_rank_data['img'],
+ 'RANK_IMG_SRC' => $group_rank_data['img_src'],
'U_PM' => ($auth->acl_get('u_sendpm') && $auth->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && $config['allow_privmsg'] && $config['allow_mass_pm']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;g=' . $group_id) : '',
'U_MANAGE' => ($can_manage_group) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_groups&amp;mode=manage') : false,)
@@ -1664,7 +1675,7 @@ switch ($mode)
}
// do we need to display contact fields as such
- $use_contact_fields = false;
+ $use_contact_fields = true;
/**
* Modify list of users before member row is created
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index c7ebd1fb7f..e3f8394bba 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -191,7 +191,7 @@ class oauth extends \phpbb\auth\provider\base
return $provider->login($username, $password);
}
- // Requst the name of the OAuth service
+ // Request the name of the OAuth service
$service_name_original = $this->request->variable('oauth_service', '', false);
$service_name = 'auth.provider.oauth.service.' . strtolower($service_name_original);
if ($service_name_original === '' || !array_key_exists($service_name, $this->service_providers))
@@ -216,10 +216,15 @@ class oauth extends \phpbb\auth\provider\base
$this->service_providers[$service_name]->set_external_service_provider($service);
$unique_id = $this->service_providers[$service_name]->perform_auth_login();
- // Check to see if this provider is already assosciated with an account
+ /**
+ * Check to see if this provider is already associated with an account.
+ *
+ * Enforcing a data type to make data contains strings and not integers,
+ * so values are quoted in the SQL WHERE statement.
+ */
$data = array(
- 'provider' => $service_name_original,
- 'oauth_provider_id' => $unique_id
+ 'provider' => (string) $service_name_original,
+ 'oauth_provider_id' => (string) $unique_id
);
$sql = 'SELECT user_id FROM ' . $this->auth_provider_oauth_token_account_assoc . '
@@ -264,7 +269,7 @@ class oauth extends \phpbb\auth\provider\base
}
// Retrieve the user's account
- $sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type, user_login_attempts
+ $sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_ip, user_type, user_login_attempts
FROM ' . $this->users_table . '
WHERE user_id = ' . (int) $row['user_id'];
$result = $this->db->sql_query($sql);
@@ -276,11 +281,36 @@ class oauth extends \phpbb\auth\provider\base
throw new \Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY');
}
+ /**
+ * Check if the user is banned.
+ * The fourth parameter, return, has to be true,
+ * otherwise the OAuth login is still called and
+ * an uncaught exception is thrown as there is no
+ * token stored in the database.
+ */
+ $ban = $this->user->check_ban($row['user_id'], $row['user_ip'], $row['user_email'], true);
+ if (!empty($ban))
+ {
+ $till_date = !empty($ban['ban_end']) ? $this->user->format_date($ban['ban_end']) : '';
+ $message = !empty($ban['ban_end']) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM';
+
+ $contact_link = phpbb_get_board_contact_link($this->config, $this->phpbb_root_path, $this->php_ext);
+ $message = $this->user->lang($message, $till_date, '<a href="' . $contact_link . '">', '</a>');
+ $message .= !empty($ban['ban_give_reason']) ? '<br /><br />' . $this->user->lang('BOARD_BAN_REASON', $ban['ban_give_reason']) : '';
+ $message .= !empty($ban['ban_triggered_by']) ? '<br /><br /><em>' . $this->user->lang('BAN_TRIGGERED_BY_' . strtoupper($ban['ban_triggered_by'])) . '</em>' : '';
+
+ return array(
+ 'status' => LOGIN_BREAK,
+ 'error_msg' => $message,
+ 'user_row' => $row,
+ );
+ }
+
// Update token storage to store the user_id
$storage->set_user_id($row['user_id']);
/**
- * Event is triggered after user is successfuly logged in via OAuth.
+ * Event is triggered after user is successfully logged in via OAuth.
*
* @event core.auth_oauth_login_after
* @var array row User row
@@ -398,7 +428,7 @@ class oauth extends \phpbb\auth\provider\base
if ($credentials['key'] && $credentials['secret'])
{
$actual_name = str_replace('auth.provider.oauth.service.', '', $service_name);
- $redirect_url = build_url(false) . '&login=external&oauth_service=' . $actual_name;
+ $redirect_url = generate_board_url() . '/ucp.' . $this->php_ext . '?mode=login&login=external&oauth_service=' . $actual_name;
$login_data['BLOCK_VARS'][$service_name] = array(
'REDIRECT_URL' => redirect($redirect_url, true),
'SERVICE_NAME' => $this->user->lang['AUTH_PROVIDER_OAUTH_SERVICE_' . strtoupper($actual_name)],
@@ -609,6 +639,21 @@ class oauth extends \phpbb\auth\provider\base
*/
protected function link_account_perform_link(array $data)
{
+ // Check if the external account is already associated with other user
+ $sql = 'SELECT user_id
+ FROM ' . $this->auth_provider_oauth_token_account_assoc . "
+ WHERE provider = '" . $this->db->sql_escape($data['provider']) . "'
+ AND oauth_provider_id = '" . $this->db->sql_escape($data['oauth_provider_id']) . "'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if ($row)
+ {
+ trigger_error('AUTH_PROVIDER_OAUTH_ERROR_ALREADY_LINKED');
+ }
+
+ // Link account
$sql = 'INSERT INTO ' . $this->auth_provider_oauth_token_account_assoc . '
' . $this->db->sql_build_array('INSERT', $data);
$this->db->sql_query($sql);
@@ -714,7 +759,7 @@ class oauth extends \phpbb\auth\provider\base
AND user_id = " . (int) $user_id;
$this->db->sql_query($sql);
- // Clear all tokens belonging to the user on this servce
+ // Clear all tokens belonging to the user on this service
$service_name = 'auth.provider.oauth.service.' . strtolower($link_data['oauth_service']);
$storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table, $this->auth_provider_oauth_state_table);
$storage->clearToken($service_name);
diff --git a/phpBB/phpbb/auth/provider/provider_interface.php b/phpBB/phpbb/auth/provider/provider_interface.php
index 35e0f559a1..463324ff46 100644
--- a/phpBB/phpbb/auth/provider/provider_interface.php
+++ b/phpBB/phpbb/auth/provider/provider_interface.php
@@ -71,9 +71,10 @@ interface provider_interface
* options with whatever configuraton values are passed to it as an array.
* It then returns the name of the acp file related to this authentication
* provider.
- * @param array $new_config Contains the new configuration values that
- * have been set in acp_board.
- * @return array|null Returns null if not implemented or an array with
+ *
+ * @param \phpbb\config\config $new_config Contains the new configuration values
+ * that have been set in acp_board.
+ * @return array|null Returns null if not implemented or an array with
* the template file name and an array of the vars
* that the template needs that must conform to the
* following example:
diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php
index 77b44754ac..a012bb15b6 100644
--- a/phpBB/phpbb/avatar/driver/upload.php
+++ b/phpBB/phpbb/avatar/driver/upload.php
@@ -148,7 +148,8 @@ class upload extends \phpbb\avatar\driver\driver
// Do not allow specifying the port (see RFC 3986) or IP addresses
// remote_upload() will do its own check for allowed filetypes
- if (preg_match('@^(http|https|ftp)://[^/:?#]+:[0-9]+[/:?#]@i', $url) ||
+ if (!preg_match('#^(http|https|ftp)://(?:(.*?\.)*?[a-z0-9\-]+?\.[a-z]{2,4}|(?:\d{1,3}\.){3,5}\d{1,3}):?([0-9]*?).*?\.('. implode('|', $this->allowed_extensions) . ')$#i', $url) ||
+ preg_match('@^(http|https|ftp)://[^/:?#]+:[0-9]+[/:?#]@i', $url) ||
preg_match('#^(http|https|ftp)://(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])#i', $url) ||
preg_match('#^(http|https|ftp)://(?:(?:(?:[\dA-F]{1,4}:){6}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:::(?:[\dA-F]{1,4}:){0,5}(?:[\dA-F]{1,4}(?::[\dA-F]{1,4})?|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:):(?:[\dA-F]{1,4}:){4}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,2}:(?:[\dA-F]{1,4}:){3}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,3}:(?:[\dA-F]{1,4}:){2}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,4}:(?:[\dA-F]{1,4}:)(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,5}:(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,6}:[\dA-F]{1,4})|(?:(?:[\dA-F]{1,4}:){1,7}:)|(?:::))#i', $url))
{
diff --git a/phpBB/phpbb/avatar/manager.php b/phpBB/phpbb/avatar/manager.php
index 6d9604db04..a909a91042 100644
--- a/phpBB/phpbb/avatar/manager.php
+++ b/phpBB/phpbb/avatar/manager.php
@@ -271,7 +271,7 @@ class manager
$config_name = $driver->get_config_name();
return array(
- 'allow_avatar_' . $config_name => array('lang' => 'ALLOW_' . strtoupper(str_replace('\\', '_', $config_name)), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_avatar_' . $config_name => array('lang' => 'ALLOW_' . strtoupper(str_replace('\\', '_', $config_name)), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
);
}
diff --git a/phpBB/phpbb/captcha/plugins/qa.php b/phpBB/phpbb/captcha/plugins/qa.php
index 70b3f72cc3..966b8d32f2 100644
--- a/phpBB/phpbb/captcha/plugins/qa.php
+++ b/phpBB/phpbb/captcha/plugins/qa.php
@@ -21,7 +21,7 @@ class qa
{
var $confirm_id;
var $answer;
- var $question_ids;
+ var $question_ids = [];
var $question_text;
var $question_lang;
var $question_strict;
diff --git a/phpBB/phpbb/db/driver/mysqli.php b/phpBB/phpbb/db/driver/mysqli.php
index d43e201526..b429ad97aa 100644
--- a/phpBB/phpbb/db/driver/mysqli.php
+++ b/phpBB/phpbb/db/driver/mysqli.php
@@ -68,6 +68,9 @@ class mysqli extends \phpbb\db\driver\mysql_base
if ($this->db_connect_id && $this->dbname != '')
{
+ // Disable loading local files on client side
+ @mysqli_options($this->db_connect_id, MYSQLI_OPT_LOCAL_INFILE, false);
+
@mysqli_query($this->db_connect_id, "SET NAMES 'utf8'");
// enforce strict mode on databases that support it
diff --git a/phpBB/phpbb/db/migration/data/v32x/disable_remote_avatar.php b/phpBB/phpbb/db/migration/data/v32x/disable_remote_avatar.php
new file mode 100644
index 0000000000..b08833fad4
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/disable_remote_avatar.php
@@ -0,0 +1,34 @@
+<?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\v32x;
+
+use phpbb\db\migration\migration;
+
+class disable_remote_avatar extends migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v32x\v325',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('allow_avatar_remote', '0')),
+ array('config.update', array('allow_avatar_remote_upload', '0')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v32x/smtp_dynamic_data.php b/phpBB/phpbb/db/migration/data/v32x/smtp_dynamic_data.php
new file mode 100644
index 0000000000..aeaa3e8979
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/smtp_dynamic_data.php
@@ -0,0 +1,42 @@
+<?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\v32x;
+
+class smtp_dynamic_data extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v32x\v326rc1',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'set_smtp_dynamic'))),
+ );
+ }
+
+ public function set_smtp_dynamic()
+ {
+ $smtp_auth_entries = [
+ 'smtp_password',
+ 'smtp_username',
+ ];
+ $this->sql_query('UPDATE ' . CONFIG_TABLE . '
+ SET is_dynamic = 1
+ WHERE ' . $this->db->sql_in_set('config_name', $smtp_auth_entries));
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v32x/timezone_p3.php b/phpBB/phpbb/db/migration/data/v32x/timezone_p3.php
new file mode 100644
index 0000000000..433f62ace9
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/timezone_p3.php
@@ -0,0 +1,29 @@
+<?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\v32x;
+
+class timezone_p3 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\timezone');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.remove', array('board_dst')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v32x/v326.php b/phpBB/phpbb/db/migration/data/v32x/v326.php
new file mode 100644
index 0000000000..2d511b9ed8
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/v326.php
@@ -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\v32x;
+
+class v326 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.2.6', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v32x\v326rc1',
+ '\phpbb\db\migration\data\v32x\disable_remote_avatar',
+ '\phpbb\db\migration\data\v32x\smtp_dynamic_data',
+ );
+
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.2.6')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v32x/v326rc1.php b/phpBB/phpbb/db/migration/data/v32x/v326rc1.php
new file mode 100644
index 0000000000..092700d3db
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/v326rc1.php
@@ -0,0 +1,37 @@
+<?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\v32x;
+
+class v326rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.2.6-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v32x\v325',
+ );
+
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.2.6-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v32x/v327.php b/phpBB/phpbb/db/migration/data/v32x/v327.php
new file mode 100644
index 0000000000..f9ea11f4b9
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/v327.php
@@ -0,0 +1,37 @@
+<?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\v32x;
+
+class v327 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.2.7', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v32x\v327rc1',
+ );
+
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.2.7')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v32x/v327rc1.php b/phpBB/phpbb/db/migration/data/v32x/v327rc1.php
new file mode 100644
index 0000000000..c8169105af
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/v327rc1.php
@@ -0,0 +1,36 @@
+<?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\v32x;
+
+class v327rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.2.7-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v32x\v326',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.2.7-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v32x/v328.php b/phpBB/phpbb/db/migration/data/v32x/v328.php
new file mode 100644
index 0000000000..28ff2c7033
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/v328.php
@@ -0,0 +1,36 @@
+<?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\v32x;
+
+class v328 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.2.8', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v32x\v328rc1',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.2.8')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v32x/v328rc1.php b/phpBB/phpbb/db/migration/data/v32x/v328rc1.php
new file mode 100644
index 0000000000..fa43cf33a7
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/v328rc1.php
@@ -0,0 +1,37 @@
+<?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\v32x;
+
+class v328rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.2.8-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v32x\timezone_p3',
+ '\phpbb\db\migration\data\v32x\v327',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.2.8-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/tools/tools.php b/phpBB/phpbb/db/tools/tools.php
index d21d34b8a9..c3352a1f66 100644
--- a/phpBB/phpbb/db/tools/tools.php
+++ b/phpBB/phpbb/db/tools/tools.php
@@ -576,7 +576,7 @@ class tools implements tools_interface
{
foreach ($indexes as $index_name)
{
- if (!$this->sql_index_exists($table, $index_name))
+ if (!$this->sql_index_exists($table, $index_name) && !$this->sql_unique_index_exists($table, $index_name))
{
continue;
}
diff --git a/phpBB/phpbb/event/md_exporter.php b/phpBB/phpbb/event/md_exporter.php
index c3942bd7ce..1a2d7c989e 100644
--- a/phpBB/phpbb/event/md_exporter.php
+++ b/phpBB/phpbb/event/md_exporter.php
@@ -389,9 +389,16 @@ class md_exporter
$files = explode("\n + ", $file_details);
foreach ($files as $file)
{
+ if (!preg_match('#^([^ ]+)( \([0-9]+\))?$#', $file))
+ {
+ throw new \LogicException("Invalid event instances for file '{$file}' found for event '{$this->current_event}'", 1);
+ }
+
+ list($file) = explode(" ", $file);
+
if (!file_exists($this->path . $file) || substr($file, -5) !== '.html')
{
- throw new \LogicException("Invalid file '{$file}' not found for event '{$this->current_event}'", 1);
+ throw new \LogicException("Invalid file '{$file}' not found for event '{$this->current_event}'", 2);
}
if (($this->filter !== 'adm') && strpos($file, 'styles/prosilver/template/') === 0)
@@ -404,7 +411,7 @@ class md_exporter
}
else
{
- throw new \LogicException("Invalid file '{$file}' not found for event '{$this->current_event}'", 2);
+ throw new \LogicException("Invalid file '{$file}' not found for event '{$this->current_event}'", 3);
}
$this->events_by_file[$file][] = $this->current_event;
@@ -424,7 +431,7 @@ class md_exporter
}
else
{
- throw new \LogicException("Invalid file list found for event '{$this->current_event}'", 2);
+ throw new \LogicException("Invalid file list found for event '{$this->current_event}'", 1);
}
return $files_list;
diff --git a/phpBB/phpbb/filesystem/filesystem.php b/phpBB/phpbb/filesystem/filesystem.php
index bfafdf5ddd..c5be284d8c 100644
--- a/phpBB/phpbb/filesystem/filesystem.php
+++ b/phpBB/phpbb/filesystem/filesystem.php
@@ -835,7 +835,7 @@ class filesystem implements filesystem_interface
$current_path = $resolved_path . '/' . $path_part;
// Resolve symlinks
- if (is_link($current_path))
+ if (@is_link($current_path))
{
if (!function_exists('readlink'))
{
@@ -872,12 +872,12 @@ class filesystem implements filesystem_interface
$resolved_path = false;
}
- else if (is_dir($current_path . '/'))
+ else if (@is_dir($current_path . '/'))
{
$resolved[] = $path_part;
$resolved_path = $current_path;
}
- else if (is_file($current_path))
+ else if (@is_file($current_path))
{
$resolved[] = $path_part;
$resolved_path = $current_path;
diff --git a/phpBB/phpbb/group/helper.php b/phpBB/phpbb/group/helper.php
index 5befddfc53..aa3876b325 100644
--- a/phpBB/phpbb/group/helper.php
+++ b/phpBB/phpbb/group/helper.php
@@ -13,19 +13,74 @@
namespace phpbb\group;
+use phpbb\auth\auth;
+use phpbb\cache\service as cache;
+use phpbb\config\config;
+use phpbb\language\language;
+use phpbb\event\dispatcher_interface;
+use phpbb\path_helper;
+use phpbb\user;
+
class helper
{
- /** @var \phpbb\language\language */
+ /** @var auth */
+ protected $auth;
+
+ /** @var cache */
+ protected $cache;
+
+ /** @var config */
+ protected $config;
+
+ /** @var language */
protected $language;
+ /** @var dispatcher_interface */
+ protected $dispatcher;
+
+ /** @var path_helper */
+ protected $path_helper;
+
+ /** @var user */
+ protected $user;
+
+ /** @var string phpBB root path */
+ protected $phpbb_root_path;
+
+ /** @var array Return templates for a group name string */
+ protected $name_strings;
+
/**
* Constructor
*
- * @param \phpbb\language\language $language Language object
+ * @param auth $auth Authentication object
+ * @param cache $cache Cache service object
+ * @param config $config Configuration object
+ * @param language $language Language object
+ * @param dispatcher_interface $dispatcher Event dispatcher object
+ * @param path_helper $path_helper Path helper object
+ * @param user $user User object
*/
- public function __construct(\phpbb\language\language $language)
+ public function __construct(auth $auth, cache $cache, config $config, language $language, dispatcher_interface $dispatcher, path_helper $path_helper, user $user)
{
+ $this->auth = $auth;
+ $this->cache = $cache;
+ $this->config = $config;
$this->language = $language;
+ $this->dispatcher = $dispatcher;
+ $this->path_helper = $path_helper;
+ $this->user = $user;
+
+ $this->phpbb_root_path = $path_helper->get_phpbb_root_path();
+
+ /** @html Group name spans and links for usage in the template */
+ $this->name_strings = array(
+ 'base_url' => "{$path_helper->get_phpbb_root_path()}memberlist.{$path_helper->get_php_ext()}?mode=group&amp;g={GROUP_ID}",
+ 'tpl_noprofile' => '<span class="username">{GROUP_NAME}</span>',
+ 'tpl_noprofile_colour' => '<span class="username-coloured" style="color: {GROUP_COLOUR};">{GROUP_NAME}</span>',
+ 'tpl_profile' => '<a class="username" href="{PROFILE_URL}">{GROUP_NAME}</a>',
+ 'tpl_profile_colour' => '<a class="username-coloured" href="{PROFILE_URL}" style="color: {GROUP_COLOUR};">{GROUP_NAME}</a>',
+ );
}
/**
@@ -37,4 +92,203 @@ class helper
{
return $this->language->is_set('G_' . utf8_strtoupper($group_name)) ? $this->language->lang('G_' . utf8_strtoupper($group_name)) : $group_name;
}
+
+ /**
+ * Get group name details for placing into templates.
+ *
+ * @html Group name spans and links
+ *
+ * @param string $mode Profile (for getting an url to the profile),
+ * group_name (for obtaining the group name),
+ * colour (for obtaining the group colour),
+ * full (for obtaining a coloured group name link to the group's profile),
+ * no_profile (the same as full but forcing no profile link)
+ * @param int $group_id The group id
+ * @param string $group_name The group name
+ * @param string $group_colour The group colour
+ * @param mixed $custom_profile_url optional parameter to specify a profile url. The group id gets appended to this url as &amp;g={group_id}
+ *
+ * @return string A string consisting of what is wanted based on $mode.
+ */
+ public function get_name_string($mode, $group_id, $group_name, $group_colour = '', $custom_profile_url = false)
+ {
+ $s_is_bots = ($group_name === 'BOTS');
+
+ // This switch makes sure we only run code required for the mode
+ switch ($mode)
+ {
+ case 'full':
+ case 'no_profile':
+ case 'colour':
+
+ // Build correct group colour
+ $group_colour = $group_colour ? '#' . $group_colour : '';
+
+ // Return colour
+ if ($mode === 'colour')
+ {
+ $group_name_string = $group_colour;
+ break;
+ }
+
+ // no break;
+
+ case 'group_name':
+
+ // Build correct group name
+ $group_name = $this->get_name($group_name);
+
+ // Return group name
+ if ($mode === 'group_name')
+ {
+ $group_name_string = $group_name;
+ break;
+ }
+
+ // no break;
+
+ case 'profile':
+
+ // Build correct profile url - only show if not anonymous and permission to view profile if registered user
+ // For anonymous the link leads to a login page.
+ if ($group_id && !$s_is_bots && ($this->user->data['user_id'] == ANONYMOUS || $this->auth->acl_get('u_viewprofile')))
+ {
+ $profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&amp;g=' . (int) $group_id : str_replace(array('={GROUP_ID}', '=%7BGROUP_ID%7D'), '=' . (int) $group_id, append_sid($this->name_strings['base_url']));
+ }
+ else
+ {
+ $profile_url = '';
+ }
+
+ // Return profile
+ if ($mode === 'profile')
+ {
+ $group_name_string = $profile_url;
+ break;
+ }
+
+ // no break;
+ }
+
+ if (!isset($group_name_string))
+ {
+ if (($mode === 'full' && empty($profile_url)) || $mode === 'no_profile' || $s_is_bots)
+ {
+ $group_name_string = str_replace(array('{GROUP_COLOUR}', '{GROUP_NAME}'), array($group_colour, $group_name), (!$group_colour) ? $this->name_strings['tpl_noprofile'] : $this->name_strings['tpl_noprofile_colour']);
+ }
+ else
+ {
+ $group_name_string = str_replace(array('{PROFILE_URL}', '{GROUP_COLOUR}', '{GROUP_NAME}'), array($profile_url, $group_colour, $group_name), (!$group_colour) ? $this->name_strings['tpl_profile'] : $this->name_strings['tpl_profile_colour']);
+ }
+ }
+
+ $name_strings = $this->name_strings;
+
+ /**
+ * Use this event to change the output of the group name
+ *
+ * @event core.modify_group_name_string
+ * @var string mode profile|group_name|colour|full|no_profile
+ * @var int group_id The group identifier
+ * @var string group_name The group name
+ * @var string group_colour The group colour
+ * @var string custom_profile_url Optional parameter to specify a profile url.
+ * @var string group_name_string The string that has been generated
+ * @var array name_strings Array of original return templates
+ * @since 3.2.8-RC1
+ */
+ $vars = array(
+ 'mode',
+ 'group_id',
+ 'group_name',
+ 'group_colour',
+ 'custom_profile_url',
+ 'group_name_string',
+ 'name_strings',
+ );
+ extract($this->dispatcher->trigger_event('core.modify_group_name_string', compact($vars)));
+
+ return $group_name_string;
+ }
+
+ /**
+ * Get group rank title and image
+ *
+ * @html Group rank image element
+ *
+ * @param array $group_data The current stored group data
+ *
+ * @return array An associative array containing the rank title (title),
+ * the rank image as full img tag (img) and the rank image source (img_src)
+ */
+ public function get_rank($group_data)
+ {
+ $group_rank_data = array(
+ 'title' => null,
+ 'img' => null,
+ 'img_src' => null,
+ );
+
+ /**
+ * Preparing a group's rank before displaying
+ *
+ * @event core.get_group_rank_before
+ * @var array group_data Array with group's data
+ * @since 3.2.8-RC1
+ */
+
+ $vars = array('group_data');
+ extract($this->dispatcher->trigger_event('core.get_group_rank_before', compact($vars)));
+
+ if (!empty($group_data['group_rank']))
+ {
+ // Only obtain ranks if group rank is set
+ $ranks = $this->cache->obtain_ranks();
+
+ if (isset($ranks['special'][$group_data['group_rank']]))
+ {
+ $rank = $ranks['special'][$group_data['group_rank']];
+
+ $group_rank_data['title'] = $rank['rank_title'];
+
+ $group_rank_data['img_src'] = (!empty($rank['rank_image'])) ? $this->path_helper->update_web_root_path($this->phpbb_root_path . $this->config['ranks_path'] . '/' . $rank['rank_image']) : '';
+
+ /** @html Group rank image element for usage in the template */
+ $group_rank_data['img'] = (!empty($rank['rank_image'])) ? '<img src="' . $group_rank_data['img_src'] . '" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" />' : '';
+ }
+ }
+
+ /**
+ * Modify a group's rank before displaying
+ *
+ * @event core.get_group_rank_after
+ * @var array group_data Array with group's data
+ * @var array group_rank_data Group rank data
+ * @since 3.2.8-RC1
+ */
+
+ $vars = array(
+ 'group_data',
+ 'group_rank_data',
+ );
+ extract($this->dispatcher->trigger_event('core.get_group_rank_after', compact($vars)));
+
+ return $group_rank_data;
+ }
+
+ /**
+ * Get group avatar.
+ * Wrapper function for phpbb_get_group_avatar()
+ *
+ * @param array $group_row Row from the groups table
+ * @param string $alt Optional language string for alt tag within image, can be a language key or text
+ * @param bool $ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
+ * @param bool $lazy If true, will be lazy loaded (requires JS)
+ *
+ * @return string Avatar html
+ */
+ function get_avatar($group_row, $alt = 'GROUP_AVATAR', $ignore_config = false, $lazy = false)
+ {
+ return phpbb_get_group_avatar($group_row, $alt, $ignore_config, $lazy);
+ }
}
diff --git a/phpBB/phpbb/install/helper/config.php b/phpBB/phpbb/install/helper/config.php
index fad6749019..7eb0ae3b05 100644
--- a/phpBB/phpbb/install/helper/config.php
+++ b/phpBB/phpbb/install/helper/config.php
@@ -330,6 +330,8 @@ class config
fwrite($fp, $file_content);
fclose($fp);
+ // Enforce 0600 permission for install config
+ $this->filesystem->chmod([$this->install_config_file], 0600);
}
/**
diff --git a/phpBB/phpbb/message/form.php b/phpBB/phpbb/message/form.php
index 63bada91ff..6573a04f8b 100644
--- a/phpBB/phpbb/message/form.php
+++ b/phpBB/phpbb/message/form.php
@@ -136,7 +136,7 @@ abstract class form
{
if (!check_form_key('memberlist_email'))
{
- $this->errors[] = 'FORM_INVALID';
+ $this->errors[] = $this->user->lang('FORM_INVALID');
}
if (!count($this->errors))
diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php
index eb698fb35d..5a5b8a1874 100644
--- a/phpBB/phpbb/plupload/plupload.php
+++ b/phpBB/phpbb/plupload/plupload.php
@@ -216,38 +216,36 @@ class plupload
}
/**
- * Looks at the list of allowed extensions and generates a string
- * appropriate for use in configuring plupload with
- *
- * @param \phpbb\cache\service $cache
- * @param string $forum_id The ID of the forum
- *
- * @return string
- */
+ * Looks at the list of allowed extensions and generates a string
+ * appropriate for use in configuring plupload with
+ *
+ * @param \phpbb\cache\service $cache Cache service object
+ * @param string $forum_id The forum identifier
+ *
+ * @return string
+ */
public function generate_filter_string(\phpbb\cache\service $cache, $forum_id)
{
+ $groups = [];
+ $filters = [];
+
$attach_extensions = $cache->obtain_attach_extensions($forum_id);
unset($attach_extensions['_allowed_']);
- $groups = array();
// Re-arrange the extension array to $groups[$group_name][]
foreach ($attach_extensions as $extension => $extension_info)
{
- if (!isset($groups[$extension_info['group_name']]))
- {
- $groups[$extension_info['group_name']] = array();
- }
-
- $groups[$extension_info['group_name']][] = $extension;
+ $groups[$extension_info['group_name']]['extensions'][] = $extension;
+ $groups[$extension_info['group_name']]['max_file_size'] = (int) $extension_info['max_filesize'];
}
- $filters = array();
- foreach ($groups as $group => $extensions)
+ foreach ($groups as $group => $group_info)
{
$filters[] = sprintf(
- "{title: '%s', extensions: '%s'}",
+ "{title: '%s', extensions: '%s', max_file_size: %s}",
addslashes(ucfirst(strtolower($group))),
- addslashes(implode(',', $extensions))
+ addslashes(implode(',', $group_info['extensions'])),
+ $group_info['max_file_size']
);
}
@@ -276,22 +274,37 @@ class plupload
}
/**
- * Checks various php.ini values and the maximum file size to determine
- * the maximum size chunks a file can be split up into for upload
- *
- * @return int
- */
+ * Checks various php.ini values to determine the maximum chunk
+ * size a file should be split into for upload.
+ *
+ * The intention is to calculate a value which reflects whatever
+ * the most restrictive limit is set to. And to then set the chunk
+ * size to half that value, to ensure any required transfer overhead
+ * and POST data remains well within the limit. Or, if all of the
+ * limits are set to unlimited, the chunk size will also be unlimited.
+ *
+ * @return int
+ *
+ * @access public
+ */
public function get_chunk_size()
{
- $max = min(
+ $max = 0;
+
+ $limits = [
+ $this->php_ini->getBytes('memory_limit'),
$this->php_ini->getBytes('upload_max_filesize'),
$this->php_ini->getBytes('post_max_size'),
- max(1, $this->php_ini->getBytes('memory_limit')),
- $this->config['max_filesize']
- );
+ ];
+
+ foreach ($limits as $limit_type)
+ {
+ if ($limit_type > 0)
+ {
+ $max = ($max !== 0) ? min($limit_type, $max) : $limit_type;
+ }
+ }
- // Use half of the maximum possible to leave plenty of room for other
- // POST data.
return floor($max / 2);
}
diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php
index 137ed7433d..1105d0892f 100644
--- a/phpBB/phpbb/search/fulltext_mysql.php
+++ b/phpBB/phpbb/search/fulltext_mysql.php
@@ -188,7 +188,7 @@ class fulltext_mysql extends \phpbb\search\base
}
$sql = 'SHOW VARIABLES
- LIKE \'ft\_%\'';
+ LIKE \'%ft\_%\'';
$result = $this->db->sql_query($sql);
$mysql_info = array();
@@ -198,8 +198,16 @@ class fulltext_mysql extends \phpbb\search\base
}
$this->db->sql_freeresult($result);
- $this->config->set('fulltext_mysql_max_word_len', $mysql_info['ft_max_word_len']);
- $this->config->set('fulltext_mysql_min_word_len', $mysql_info['ft_min_word_len']);
+ if ($engine === 'MyISAM')
+ {
+ $this->config->set('fulltext_mysql_max_word_len', $mysql_info['ft_max_word_len']);
+ $this->config->set('fulltext_mysql_min_word_len', $mysql_info['ft_min_word_len']);
+ }
+ else if ($engine === 'InnoDB')
+ {
+ $this->config->set('fulltext_mysql_max_word_len', $mysql_info['innodb_ft_max_token_size']);
+ $this->config->set('fulltext_mysql_min_word_len', $mysql_info['innodb_ft_min_token_size']);
+ }
return false;
}
diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php
index 4172e2cc4f..c83de75eed 100644
--- a/phpBB/phpbb/search/fulltext_native.php
+++ b/phpBB/phpbb/search/fulltext_native.php
@@ -190,7 +190,7 @@ class fulltext_native extends \phpbb\search\base
*/
public function split_keywords($keywords, $terms)
{
- $tokens = '+-|()*';
+ $tokens = '+-|()* ';
$keywords = trim($this->cleanup($keywords, $tokens));
@@ -224,12 +224,10 @@ class fulltext_native extends \phpbb\search\base
$keywords[$i] = '|';
break;
case '*':
- if ($i === 0 || ($keywords[$i - 1] !== '*' && strcspn($keywords[$i - 1], $tokens) === 0))
+ // $i can never be 0 here since $open_bracket is initialised to false
+ if (strpos($tokens, $keywords[$i - 1]) !== false && ($i + 1 === $n || strpos($tokens, $keywords[$i + 1]) !== false))
{
- if ($i === $n - 1 || ($keywords[$i + 1] !== '*' && strcspn($keywords[$i + 1], $tokens) === 0))
- {
- $keywords = substr($keywords, 0, $i) . substr($keywords, $i + 1);
- }
+ $keywords[$i] = '|';
}
break;
}
@@ -264,7 +262,7 @@ class fulltext_native extends \phpbb\search\base
}
}
- if ($open_bracket)
+ if ($open_bracket !== false)
{
$keywords .= ')';
}
@@ -307,6 +305,20 @@ class fulltext_native extends \phpbb\search\base
}
}
+ // Remove non trailing wildcards from each word to prevent a full table scan (it's now using the database index)
+ $match = '#\*(?!$|\s)#';
+ $replace = '$1';
+ $keywords = preg_replace($match, $replace, $keywords);
+
+ // Only allow one wildcard in the search query to limit the database load
+ $match = '#\*#';
+ $replace = '$1';
+ $count_wildcards = substr_count($keywords, '*');
+
+ // Reverse the string to remove all wildcards except the first one
+ $keywords = strrev(preg_replace($match, $replace, strrev($keywords), $count_wildcards - 1));
+ unset($count_wildcards);
+
// set the search_query which is shown to the user
$this->search_query = $keywords;
@@ -409,8 +421,16 @@ class fulltext_native extends \phpbb\search\base
{
if (strpos($word_part, '*') !== false)
{
- $id_words[] = '\'' . $this->db->sql_escape(str_replace('*', '%', $word_part)) . '\'';
- $non_common_words[] = $word_part;
+ $len = utf8_strlen(str_replace('*', '', $word_part));
+ if ($len >= $this->word_length['min'] && $len <= $this->word_length['max'])
+ {
+ $id_words[] = '\'' . $this->db->sql_escape(str_replace('*', '%', $word_part)) . '\'';
+ $non_common_words[] = $word_part;
+ }
+ else
+ {
+ $this->common_words[] = $word_part;
+ }
}
else if (isset($words[$word_part]))
{
diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php
index 2c2eb84dc7..e4617903c2 100644
--- a/phpBB/phpbb/search/fulltext_sphinx.php
+++ b/phpBB/phpbb/search/fulltext_sphinx.php
@@ -644,7 +644,7 @@ class fulltext_sphinx
$this->sphinx->SetFilter('deleted', array(0));
- $this->sphinx->SetLimits((int) $start, (int) $per_page, SPHINX_MAX_MATCHES);
+ $this->sphinx->SetLimits((int) $start, (int) $per_page, max(SPHINX_MAX_MATCHES, (int) $start + $per_page));
$result = $this->sphinx->Query($search_query_prefix . $this->sphinx->EscapeString(str_replace('&quot;', '"', $this->search_query)), $this->indexes);
// Could be connection to localhost:9312 failed (errno=111,
@@ -675,7 +675,7 @@ class fulltext_sphinx
{
$start = floor(($result_count - 1) / $per_page) * $per_page;
- $this->sphinx->SetLimits((int) $start, (int) $per_page, SPHINX_MAX_MATCHES);
+ $this->sphinx->SetLimits((int) $start, (int) $per_page, max(SPHINX_MAX_MATCHES, (int) $start + $per_page));
$result = $this->sphinx->Query($search_query_prefix . $this->sphinx->EscapeString(str_replace('&quot;', '"', $this->search_query)), $this->indexes);
// Could be connection to localhost:9312 failed (errno=111,
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index 80934dc411..cc5a1b8f8f 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -1077,7 +1077,7 @@ class session
*/
function set_cookie($name, $cookiedata, $cookietime, $httponly = true)
{
- global $config;
+ global $config, $phpbb_dispatcher;
// If headers are already set, we just return
if (headers_sent())
@@ -1085,6 +1085,32 @@ class session
return;
}
+ $disable_cookie = false;
+ /**
+ * Event to modify or disable setting cookies
+ *
+ * @event core.set_cookie
+ * @var bool disable_cookie Set to true to disable setting this cookie
+ * @var string name Name of the cookie
+ * @var string cookiedata The data to hold within the cookie
+ * @var int cookietime The expiration time as UNIX timestamp
+ * @var bool httponly Use HttpOnly?
+ * @since 3.2.9-RC1
+ */
+ $vars = array(
+ 'disable_cookie',
+ 'name',
+ 'cookiedata',
+ 'cookietime',
+ 'httponly',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.set_cookie', compact($vars)));
+
+ if ($disable_cookie)
+ {
+ return;
+ }
+
$name_data = rawurlencode($config['cookie_name'] . '_' . $name) . '=' . rawurlencode($cookiedata);
$expire = gmdate('D, d-M-Y H:i:s \\G\\M\\T', $cookietime);
$domain = (!$config['cookie_domain'] || $config['cookie_domain'] == '127.0.0.1' || strpos($config['cookie_domain'], '.') === false) ? '' : '; domain=' . $config['cookie_domain'];
@@ -1299,7 +1325,12 @@ class session
trigger_error($message);
}
- return ($banned && $ban_row['ban_give_reason']) ? $ban_row['ban_give_reason'] : $banned;
+ if (!empty($ban_row))
+ {
+ $ban_row['ban_triggered_by'] = $ban_triggered_by;
+ }
+
+ return ($banned && $ban_row) ? $ban_row : $banned;
}
/**
diff --git a/phpBB/phpbb/textformatter/s9e/bbcode_merger.php b/phpBB/phpbb/textformatter/s9e/bbcode_merger.php
index a05ca3c2b8..264eb93782 100644
--- a/phpBB/phpbb/textformatter/s9e/bbcode_merger.php
+++ b/phpBB/phpbb/textformatter/s9e/bbcode_merger.php
@@ -50,7 +50,7 @@ class bbcode_merger
$with = $this->create_bbcode($with);
// Select the appropriate strategy for merging this BBCode
- if ($this->is_content_bbcode($without, $with))
+ if (!$this->is_optional_bbcode($without, $with) && $this->is_content_bbcode($without, $with))
{
$merged = $this->merge_content_bbcode($without, $with);
}
@@ -107,12 +107,12 @@ class bbcode_merger
/**
* Test whether the two definitions form a "content"-style BBCode
*
- * Such BBCodes include the [URL] BBCode, which uses its text content as
+ * Such BBCodes include the [url] BBCode, which uses its text content as
* attribute if none is provided
*
* @param array $without BBCode definition without an attribute
* @param array $with BBCode definition with an attribute
- * @return array Merged definition
+ * @return bool
*/
protected function is_content_bbcode(array $without, array $with)
{
@@ -123,6 +123,22 @@ class bbcode_merger
}
/**
+ * Test whether the two definitions form BBCode with an optional attribute
+ *
+ * @param array $without BBCode definition without an attribute
+ * @param array $with BBCode definition with an attribute
+ * @return bool
+ */
+ protected function is_optional_bbcode(array $without, array $with)
+ {
+ // Remove the default attribute from the definition
+ $with['usage'] = preg_replace('(=[^\\]]++)', '', $with['usage']);
+
+ // Test whether both definitions are the same, regardless of case
+ return strcasecmp($without['usage'], $with['usage']) === 0;
+ }
+
+ /**
* Merge the two BBCode definitions of a "content"-style BBCode
*
* @param array $without BBCode definition without an attribute
@@ -131,7 +147,7 @@ class bbcode_merger
*/
protected function merge_content_bbcode(array $without, array $with)
{
- // Convert [X={X}] into [X={X;useContent}]
+ // Convert [x={X}] into [x={X;useContent}]
$usage = preg_replace('(\\})', ';useContent}', $with['usage'], 1);
// Use the template from the definition that uses an attribute
@@ -143,7 +159,7 @@ class bbcode_merger
/**
* Merge the two BBCode definitions of a BBCode with an optional argument
*
- * Such BBCodes include the [QUOTE] BBCode, which takes an optional argument
+ * Such BBCodes include the [quote] BBCode, which takes an optional argument
* but otherwise does not behave differently
*
* @param array $without BBCode definition without an attribute
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php
index 6191b9a315..f82c7b0771 100644
--- a/phpBB/phpbb/textformatter/s9e/factory.php
+++ b/phpBB/phpbb/textformatter/s9e/factory.php
@@ -89,6 +89,8 @@ class factory implements \phpbb\textformatter\cache_interface
author={TEXT1;optional}
post_id={UINT;optional}
post_url={URL;optional;postFilter=#false}
+ msg_id={UINT;optional}
+ msg_url={URL;optional;postFilter=#false}
profile_url={URL;optional;postFilter=#false}
time={UINT;optional}
url={URL;optional}
@@ -110,7 +112,7 @@ class factory implements \phpbb\textformatter\cache_interface
'i' => '<span style="font-style: italic"><xsl:apply-templates/></span>',
'u' => '<span style="text-decoration: underline"><xsl:apply-templates/></span>',
'img' => '<img src="{IMAGEURL}" class="postimage" alt="{L_IMAGE}"/>',
- 'size' => '<span style="font-size: {FONTSIZE}%; line-height: normal"><xsl:apply-templates/></span>',
+ 'size' => '<span><xsl:attribute name="style"><xsl:text>font-size: </xsl:text><xsl:value-of select="substring(@size, 1, 4)"/><xsl:text>%; line-height: normal</xsl:text></xsl:attribute><xsl:apply-templates/></span>',
'color' => '<span style="color: {COLOR}"><xsl:apply-templates/></span>',
'email' => '<a>
<xsl:attribute name="href">
diff --git a/phpBB/phpbb/textformatter/s9e/link_helper.php b/phpBB/phpbb/textformatter/s9e/link_helper.php
index 1e113b6449..1cd5dd2fa7 100644
--- a/phpBB/phpbb/textformatter/s9e/link_helper.php
+++ b/phpBB/phpbb/textformatter/s9e/link_helper.php
@@ -60,8 +60,10 @@ class link_helper
$length = $end - $start;
$text = substr($parser->getText(), $start, $length);
- // Create a tag that consumes the link's text
- $parser->addSelfClosingTag('LINK_TEXT', $start, $length)->setAttribute('text', $text);
+ // Create a tag that consumes the link's text and make it depends on this tag
+ $link_text_tag = $parser->addSelfClosingTag('LINK_TEXT', $start, $length, 10);
+ $link_text_tag->setAttribute('text', $text);
+ $tag->cascadeInvalidationTo($link_text_tag);
}
/**
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php
index 3698dca224..f7e4668980 100644
--- a/phpBB/phpbb/textformatter/s9e/parser.php
+++ b/phpBB/phpbb/textformatter/s9e/parser.php
@@ -15,6 +15,7 @@ namespace phpbb\textformatter\s9e;
use s9e\TextFormatter\Parser\AttributeFilters\UrlFilter;
use s9e\TextFormatter\Parser\Logger;
+use s9e\TextFormatter\Parser\Tag;
/**
* s9e\TextFormatter\Parser adapter
@@ -219,7 +220,7 @@ class parser implements \phpbb\textformatter\parser_interface
{
$errors[] = array($msg, $context['max_' . strtolower($m[1])]);
}
- else if ($msg === 'Tag is disabled')
+ else if ($msg === 'Tag is disabled' && $this->is_a_bbcode($context['tag']))
{
$name = strtolower($context['tag']->getName());
$errors[] = array('UNAUTHORISED_BBCODE', '[' . $name . ']');
@@ -342,7 +343,7 @@ class parser implements \phpbb\textformatter\parser_interface
return false;
}
- if ($size < 1)
+ if ($size < 1 || !is_numeric($size))
{
return false;
}
@@ -396,4 +397,21 @@ class parser implements \phpbb\textformatter\parser_interface
return $url;
}
+
+ /**
+ * Test whether given tag consumes text that looks like BBCode-styled markup
+ *
+ * @param Tag $tag Original tag
+ * @return bool
+ */
+ protected function is_a_bbcode(Tag $tag)
+ {
+ if ($tag->getLen() < 3)
+ {
+ return false;
+ }
+ $markup = substr($this->parser->getText(), $tag->getPos(), $tag->getLen());
+
+ return (bool) preg_match('(^\\[\\w++.*?\\]$)s', $markup);
+ }
}
diff --git a/phpBB/phpbb/textformatter/s9e/quote_helper.php b/phpBB/phpbb/textformatter/s9e/quote_helper.php
index 86c33c7591..3011ec88dc 100644
--- a/phpBB/phpbb/textformatter/s9e/quote_helper.php
+++ b/phpBB/phpbb/textformatter/s9e/quote_helper.php
@@ -21,6 +21,11 @@ class quote_helper
protected $post_url;
/**
+ * @var string Base URL for a private message link, uses {MSG_ID} as placeholder
+ */
+ protected $msg_url;
+
+ /**
* @var string Base URL for a profile link, uses {USER_ID} as placeholder
*/
protected $profile_url;
@@ -40,6 +45,7 @@ class quote_helper
public function __construct(\phpbb\user $user, $root_path, $php_ext)
{
$this->post_url = append_sid($root_path . 'viewtopic.' . $php_ext, 'p={POST_ID}#p{POST_ID}', false);
+ $this->msg_url = append_sid($root_path . 'ucp.' . $php_ext, 'i=pm&mode=view&p={MSG_ID}', false);
$this->profile_url = append_sid($root_path . 'memberlist.' . $php_ext, 'mode=viewprofile&u={USER_ID}', false);
$this->user = $user;
}
@@ -52,26 +58,26 @@ class quote_helper
*/
public function inject_metadata($xml)
{
- $post_url = $this->post_url;
- $profile_url = $this->profile_url;
- $user = $this->user;
-
return \s9e\TextFormatter\Utils::replaceAttributes(
$xml,
'QUOTE',
- function ($attributes) use ($post_url, $profile_url, $user)
+ function ($attributes)
{
if (isset($attributes['post_id']))
{
- $attributes['post_url'] = str_replace('{POST_ID}', $attributes['post_id'], $post_url);
+ $attributes['post_url'] = str_replace('{POST_ID}', $attributes['post_id'], $this->post_url);
+ }
+ if (isset($attributes['msg_id']))
+ {
+ $attributes['msg_url'] = str_replace('{MSG_ID}', $attributes['msg_id'], $this->msg_url);
}
if (isset($attributes['time']))
{
- $attributes['date'] = $user->format_date($attributes['time']);
+ $attributes['date'] = $this->user->format_date($attributes['time']);
}
if (isset($attributes['user_id']))
{
- $attributes['profile_url'] = str_replace('{USER_ID}', $attributes['user_id'], $profile_url);
+ $attributes['profile_url'] = str_replace('{USER_ID}', $attributes['user_id'], $this->profile_url);
}
return $attributes;
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index 7363290e11..9817e40edb 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -281,9 +281,43 @@ class user extends \phpbb\session
$db->sql_freeresult($result);
}
+ // Fallback to board's default style
if (!$this->style)
{
- trigger_error('NO_STYLE_DATA', E_USER_ERROR);
+ // Verify default style exists in the database
+ $sql = 'SELECT style_id
+ FROM ' . STYLES_TABLE . '
+ WHERE style_id = ' . (int) $config['default_style'];
+ $result = $db->sql_query($sql);
+ $style_id = (int) $db->sql_fetchfield('style_id');
+ $db->sql_freeresult($result);
+
+ if ($style_id > 0)
+ {
+ $db->sql_transaction('begin');
+
+ // Update $user row
+ $sql = 'SELECT *
+ FROM ' . STYLES_TABLE . '
+ WHERE style_id = ' . (int) $config['default_style'];
+ $result = $db->sql_query($sql);
+ $this->style = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Update user style preference
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_style = ' . (int) $style_id . '
+ WHERE user_id = ' . (int) $this->data['user_id'];
+ $db->sql_query($sql);
+
+ $db->sql_transaction('commit');
+ }
+ }
+
+ // This should never happen
+ if (!$this->style)
+ {
+ trigger_error($this->language->lang('NO_STYLE_DATA', $this->data['user_style'], $this->data['user_id']), E_USER_ERROR);
}
// Now parse the cfg file and cache it
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 75085a5635..59616a2858 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -222,6 +222,25 @@ if (!$post_data)
trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST');
}
+/**
+* This event allows you to bypass reply/quote test of an unapproved post.
+*
+* @event core.posting_modify_row_data
+* @var array post_data All post data from database
+* @var string mode What action to take if the form has been submitted
+* post|reply|quote|edit|delete|bump|smilies|popup
+* @var int topic_id ID of the topic
+* @var int forum_id ID of the forum
+* @since 3.2.8-RC1
+*/
+$vars = array(
+ 'post_data',
+ 'mode',
+ 'topic_id',
+ 'forum_id',
+);
+extract($phpbb_dispatcher->trigger_event('core.posting_modify_row_data', compact($vars)));
+
// Not able to reply to unapproved posts/topics
// TODO: add more descriptive language key
if ($auth->acl_get('m_approve', $forum_id) && ((($mode == 'reply' || $mode == 'bump') && $post_data['topic_visibility'] != ITEM_APPROVED) || ($mode == 'quote' && $post_data['post_visibility'] != ITEM_APPROVED)))
@@ -237,12 +256,6 @@ if ($mode == 'popup')
$user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']);
-if ($config['enable_post_confirm'] && !$user->data['is_registered'])
-{
- $captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
- $captcha->init(CONFIRM_POST);
-}
-
// Use post_row values in favor of submitted ones...
$forum_id = (!empty($post_data['forum_id'])) ? (int) $post_data['forum_id'] : (int) $forum_id;
$topic_id = (!empty($post_data['topic_id'])) ? (int) $post_data['topic_id'] : (int) $topic_id;
@@ -408,6 +421,12 @@ if (!$is_authed || !empty($error))
login_box('', $message);
}
+if ($config['enable_post_confirm'] && !$user->data['is_registered'])
+{
+ $captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
+ $captcha->init(CONFIRM_POST);
+}
+
// Is the user able to post within this forum?
if ($post_data['forum_type'] != FORUM_POST && in_array($mode, array('post', 'bump', 'quote', 'reply')))
{
@@ -955,7 +974,10 @@ if ($submit || $preview || $refresh)
}
// Parse Attachments - before checksum is calculated
- $message_parser->parse_attachments('fileupload', $mode, $forum_id, $submit, $preview, $refresh);
+ if ($message_parser->check_attachment_form_token($language, $request, 'posting'))
+ {
+ $message_parser->parse_attachments('fileupload', $mode, $forum_id, $submit, $preview, $refresh);
+ }
/**
* This event allows you to modify message text before parsing
@@ -1159,11 +1181,23 @@ if ($submit || $preview || $refresh)
$error[] = $user->lang['EMPTY_SUBJECT'];
}
- // Check for out-of-bounds characters that are currently
- // not supported by utf8_bin in MySQL
+ /**
+ * Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR.
+ * Using their Numeric Character Reference's Hexadecimal notation.
+ */
+ $post_data['post_subject'] = utf8_encode_ucr($post_data['post_subject']);
+
+ /**
+ * This should never happen again.
+ * Leaving the fallback here just in case there will be the need of it.
+ *
+ * Check for out-of-bounds characters that are currently
+ * not supported by utf8_bin in MySQL
+ */
if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $post_data['post_subject'], $matches))
{
- $character_list = implode('<br />', $matches[0]);
+ $character_list = implode('<br>', $matches[0]);
+
$error[] = $user->lang('UNSUPPORTED_CHARACTERS_SUBJECT', $character_list);
}
@@ -1671,6 +1705,20 @@ if ($generate_quote)
if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh)
{
$post_data['post_subject'] = ((strpos($post_data['post_subject'], 'Re: ') !== 0) ? 'Re: ' : '') . censor_text($post_data['post_subject']);
+
+ $post_subject = $post_data['post_subject'];
+
+ /**
+ * This event allows you to modify the post subject of the post being quoted
+ *
+ * @event core.posting_modify_post_subject
+ * @var string post_subject String with the post subject already censored.
+ * @since 3.2.8-RC1
+ */
+ $vars = array('post_subject');
+ extract($phpbb_dispatcher->trigger_event('core.posting_modify_post_subject', compact($vars)));
+
+ $post_data['post_subject'] = $post_subject;
}
$attachment_data = $message_parser->attachment_data;
diff --git a/phpBB/search.php b/phpBB/search.php
index 97a8f320d4..64f6041371 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -1093,9 +1093,12 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
+ 'FIRST_POST_TIME_RFC3339' => gmdate(DATE_RFC3339, $row['topic_time']),
'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_POST_TIME_RFC3339' => gmdate(DATE_RFC3339, $row['topic_last_post_time']),
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
+ 'LAST_VIEW_TIME_RFC3339' => gmdate(DATE_RFC3339, $row['topic_last_view_time']),
'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
index a588f1e558..8e3ba24aaa 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.5
-phpbb_version = 3.2.5
+style_version = 3.2.8
+phpbb_version = 3.2.8
# Defining a different template bitfield
# template_bitfield = //g=
diff --git a/phpBB/styles/prosilver/template/attachment.html b/phpBB/styles/prosilver/template/attachment.html
index 0978d9189e..615717e026 100644
--- a/phpBB/styles/prosilver/template/attachment.html
+++ b/phpBB/styles/prosilver/template/attachment.html
@@ -8,14 +8,14 @@
<!-- IF _file.S_THUMBNAIL -->
<dl class="thumbnail">
- <dt><a href="{_file.U_DOWNLOAD_LINK}"><img src="{_file.THUMB_IMAGE}" class="postimage" alt="{_file.DOWNLOAD_NAME}" title="{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}" /></a></dt>
+ <dt><a href="{_file.U_DOWNLOAD_LINK}"><img src="{_file.THUMB_IMAGE}" class="postimage" alt="{% if _file.COMMENT %}{{ _file.COMMENT|e('html') }}{% else %}{{ _file.DOWNLOAD_NAME }}{% endif %}" title="{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}" /></a></dt>
<!-- IF _file.COMMENT --><dd> {_file.COMMENT}</dd><!-- ENDIF -->
</dl>
<!-- ENDIF -->
<!-- IF _file.S_IMAGE -->
<dl class="file">
- <dt class="attach-image"><img src="{_file.U_INLINE_LINK}" class="postimage" alt="{_file.DOWNLOAD_NAME}" onclick="viewableArea(this);" /></dt>
+ <dt class="attach-image"><img src="{_file.U_INLINE_LINK}" class="postimage" alt="{% if _file.COMMENT %}{{ _file.COMMENT|e('html') }}{% else %}{{ _file.DOWNLOAD_NAME }}{% endif %}" onclick="viewableArea(this);" /></dt>
<!-- IF _file.COMMENT --><dd><em>{_file.COMMENT}</em></dd><!-- ENDIF -->
<dd>{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/bbcode.html b/phpBB/styles/prosilver/template/bbcode.html
index 940c0ace29..b37ba238d2 100644
--- a/phpBB/styles/prosilver/template/bbcode.html
+++ b/phpBB/styles/prosilver/template/bbcode.html
@@ -37,6 +37,10 @@
<xsl:text> </xsl:text>
<a href="{@post_url}" data-post-id="{@post_id}" onclick="if(document.getElementById(hash.substr(1)))href=hash">&#8593;</a>
</xsl:if>
+ <xsl:if test="@msg_url">
+ <xsl:text> </xsl:text>
+ <a href="{@msg_url}" data-msg-id="{@msg_id}">&#8593;</a>
+ </xsl:if>
<xsl:if test="@date">
<div class="responsive-hide"><xsl:value-of select="@date"/></div>
</xsl:if>
diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html
index 8250a1fd07..4932860f8c 100644
--- a/phpBB/styles/prosilver/template/forumlist_body.html
+++ b/phpBB/styles/prosilver/template/forumlist_body.html
@@ -101,7 +101,7 @@
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span>
</a>
<!-- ENDIF -->
- <br />{forumrow.LAST_POST_TIME}
+ <br /><time datetime="{forumrow.LAST_POST_TIME_RFC3339}">{forumrow.LAST_POST_TIME}</time>
<!-- ELSE -->
{% if forumrow.U_UNAPPROVED_TOPICS %}
{{ lang('TOPIC_UNAPPROVED_FORUM', forumrow.TOPICS) }}
diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html
index b292c40eb2..239a91c580 100644
--- a/phpBB/styles/prosilver/template/index_body.html
+++ b/phpBB/styles/prosilver/template/index_body.html
@@ -29,6 +29,7 @@
<!-- ENDIF -->
<input type="submit" tabindex="5" name="login" value="{L_LOGIN}" class="button2" />
{S_LOGIN_REDIRECT}
+ {S_FORM_TOKEN_LOGIN}
</fieldset>
</form>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html
index ef08035717..dc597af51d 100644
--- a/phpBB/styles/prosilver/template/login_body.html
+++ b/phpBB/styles/prosilver/template/login_body.html
@@ -33,6 +33,7 @@
<!-- ENDIF -->
{S_LOGIN_REDIRECT}
+ {S_FORM_TOKEN_LOGIN}
<dl>
<dt>&nbsp;</dt>
<dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></dd>
diff --git a/phpBB/styles/prosilver/template/login_forum.html b/phpBB/styles/prosilver/template/login_forum.html
index 7fa9736a96..c5c36d4564 100644
--- a/phpBB/styles/prosilver/template/login_forum.html
+++ b/phpBB/styles/prosilver/template/login_forum.html
@@ -25,6 +25,7 @@
<dd><input type="password" tabindex="1" id="password" name="password" size="25" class="inputbox narrow" autocomplete="off" /></dd>
</dl>
{S_LOGIN_REDIRECT}
+ {S_FORM_TOKEN_LOGIN}
<dl>
<dt>&nbsp;</dt>
<dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" id="login" class="button1" value="{L_LOGIN}" tabindex="2" /></dd>
diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html
index f6c518e1df..82df5d5dbe 100644
--- a/phpBB/styles/prosilver/template/mcp_forum.html
+++ b/phpBB/styles/prosilver/template/mcp_forum.html
@@ -86,7 +86,9 @@
<div class="responsive-hide">
<!-- IF topicrow.ATTACH_ICON_IMG --><i class="icon fa-paperclip fa-fw" aria-hidden="true"></i> <!-- ENDIF -->
+ {% EVENT topiclist_row_topic_by_author_before %}
{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ {% EVENT topiclist_row_topic_by_author_after %}
</div>
<!-- EVENT topiclist_row_append -->
</div>
diff --git a/phpBB/styles/prosilver/template/mcp_move.html b/phpBB/styles/prosilver/template/mcp_move.html
index 45a9ae83bc..63197ef274 100644
--- a/phpBB/styles/prosilver/template/mcp_move.html
+++ b/phpBB/styles/prosilver/template/mcp_move.html
@@ -43,12 +43,14 @@
<!-- IF ADDITIONAL_MSG --><p>{ADDITIONAL_MSG}</p><!-- ENDIF -->
<fieldset>
+ {% EVENT mcp_move_destination_forum_before %}
<dl class="fields2">
<dt><label>{L_SELECT_DESTINATION_FORUM}{L_COLON}</label></dt>
<dd><select name="to_forum_id">{S_FORUM_SELECT}</select></dd>
<!-- IF S_CAN_LEAVE_SHADOW --><dd><label for="move_leave_shadow"><input type="checkbox" name="move_leave_shadow" id="move_leave_shadow" />{L_LEAVE_SHADOW}</label></dd><!-- ENDIF -->
<!-- IF S_CAN_LOCK_TOPIC --><dd><label for="move_lock_topics"><input type="checkbox" name="move_lock_topics" id="move_lock_topics" />{L_LOCK_TOPIC}</label></dd><!-- ENDIF -->
</dl>
+ {% EVENT mcp_move_destination_forum_after %}
<dl class="fields2">
<dt>&nbsp;</dt>
<dd><strong>{MESSAGE_TEXT}</strong></dd>
diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html
index b56ed188c1..889cab8b83 100644
--- a/phpBB/styles/prosilver/template/mcp_topic.html
+++ b/phpBB/styles/prosilver/template/mcp_topic.html
@@ -118,9 +118,9 @@
<!-- EVENT mcp_topic_postrow_post_details_before -->
<p class="author">
- <a href="#pr{postrow.POST_ID}" title="{postrow.MINI_POST}">
+ <a href="{postrow.U_MINI_POST}" title="{postrow.MINI_POST}">
<i class="icon fa-file fa-fw icon-lightgray icon-tiny" aria-hidden="true"></i><span class="sr-only">{postrow.MINI_POST}</span>
- </a> {L_POSTED} {postrow.POST_DATE} {L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong><!-- IF postrow.U_MCP_DETAILS --> [ <a href="{postrow.U_MCP_DETAILS}">{L_POST_DETAILS}</a> ]<!-- ENDIF -->
+ </a> {L_POSTED} {postrow.POST_DATE} {L_POST_BY_AUTHOR} {% EVENT mcp_topic_post_author_full_prepend %}<strong>{postrow.POST_AUTHOR_FULL}</strong>{% EVENT mcp_topic_post_author_full_append %}<!-- IF postrow.U_MCP_DETAILS --> [ <a href="{postrow.U_MCP_DETAILS}">{L_POST_DETAILS}</a> ]<!-- ENDIF -->
</p>
<!-- EVENT mcp_topic_postrow_post_details_after -->
diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html
index 5f03ad99cc..b8ff092372 100644
--- a/phpBB/styles/prosilver/template/memberlist_body.html
+++ b/phpBB/styles/prosilver/template/memberlist_body.html
@@ -28,8 +28,13 @@
<p>
<!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ENDIF -->
{% EVENT memberlist_body_group_rank_before %}
- <!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF -->
- <!-- IF GROUP_RANK -->{GROUP_RANK}<!-- ENDIF -->
+ {% if RANK_IMG %}{{ RANK_IMG }}{% endif %}
+ {% if GROUP_RANK %}
+ {% if not RANK_IMG %}
+ {{ lang('GROUP_RANK') ~ lang('COLON') }}
+ {% endif %}
+ {{ GROUP_RANK }}
+ {% endif %}
{% EVENT memberlist_body_group_rank_after %}
</p>
<!-- ELSE -->
@@ -120,7 +125,13 @@
<tr class="<!-- IF memberrow.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF memberrow.S_INACTIVE --> inactive<!-- ENDIF -->">
<td><span class="rank-img"><!-- EVENT memberlist_body_rank_prepend --><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --><!-- EVENT memberlist_body_rank_append --></span><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><input type="checkbox" name="user" value="{memberrow.USERNAME}" /> <!-- ENDIF --><!-- EVENT memberlist_body_username_prepend -->{memberrow.USERNAME_FULL}<!-- IF memberrow.S_INACTIVE --> ({L_INACTIVE})<!-- ENDIF --><!-- EVENT memberlist_body_username_append --><!-- IF S_IN_SEARCH_POPUP --><br />[&nbsp;<a href="#" onclick="insert_single_user('#results', '{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a>&nbsp;]<!-- ENDIF --></td>
<td class="posts"><!-- IF memberrow.POSTS and S_DISPLAY_SEARCH --><a href="{memberrow.U_SEARCH_USER}" title="{L_SEARCH_USER_POSTS}">{memberrow.POSTS}</a><!-- ELSE -->{memberrow.POSTS}<!-- ENDIF --></td>
- <td class="info"><!-- BEGIN custom_fields --><div>{memberrow.custom_fields.PROFILE_FIELD_VALUE}</div><!-- BEGINELSE -->&nbsp;<!-- END custom_fields --></td>
+ <td class="info">
+ {%- for field in memberrow.custom_fields -%}
+ <div>{% if field.S_PROFILE_CONTACT %}<a href="{{ field.PROFILE_FIELD_CONTACT }}">{% endif %}{{ field.PROFILE_FIELD_VALUE }}{% if field.S_PROFILE_CONTACT %}</a>{% endif %}</div>
+ {%- else -%}
+ &nbsp;
+ {%- endfor -%}
+ </td>
<td>{memberrow.JOINED}</td>
<!-- IF S_VIEWONLINE --><td>{memberrow.LAST_ACTIVE}&nbsp;</td><!-- ENDIF -->
{% EVENT memberlist_body_memberrow_after %}
diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html
index dc29285922..77f5dae0c0 100644
--- a/phpBB/styles/prosilver/template/navbar_header.html
+++ b/phpBB/styles/prosilver/template/navbar_header.html
@@ -160,7 +160,7 @@
</li>
<!-- ENDIF -->
<!-- EVENT navbar_header_user_profile_append -->
- <!-- ELSE -->
+ <!-- ELSE IF not S_IS_BOT -->
<li class="rightside" data-skip-responsive="true">
<a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">
<i class="icon fa-power-off fa-fw" aria-hidden="true"></i><span>{L_LOGIN_LOGOUT}</span>
@@ -183,14 +183,14 @@
<!-- EVENT overall_header_breadcrumbs_before -->
<li class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
<!-- IF U_SITE_HOME -->
- <span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" itemtype="https://schema.org/Thing" itemprop="item" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="name">{L_SITE_HOME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
+ <span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" itemtype="https://schema.org/Thing" itemscope itemprop="item" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="name">{L_SITE_HOME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
<!-- ENDIF -->
<!-- EVENT overall_header_breadcrumb_prepend -->
- <span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemtype="https://schema.org/Thing" itemprop="item" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="name">{L_INDEX}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
+ <span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemtype="https://schema.org/Thing" itemscope itemprop="item" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="name">{L_INDEX}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
<!-- BEGIN navlinks -->
<!-- EVENT overall_header_navlink_prepend -->
- <span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{navlinks.U_VIEW_FORUM}" itemtype="https://schema.org/Thing" itemprop="item"><span itemprop="name">{navlinks.FORUM_NAME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
+ <span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{navlinks.U_VIEW_FORUM}" itemtype="https://schema.org/Thing" itemscope itemprop="item"><span itemprop="name">{navlinks.FORUM_NAME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
<!-- EVENT overall_header_navlink_append -->
<!-- END navlinks -->
<!-- EVENT overall_header_breadcrumb_append -->
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index bdff1a0c05..cd245decc4 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -17,7 +17,7 @@
</p>
<!-- ENDIF -->
<!-- EVENT overall_footer_copyright_append -->
- <p class="footer-row">
+ <p class="footer-row" role="menu">
<a class="footer-link" href="{{ U_PRIVACY }}" title="{{ lang('PRIVACY_LINK') }}" role="menuitem">
<span class="footer-link-text">{{ lang('PRIVACY_LINK') }}</span>
</a>
diff --git a/phpBB/styles/prosilver/template/plupload.html b/phpBB/styles/prosilver/template/plupload.html
index 1eb84372e8..9425b7d769 100644
--- a/phpBB/styles/prosilver/template/plupload.html
+++ b/phpBB/styles/prosilver/template/plupload.html
@@ -45,7 +45,14 @@ phpbb.plupload = {
max_file_size: '{FILESIZE}b',
chunk_size: '{CHUNK_SIZE}b',
unique_names: true,
- filters: [{FILTERS}],
+ filters: {
+ mime_types: [
+ {FILTERS}
+ ],
+ mime_types_max_file_size: [
+ {FILTERS}
+ ],
+ },
{S_RESIZE}
headers: {'X-PHPBB-USING-PLUPLOAD': '1', 'X-Requested-With': 'XMLHttpRequest'},
file_data_name: 'fileupload',
@@ -57,6 +64,7 @@ phpbb.plupload = {
lang: {
ERROR: '{LA_ERROR}',
TOO_MANY_ATTACHMENTS: '{LA_TOO_MANY_ATTACHMENTS}',
+ FORM_INVALID: '{LA_FORM_INVALID}',
},
order: '{ATTACH_ORDER}',
maxFiles: {MAX_ATTACHMENTS},
diff --git a/phpBB/styles/prosilver/template/posting_attach_body.html b/phpBB/styles/prosilver/template/posting_attach_body.html
index b46e9c9175..ff5bfe1b55 100644
--- a/phpBB/styles/prosilver/template/posting_attach_body.html
+++ b/phpBB/styles/prosilver/template/posting_attach_body.html
@@ -34,7 +34,7 @@
</tr>
</thead>
<tbody class="responsive-skip-empty file-list" id="file-list">
- <tr class="attach-row" id="attach-row-tpl">
+ <tr class="attach-row attach-row-tpl" id="attach-row-tpl">
<td class="attach-name">
<span class="file-name ellipsis-text"></span>
<span class="attach-controls">
diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html
index 122afdf978..cb305eee4b 100644
--- a/phpBB/styles/prosilver/template/posting_buttons.html
+++ b/phpBB/styles/prosilver/template/posting_buttons.html
@@ -10,27 +10,6 @@
var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
var imageTag = false;
- // Helpline messages
- var help_line = {
- b: '{LA_BBCODE_B_HELP}',
- i: '{LA_BBCODE_I_HELP}',
- u: '{LA_BBCODE_U_HELP}',
- q: '{LA_BBCODE_Q_HELP}',
- c: '{LA_BBCODE_C_HELP}',
- l: '{LA_BBCODE_L_HELP}',
- o: '{LA_BBCODE_O_HELP}',
- p: '{LA_BBCODE_P_HELP}',
- w: '{LA_BBCODE_W_HELP}',
- a: '{LA_BBCODE_A_HELP}',
- s: '{LA_BBCODE_S_HELP}',
- f: '{LA_BBCODE_F_HELP}',
- y: '{LA_BBCODE_Y_HELP}',
- d: '{LA_BBCODE_D_HELP}'
- <!-- BEGIN custom_tags -->
- ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
- <!-- END custom_tags -->
- }
-
function change_palette()
{
phpbb.toggleDisplay('colour_palette');
@@ -117,7 +96,7 @@
<!-- EVENT posting_editor_buttons_custom_tags_before -->
<!-- BEGIN custom_tags -->
- <button type="button" class="button button-secondary bbcode-{custom_tags.BBCODE_TAG_CLEAN}" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}">
+ <button type="button" class="button button-secondary bbcode-{custom_tags.BBCODE_TAG_CLEAN}" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{{ custom_tags.BBCODE_HELPLINE|e('html_attr') }}">
{custom_tags.BBCODE_TAG}
</button>
<!-- END custom_tags -->
diff --git a/phpBB/styles/prosilver/template/posting_poll_body.html b/phpBB/styles/prosilver/template/posting_poll_body.html
index ee7100aded..795649650d 100644
--- a/phpBB/styles/prosilver/template/posting_poll_body.html
+++ b/phpBB/styles/prosilver/template/posting_poll_body.html
@@ -15,8 +15,8 @@
<!-- IF S_SHOW_POLL_BOX -->
<dl>
- <dt><label for="poll_title">{L_POLL_QUESTION}{L_COLON}</label></dt>
- <dd><input type="text" name="poll_title" id="poll_title" maxlength="255" value="{POLL_TITLE}" class="inputbox" /></dd>
+ <dt><label for="poll_title">{{ lang('POLL_QUESTION') ~ lang('COLON') }}</label></dt>
+ <dd><input type="text" name="poll_title" id="poll_title" maxlength="100" value="{{ POLL_TITLE }}" class="inputbox" /></dd>
</dl>
<dl>
<dt><label for="poll_option_text">{L_POLL_OPTIONS}{L_COLON}</label><br /><span>{L_POLL_OPTIONS_EXPLAIN}</span></dt>
diff --git a/phpBB/styles/prosilver/template/posting_review.html b/phpBB/styles/prosilver/template/posting_review.html
index 1304046b23..e5d285e7bf 100644
--- a/phpBB/styles/prosilver/template/posting_review.html
+++ b/phpBB/styles/prosilver/template/posting_review.html
@@ -13,7 +13,7 @@
<!-- ENDIF -->
<div class="postbody" id="ppr{post_review_row.POST_ID}">
- <h3><a href="#ppr{post_review_row.POST_ID}">{post_review_row.POST_SUBJECT}</a></h3>
+ <h3><a href="{post_review_row.U_MINI_POST}">{post_review_row.POST_SUBJECT}</a></h3>
<p class="author">
<!-- IF S_IS_BOT -->
<span><i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{post_review_row.MINI_POST}</span></span>
@@ -22,7 +22,7 @@
<i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{post_review_row.MINI_POST}</span>
</a>
<!-- ENDIF -->
- {L_POST_BY_AUTHOR}<strong> {post_review_row.POST_AUTHOR_FULL}</strong> &raquo; {post_review_row.POST_DATE}
+ {L_POST_BY_AUTHOR} <!-- EVENT posting_review_row_post_author_username_prepend --><strong>{post_review_row.POST_AUTHOR_FULL}</strong><!-- EVENT posting_review_row_post_author_username_append --> &raquo; {post_review_row.POST_DATE}
</p>
<div class="content">{post_review_row.MESSAGE}</div>
diff --git a/phpBB/styles/prosilver/template/posting_topic_review.html b/phpBB/styles/prosilver/template/posting_topic_review.html
index 93c4484ff8..209dadf327 100644
--- a/phpBB/styles/prosilver/template/posting_topic_review.html
+++ b/phpBB/styles/prosilver/template/posting_topic_review.html
@@ -24,7 +24,7 @@
<!-- ENDIF -->
<div class="postbody" id="pr{topic_review_row.POST_ID}">
- <h3><a href="#pr{topic_review_row.POST_ID}">{topic_review_row.POST_SUBJECT}</a></h3>
+ <h3><a href="{topic_review_row.U_MINI_POST}">{topic_review_row.POST_SUBJECT}</a></h3>
<!-- IF (topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE) or topic_review_row.U_MCP_DETAILS -->
<ul class="post-buttons">
@@ -54,7 +54,7 @@
<i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{topic_review_row.MINI_POST}</span>
</a>
<!-- ENDIF -->
- {L_POST_BY_AUTHOR} <strong>{topic_review_row.POST_AUTHOR_FULL}</strong> &raquo; {topic_review_row.POST_DATE}
+ {L_POST_BY_AUTHOR} <!-- EVENT posting_topic_review_row_post_author_username_prepend --><strong>{topic_review_row.POST_AUTHOR_FULL}</strong><!-- EVENT posting_topic_review_row_post_author_username_append --> &raquo; {topic_review_row.POST_DATE}
</p>
<!-- EVENT posting_topic_review_row_post_details_after -->
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html
index d4dc6aa97e..9ee13a4224 100644
--- a/phpBB/styles/prosilver/template/search_results.html
+++ b/phpBB/styles/prosilver/template/search_results.html
@@ -108,7 +108,7 @@
<!-- IF not S_IS_BOT -->
<div class="responsive-show" style="display: none;">
- {L_LAST_POST} {L_POST_BY_AUTHOR} <!-- EVENT search_results_last_post_author_username_prepend -->{searchresults.LAST_POST_AUTHOR_FULL}<!-- EVENT search_results_last_post_author_username_append --> &laquo; <a href="{searchresults.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{searchresults.LAST_POST_TIME}</a>
+ {L_LAST_POST} {L_POST_BY_AUTHOR} <!-- EVENT search_results_last_post_author_username_prepend -->{searchresults.LAST_POST_AUTHOR_FULL}<!-- EVENT search_results_last_post_author_username_append --> &laquo; <a href="{searchresults.U_LAST_POST}" title="{L_GOTO_LAST_POST}"><time datetime="{searchresults.LAST_POST_TIME_RFC3339}">{searchresults.LAST_POST_TIME}</time></a>
<br />{L_POSTED} {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
</div>
<!-- IF searchresults.TOPIC_REPLIES --><span class="responsive-show left-box" style="display: none;">{L_REPLIES}{L_COLON} <strong>{searchresults.TOPIC_REPLIES}</strong></span><!-- ENDIF -->
@@ -117,7 +117,9 @@
<div class="responsive-hide left-box">
<!-- IF searchresults.S_HAS_POLL --><i class="icon fa-bar-chart fa-fw" aria-hidden="true"></i><!-- ENDIF -->
<!-- IF searchresults.ATTACH_ICON_IMG --><i class="icon fa-paperclip fa-fw" aria-hidden="true"></i><!-- ENDIF -->
- {L_POST_BY_AUTHOR} <!-- EVENT search_results_topic_author_username_prepend -->{searchresults.TOPIC_AUTHOR_FULL}<!-- EVENT search_results_topic_author_username_append --> &raquo; {searchresults.FIRST_POST_TIME} &raquo; {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
+ {% EVENT topiclist_row_topic_by_author_before %}
+ {L_POST_BY_AUTHOR} <!-- EVENT search_results_topic_author_username_prepend -->{searchresults.TOPIC_AUTHOR_FULL}<!-- EVENT search_results_topic_author_username_append --> &raquo; <time datetime="{searchresults.FIRST_POST_TIME_RFC3339}">{searchresults.FIRST_POST_TIME}</time> &raquo; {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
+ {% EVENT topiclist_row_topic_by_author_after %}
</div>
<!-- IF .searchresults.pagination -->
@@ -148,7 +150,7 @@
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
</a>
<!-- ENDIF -->
- <br />{searchresults.LAST_POST_TIME}
+ <br /><time datetime="{searchresults.LAST_POST_TIME_RFC3339}">{searchresults.LAST_POST_TIME}</time>
</span>
</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_agreement.html b/phpBB/styles/prosilver/template/ucp_agreement.html
index ace65254d7..7959925d30 100644
--- a/phpBB/styles/prosilver/template/ucp_agreement.html
+++ b/phpBB/styles/prosilver/template/ucp_agreement.html
@@ -43,7 +43,8 @@
<div class="inner">
<fieldset class="submit-buttons">
<!-- IF S_SHOW_COPPA -->
- <strong><a href="{U_COPPA_NO}" class="button1">{L_COPPA_NO}</a></strong>&nbsp; <a href="{U_COPPA_YES}" class="button2">{L_COPPA_YES}</a>
+ <input type="submit" name="coppa_no" id="coppa_no" value="{{ L_COPPA_NO }}" class="button1" />
+ <input type="submit" name="coppa_yes" id="coppa_yes" value="{{ L_COPPA_YES }}" class="button2" />
<!-- ELSE -->
<input type="submit" name="agreed" id="agreed" value="{L_AGREE}" class="button1" />&nbsp;
<input type="submit" name="not_agreed" value="{L_NOT_AGREE}" class="button2" />
@@ -62,8 +63,6 @@
<div class="content">
<h2 class="sitename-title">{SITENAME} - {AGREEMENT_TITLE}</h2>
<p>{AGREEMENT_TEXT}</p>
- <hr class="dashed" />
- <p><a href="{U_BACK}" class="button2">{L_BACK}</a></p>
</div>
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html
index 696f621116..cfdbf9c7ea 100644
--- a/phpBB/styles/prosilver/template/ucp_attachments.html
+++ b/phpBB/styles/prosilver/template/ucp_attachments.html
@@ -44,7 +44,7 @@
</dt>
<dd class="extra">{attachrow.DOWNLOAD_COUNT}</dd>
<dd class="time"><span>{attachrow.POST_TIME}</span></dd>
- <dd class="mark"><input type="checkbox" name="attachment[{attachrow.ATTACH_ID}]" value="1" /></dd>
+ <dd class="mark"><input type="checkbox" name="attachment[{attachrow.ATTACH_ID}]" value="1"{% if attachrow.S_LOCKED %} disabled title="{{ lang('ATTACHMENT_LOCKED') }}"{% endif %} /></dd>
</dl>
</li>
<!-- END attachrow -->
diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html
index 6362a0b824..b53eb0c7ec 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_history.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_history.html
@@ -36,7 +36,7 @@
<p class="author">
<span><i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{history_row.MINI_POST}</span></span> {L_SENT_AT}{L_COLON} <strong>{history_row.SENT_DATE}</strong>
<br />
- {L_MESSAGE_BY_AUTHOR} {history_row.MESSAGE_AUTHOR_FULL}
+ {L_MESSAGE_BY_AUTHOR} <!-- EVENT ucp_pm_history_row_message_author_username_prepend -->{history_row.MESSAGE_AUTHOR_FULL}<!-- EVENT ucp_pm_history_row_message_author_username_append -->
</p>
<div class="content"><!-- IF history_row.MESSAGE -->{history_row.MESSAGE}<!-- ELSE --><span class="error">{L_MESSAGE_REMOVED_FROM_OUTBOX}</span><!-- ENDIF --></div>
<div id="message_{history_row.MSG_ID}" style="display: none;">{history_row.DECODED_MESSAGE}</div>
@@ -54,4 +54,3 @@
<i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i><span>{L_BACK_TO_TOP}</span>
</a>
</p>
-
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
index 7a8849258a..41ff5b898a 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
@@ -42,7 +42,14 @@
<div id="page-footer" class="page-footer">
<div class="page-number">{S_TIMEZONE}<br />{PAGE_NUMBER}</div>
- <div class="copyright">Powered by phpBB&reg; Forum Software &copy; phpBB Limited<br />https://www.phpbb.com/</div>
+ <div class="copyright">
+ <p>{{ CREDIT_LINE }}
+ </p>
+ {% if TRANSLATION_INFO %}
+ <p>{{ TRANSLATION_INFO }}
+ </p>
+ {% endif %}
+ </div>
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
index 69eda8c42c..ac0cd153c2 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
@@ -13,7 +13,7 @@
<!-- EVENT ucp_profile_profile_info_before -->
<!-- IF S_BIRTHDAYS_ENABLED -->
<dl>
- <dt><label for="bday_day">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
+ <dt><label for="bday_day">{L_BIRTHDAY}{L_COLON}{% EVENT ucp_profile_profile_info_birthday_label_append %}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
<dd>
<label for="bday_day">{L_DAY}{L_COLON} <select name="bday_day" id="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select></label>
<label for="bday_month">{L_MONTH}{L_COLON} <select name="bday_month" id="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select></label>
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index bf659bb663..40beb784d7 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -114,6 +114,7 @@
<dd><input type="submit" name="login" tabindex="5" value="{L_LOGIN}" class="button1" /></dd>
</dl>
{S_LOGIN_REDIRECT}
+ {S_FORM_TOKEN_LOGIN}
</fieldset>
</div>
@@ -156,7 +157,7 @@
<li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_GLOBAL --> global-announce<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
<!-- EVENT viewforum_body_topic_row_prepend -->
<dl class="row-item {topicrow.TOPIC_IMG_STYLE}">
- <dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
+ <dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url('{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}'); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
<!-- IF topicrow.S_UNREAD_TOPIC and not S_IS_BOT --><a href="{topicrow.U_NEWEST_POST}" class="row-item-link"></a><!-- ENDIF -->
<div class="list-inner">
<!-- EVENT topiclist_row_prepend -->
@@ -186,7 +187,7 @@
<!-- IF not S_IS_BOT -->
<div class="responsive-show" style="display: none;">
- {L_LAST_POST} {L_POST_BY_AUTHOR} <!-- EVENT viewforum_body_last_post_author_username_prepend -->{topicrow.LAST_POST_AUTHOR_FULL}<!-- EVENT viewforum_body_last_post_author_username_append --> &laquo; <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a>
+ {L_LAST_POST} {L_POST_BY_AUTHOR} <!-- EVENT viewforum_body_last_post_author_username_prepend -->{topicrow.LAST_POST_AUTHOR_FULL}<!-- EVENT viewforum_body_last_post_author_username_append --> &laquo; <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}"><time datetime="{topicrow.LAST_POST_TIME_RFC3339}">{topicrow.LAST_POST_TIME}</time></a>
<!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --><br />{L_POSTED} {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
</div>
<!-- IF topicrow.REPLIES -->
@@ -197,7 +198,9 @@
<div class="topic-poster responsive-hide left-box">
<!-- IF topicrow.S_HAS_POLL --><i class="icon fa-bar-chart fa-fw" aria-hidden="true"></i><!-- ENDIF -->
<!-- IF topicrow.ATTACH_ICON_IMG --><i class="icon fa-paperclip fa-fw" aria-hidden="true"></i><!-- ENDIF -->
- {L_POST_BY_AUTHOR} <!-- EVENT viewforum_body_topic_author_username_prepend -->{topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}<!-- EVENT viewforum_body_topic_author_username_append -->
+ {% EVENT topiclist_row_topic_by_author_before %}
+ {L_POST_BY_AUTHOR} <!-- EVENT viewforum_body_topic_author_username_prepend -->{topicrow.TOPIC_AUTHOR_FULL}<!-- EVENT viewforum_body_topic_author_username_append --> &raquo; <time datetime="{topicrow.FIRST_POST_TIME_RFC3339}">{topicrow.FIRST_POST_TIME}</time>
+ {% EVENT topiclist_row_topic_by_author_after %}
<!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --> &raquo; {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
</div>
@@ -229,7 +232,7 @@
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
</a>
<!-- ENDIF -->
- <br />{topicrow.LAST_POST_TIME}
+ <br /><time datetime="{topicrow.LAST_POST_TIME_RFC3339}">{topicrow.LAST_POST_TIME}</time>
</span>
</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 8d7e26f099..9bfa07e52b 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -224,7 +224,7 @@
<div id="post_content{postrow.POST_ID}"<!-- IF postrow.S_POST_HIDDEN --> style="display: none;"<!-- ENDIF -->>
<!-- EVENT viewtopic_body_post_subject_before -->
- <h3 <!-- IF postrow.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF postrow.POST_ICON_IMG --><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="{postrow.POST_ICON_IMG_ALT}" title="{postrow.POST_ICON_IMG_ALT}" /> <!-- ENDIF --><a href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a></h3>
+ <h3 <!-- IF postrow.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF postrow.POST_ICON_IMG --><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="{postrow.POST_ICON_IMG_ALT}" title="{postrow.POST_ICON_IMG_ALT}" /> <!-- ENDIF --><a href="{postrow.U_MINI_POST}">{postrow.POST_SUBJECT}</a></h3>
<!-- DEFINE $SHOW_POST_BUTTONS = (postrow.U_EDIT or postrow.U_DELETE or postrow.U_REPORT or postrow.U_WARN or postrow.U_INFO or postrow.U_QUOTE) -->
<!-- EVENT viewtopic_body_post_buttons_list_before -->
@@ -289,7 +289,7 @@
<i class="icon fa-file fa-fw <!-- IF postrow.S_UNREAD_POST -->icon-red<!-- ELSE -->icon-lightgray<!-- ENDIF --> icon-md" aria-hidden="true"></i><span class="sr-only">{postrow.MINI_POST}</span>
</a>
<!-- ENDIF -->
- <span class="responsive-hide">{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> &raquo; </span>{postrow.POST_DATE}
+ <span class="responsive-hide">{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> &raquo; </span><time datetime="{postrow.POST_DATE_RFC3339}">{postrow.POST_DATE}</time>
</p>
<!-- EVENT viewtopic_body_postrow_post_details_after -->
diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html
index b504949053..658062f9fd 100644
--- a/phpBB/styles/prosilver/template/viewtopic_print.html
+++ b/phpBB/styles/prosilver/template/viewtopic_print.html
@@ -38,7 +38,14 @@
<div id="page-footer" class="page-footer">
<div class="page-number">{S_TIMEZONE}<br />{PAGE_NUMBER}</div>
- <div class="copyright">Powered by phpBB&reg; Forum Software &copy; phpBB Limited<br />https://www.phpbb.com/</div>
+ <div class="copyright">
+ <p>{{ CREDIT_LINE }}
+ </p>
+ {% if TRANSLATION_INFO %}
+ <p>{{ TRANSLATION_INFO }}
+ </p>
+ {% endif %}
+ </div>
</div>
</div>
diff --git a/phpBB/styles/prosilver/theme/plupload.css b/phpBB/styles/prosilver/theme/plupload.css
index f466803964..b1f3ae2da8 100644
--- a/phpBB/styles/prosilver/theme/plupload.css
+++ b/phpBB/styles/prosilver/theme/plupload.css
@@ -3,6 +3,10 @@
margin-bottom: 1em;
}
+.attach-row-tpl {
+ display: none;
+}
+
.file-list td {
vertical-align: middle;
}
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 72c96e2d2d..4691512cbd 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -222,7 +222,7 @@ if ($mark_read == 'topics')
$data = array(
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
- 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics&mark_time=" . time()) : '',
+ 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics&mark_time=" . time(), false) : '',
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
'MESSAGE_TEXT' => $user->lang['TOPICS_MARKED']
);
@@ -933,9 +933,12 @@ if (count($topic_list))
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
+ 'FIRST_POST_TIME_RFC3339' => gmdate(DATE_RFC3339, $row['topic_time']),
'LAST_POST_SUBJECT' => censor_text($row['topic_last_post_subject']),
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_POST_TIME_RFC3339' => gmdate(DATE_RFC3339, $row['topic_last_post_time']),
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
+ 'LAST_VIEW_TIME_RFC3339' => gmdate(DATE_RFC3339, $row['topic_last_view_time']),
'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index eb2d52cf61..4e502538c8 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -453,6 +453,38 @@ $join_user_sql = array('a' => true, 't' => false, 's' => false);
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+/**
+* Event to add new sorting options
+*
+* @event core.viewtopic_gen_sort_selects_before
+* @var array limit_days Limit results by time
+* @var array sort_by_text Language strings for sorting options
+* @var array sort_by_sql SQL conditions for sorting options
+* @var array join_user_sql SQL joins required for sorting options
+* @var int sort_days User selected sort days
+* @var string sort_key User selected sort key
+* @var string sort_dir User selected sort direction
+* @var string s_limit_days Initial value of limit days selectbox
+* @var string s_sort_key Initial value of sort key selectbox
+* @var string s_sort_dir Initial value of sort direction selectbox
+* @var string u_sort_param Initial value of sorting form action
+* @since 3.2.8-RC1
+*/
+$vars = array(
+ 'limit_days',
+ 'sort_by_text',
+ 'sort_by_sql',
+ 'join_user_sql',
+ 'sort_days',
+ 'sort_key',
+ 'sort_dir',
+ 's_limit_days',
+ 's_sort_key',
+ 's_sort_dir',
+ 'u_sort_param',
+);
+extract($phpbb_dispatcher->trigger_event('core.viewtopic_gen_sort_selects_before', compact($vars)));
+
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param, $default_sort_days, $default_sort_key, $default_sort_dir);
// Obtain correct post count and ordering SQL if user has
@@ -2012,6 +2044,7 @@ for ($i = 0, $end = count($post_list); $i < $end; ++$i)
'CONTACT_USER' => $user_cache[$poster_id]['contact_user'],
'POST_DATE' => $user->format_date($row['post_time'], false, ($view == 'print') ? true : false),
+ 'POST_DATE_RFC3339' => gmdate(DATE_RFC3339, $row['post_time']),
'POST_SUBJECT' => $row['post_subject'],
'MESSAGE' => $message,
'SIGNATURE' => ($row['enable_sig']) ? $user_cache[$poster_id]['sig'] : '',
@@ -2327,12 +2360,25 @@ if ($s_can_vote || $s_quick_reply)
($s_notify) ? $qr_hidden_fields['notify'] = 1 : true;
($topic_data['topic_status'] == ITEM_LOCKED) ? $qr_hidden_fields['lock_topic'] = 1 : true;
- $template->assign_vars(array(
+ $tpl_ary = [
'S_QUICK_REPLY' => true,
'U_QR_ACTION' => append_sid("{$phpbb_root_path}posting.$phpEx", "mode=reply&amp;f=$forum_id&amp;t=$topic_id"),
'QR_HIDDEN_FIELDS' => build_hidden_fields($qr_hidden_fields),
'SUBJECT' => 'Re: ' . censor_text($topic_data['topic_title']),
- ));
+ ];
+
+ /**
+ * Event after the quick-reply has been setup
+ *
+ * @event core.viewtopic_modify_quick_reply_template_vars
+ * @var array tpl_ary Array with template data
+ * @var array topic_data Array with topic data
+ * @since 3.2.9-RC1
+ */
+ $vars = ['tpl_ary', 'topic_data'];
+ extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_quick_reply_template_vars', compact($vars)));
+
+ $template->assign_vars($tpl_ary);
}
}
// now I have the urge to wash my hands :(
diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php
index 0a64bfd69f..d1e907b53d 100644
--- a/tests/avatar/manager_test.php
+++ b/tests/avatar/manager_test.php
@@ -185,7 +185,7 @@ class phpbb_avatar_manager_test extends \phpbb_database_test_case
$avatar_settings = $this->manager->get_avatar_settings($this->avatar_foobar);
$expected_settings = array(
- 'allow_avatar_' . get_class($this->avatar_foobar) => array('lang' => 'ALLOW_' . strtoupper(get_class($this->avatar_foobar)), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_avatar_' . get_class($this->avatar_foobar) => array('lang' => 'ALLOW_' . strtoupper(get_class($this->avatar_foobar)), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
);
$this->assertEquals($expected_settings, $avatar_settings);
diff --git a/tests/functional/download_test.php b/tests/functional/download_test.php
index e2f1d065be..3d4f316d72 100644
--- a/tests/functional/download_test.php
+++ b/tests/functional/download_test.php
@@ -55,7 +55,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
// Test creating a reply
$post2 = $this->create_post($this->data['forums']['Download #1'], $post['topic_id'], 'Re: Download Topic #1-#2', 'This is a test post posted by the testing framework.', array('upload_files' => 1));
- $crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
+ $crawler = self::request('GET', "viewtopic.php?p={$post2['post_id']}&sid={$this->sid}");
$this->assertContains('Re: Download Topic #1-#2', $crawler->filter('html')->text());
$this->data['posts']['Re: Download Topic #1-#2'] = (int) $post2['post_id'];
diff --git a/tests/functional/feed_test.php b/tests/functional/feed_test.php
index 3792b0a23c..725a44ae5e 100644
--- a/tests/functional/feed_test.php
+++ b/tests/functional/feed_test.php
@@ -337,7 +337,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
// Test creating a reply
$post2 = $this->create_post($this->data['forums']['Feeds #news'], $post['topic_id'], 'Re: Feeds #news - Topic #2', 'This is a test post posted by the testing framework.');
- $crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
+ $crawler = self::request('GET', "viewtopic.php?p={$post2['post_id']}&sid={$this->sid}");
self::assertContains('Re: Feeds #news - Topic #2', $crawler->filter('html')->text());
$this->data['posts']['Re: Feeds #news - Topic #2'] = (int) $post2['post_id'];
@@ -493,7 +493,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
// Test creating a reply
$post2 = $this->create_post($this->data['forums']['Feeds #1'], $post['topic_id'], 'Re: Feeds #1 - Topic #2', 'This is a test post posted by the testing framework.');
- $crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
+ $crawler = self::request('GET', "viewtopic.php?p={$post2['post_id']}&sid={$this->sid}");
self::assertContains('Re: Feeds #1 - Topic #2', $crawler->filter('html')->text());
$this->data['posts']['Re: Feeds #1 - Topic #2'] = (int) $post2['post_id'];
@@ -1222,7 +1222,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
// Test creating a reply with 1 missing attachment
$post2 = $this->create_post($this->data['forums']['Feeds #1'], $this->data['topics']['Feeds #1 - Topic #3'], 'Re: Feeds #1 - Topic #3-1', 'This is a test post posted by the testing framework. [attachment=0]Attachment #0[/attachment]');
- $crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
+ $crawler = self::request('GET', "viewtopic.php?p={$post2['post_id']}&sid={$this->sid}");
self::assertContains('Re: Feeds #1 - Topic #3-1', $crawler->filter('html')->text());
$this->data['posts']['Re: Feeds #1 - Topic #3-1'] = (int) $post2['post_id'];
diff --git a/tests/functional/fileupload_form_test.php b/tests/functional/fileupload_form_test.php
index b0780172ff..ff9450be0d 100644
--- a/tests/functional/fileupload_form_test.php
+++ b/tests/functional/fileupload_form_test.php
@@ -46,6 +46,13 @@ class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case
private function upload_file($filename, $mimetype)
{
+ $crawler = self::$client->request(
+ 'GET',
+ 'posting.php?mode=reply&f=2&t=1&sid=' . $this->sid
+ );
+
+ $file_form_data = array_merge(['add_file' => $this->lang('ADD_FILE')], $this->get_hidden_fields($crawler, 'posting.php?mode=reply&f=2&t=1&sid=' . $this->sid));
+
$file = array(
'tmp_name' => $this->path . $filename,
'name' => $filename,
@@ -57,7 +64,7 @@ class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case
$crawler = self::$client->request(
'POST',
'posting.php?mode=reply&f=2&t=1&sid=' . $this->sid,
- array('add_file' => $this->lang('ADD_FILE')),
+ $file_form_data,
array('fileupload' => $file)
);
diff --git a/tests/functional/plupload_test.php b/tests/functional/plupload_test.php
index 9d284a7e57..4ab1c8e9e5 100644
--- a/tests/functional/plupload_test.php
+++ b/tests/functional/plupload_test.php
@@ -76,6 +76,10 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case
$chunk_size = ceil(filesize($this->path . 'valid.jpg') / self::CHUNKS);
$handle = fopen($this->path . 'valid.jpg', 'rb');
+ $crawler = self::$client->request('POST', $url . '&sid=' . $this->sid);
+
+ $file_form_data = $this->get_hidden_fields($crawler, $url);
+
for ($i = 0; $i < self::CHUNKS; $i++)
{
$chunk = fread($handle, $chunk_size);
@@ -94,13 +98,13 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case
$crawler = self::$client->request(
'POST',
$url . '&sid=' . $this->sid,
- array(
+ array_merge(array(
'chunk' => $i,
'chunks' => self::CHUNKS,
'name' => md5('valid') . '.jpg',
'real_filename' => 'valid.jpg',
'add_file' => $this->lang('ADD_FILE'),
- ),
+ ), $file_form_data),
array('fileupload' => $file),
array('X-PHPBB-USING-PLUPLOAD' => '1')
);
@@ -134,17 +138,19 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case
'error' => UPLOAD_ERR_OK,
);
+ $file_form_data = $this->get_hidden_fields(null, $url);
+
self::$client->setServerParameter('HTTP_X_PHPBB_USING_PLUPLOAD', '1');
self::$client->request(
'POST',
$url . '&sid=' . $this->sid,
- array(
+ array_merge(array(
'chunk' => '0',
'chunks' => '1',
'name' => md5('valid') . '.jpg',
'real_filename' => 'valid.jpg',
'add_file' => $this->lang('ADD_FILE'),
- ),
+ ), $file_form_data),
array('fileupload' => $file)
);
diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php
index 764376a945..49447e1133 100644
--- a/tests/functional/posting_test.php
+++ b/tests/functional/posting_test.php
@@ -29,7 +29,7 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
// Test creating a reply with bbcode
$post2 = $this->create_post(2, $post['topic_id'], 'Re: Test Topic 1', 'This is a test [b]post[/b] posted by the testing framework.');
- $crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
+ $crawler = self::request('GET', "viewtopic.php?p={$post2['post_id']}&sid={$this->sid}");
$this->assertContains('This is a test post posted by the testing framework.', $crawler->filter('html')->text());
// Test quoting a message
@@ -41,15 +41,10 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
{
$this->login();
- $this->add_lang('posting');
-
- self::create_post(2,
- 1,
- "Unsupported: \xF0\x9F\x88\xB3 \xF0\x9F\x9A\xB6",
- 'This is a test with emoji characters in the topic title.',
- array(),
- 'Your subject contains the following unsupported characters'
- );
+ $post = $this->create_topic(2, "Test Topic \xF0\x9F\xA4\x94 3\xF0\x9D\x94\xBB\xF0\x9D\x95\x9A", 'This is a test with emoji character in the topic title.');
+ $this->create_post(2, $post['topic_id'], "Re: Test Topic 1 \xF0\x9F\xA4\x94 3\xF0\x9D\x94\xBB\xF0\x9D\x95\x9A", 'This is a test with emoji characters in the topic title.');
+ $crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
+ $this->assertContains("\xF0\x9F\xA4\x94 3\xF0\x9D\x94\xBB\xF0\x9D\x95\x9A", $crawler->text());
}
public function test_supported_unicode_characters()
@@ -161,7 +156,7 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
{
$this->set_quote_depth($quote_depth);
- $post = $this->create_post(2, $topic['topic_id'], 'Re: Test Topic 1', $text);
+ $post = $this->create_post(2, $topic['topic_id'], "Re: Test Topic 1#$quote_depth", $text);
$url = "viewtopic.php?p={$post['post_id']}&sid={$this->sid}";
$crawler = self::request('GET', $url);
diff --git a/tests/functional/private_messages_test.php b/tests/functional/private_messages_test.php
index 7fda26fb49..ce709524a9 100644
--- a/tests/functional/private_messages_test.php
+++ b/tests/functional/private_messages_test.php
@@ -85,7 +85,7 @@ class phpbb_functional_private_messages_test extends phpbb_functional_test_case
public function test_quote_pm()
{
$text = 'This is a test private message sent by the testing framework.';
- $expected = "(\\[quote=admin time=\\d+ user_id=2\\]\n" . $text . "\n\\[/quote\\])";
+ $expected = "(\\[quote=admin msg_id=\\d+ time=\\d+ user_id=2\\]\n" . $text . "\n\\[/quote\\])";
$this->login();
$message_id = $this->create_private_message('Test', $text, array(2));
diff --git a/tests/functional/prune_shadow_topic_test.php b/tests/functional/prune_shadow_topic_test.php
index c014119b98..2bf0280d62 100644
--- a/tests/functional/prune_shadow_topic_test.php
+++ b/tests/functional/prune_shadow_topic_test.php
@@ -77,7 +77,7 @@ class phpbb_functional_prune_shadow_topic_test extends phpbb_functional_test_cas
// Test creating a reply
$post2 = $this->create_post($this->data['forums']['Prune Shadow'], $this->post['topic_id'], 'Re: Prune Shadow #1-#2', 'This is a test post posted by the testing framework.');
- $crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
+ $crawler = self::request('GET', "viewtopic.php?p={$post2['post_id']}&sid={$this->sid}");
$this->assertContains('Re: Prune Shadow #1-#2', $crawler->filter('html')->text());
$this->data['posts']['Re: Prune Shadow #1-#2'] = (int) $post2['post_id'];
diff --git a/tests/functional/registration_test.php b/tests/functional/registration_test.php
index 690f4ae9f2..48982edc8c 100644
--- a/tests/functional/registration_test.php
+++ b/tests/functional/registration_test.php
@@ -36,6 +36,10 @@ class phpbb_functional_registration_test extends phpbb_functional_test_case
{
$this->add_lang('ucp');
+ // Check that we can't skip
+ self::request('GET', 'ucp.php?mode=register&agreed=1');
+ $this->assertContainsLang('AGREE', $this->get_content());
+
$crawler = self::request('GET', 'ucp.php?mode=register');
$this->assertContainsLang('REGISTRATION', $crawler->filter('div.content h2')->text());
@@ -64,4 +68,54 @@ class phpbb_functional_registration_test extends phpbb_functional_test_case
$this->assert_checkbox_is_checked($crawler, 'notification.type.post_notification.method.email');
$this->assert_checkbox_is_checked($crawler, 'notification.type.topic_notification.method.email');
}
+
+ /**
+ * @depends test_disable_captcha_on_registration
+ */
+ public function test_register_coppa_account()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $crawler = self::request('GET', "adm/index.php?i=acp_board&mode=registration&sid={$this->sid}");
+ $form = $crawler->selectButton('Submit')->form();
+ $form['config[coppa_enable]']->setValue('1');
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('CONFIG_UPDATED', $crawler->filter('#main .successbox')->text());
+ $this->logout();
+
+ $this->add_lang('ucp');
+
+ // Check that we can't skip
+ $crawler = self::request('GET', 'ucp.php?mode=register&coppa=1');
+ $this->assertContainsLang('COPPA_BIRTHDAY', $crawler->html());
+
+ $form = $crawler->selectButton('coppa_yes')->form();
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('REGISTRATION', $crawler->filter('div.content h2')->text());
+
+ $form = $crawler->selectButton('I agree to these terms')->form();
+ $crawler = self::submit($form);
+
+ $form = $crawler->selectButton('Submit')->form(array(
+ 'username' => 'user-coppa-test',
+ 'email' => 'user-coppa-test@phpbb.com',
+ 'new_password' => 'user-coppa-testuser-coppa-test',
+ 'password_confirm' => 'user-coppa-testuser-coppa-test',
+ ));
+ $form['tz']->select('Europe/Berlin');
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ACCOUNT_COPPA', $crawler->filter('#message')->text());
+
+ $this->login();
+ $this->admin_login();
+
+ $crawler = self::request('GET', "adm/index.php?i=acp_board&mode=registration&sid={$this->sid}");
+ $form = $crawler->selectButton('Submit')->form();
+ $form['config[coppa_enable]']->setValue('0');
+ $crawler = self::submit($form);
+ }
}
diff --git a/tests/functional/visibility_softdelete_test.php b/tests/functional/visibility_softdelete_test.php
index 6450c00c1e..fd994361a5 100644
--- a/tests/functional/visibility_softdelete_test.php
+++ b/tests/functional/visibility_softdelete_test.php
@@ -97,7 +97,7 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_
// Test creating a reply
$post2 = $this->create_post($this->data['forums']['Soft Delete #1'], $post['topic_id'], 'Re: Soft Delete Topic #1-#2', 'This is a test post posted by the testing framework.');
- $crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
+ $crawler = self::request('GET', "viewtopic.php?p={$post2['post_id']}&sid={$this->sid}");
$this->assertContains('Re: Soft Delete Topic #1-#2', $crawler->filter('html')->text());
$this->data['posts']['Re: Soft Delete Topic #1-#2'] = (int) $post2['post_id'];
@@ -114,7 +114,7 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_
// Test creating another reply
$post3 = $this->create_post($this->data['forums']['Soft Delete #1'], $post['topic_id'], 'Re: Soft Delete Topic #1-#3', 'This is another test post posted by the testing framework.');
- $crawler = self::request('GET', "viewtopic.php?t={$post3['topic_id']}&sid={$this->sid}");
+ $crawler = self::request('GET', "viewtopic.php?p={$post3['post_id']}&sid={$this->sid}");
$this->assertContains('Re: Soft Delete Topic #1-#3', $crawler->filter('html')->text());
$this->data['posts']['Re: Soft Delete Topic #1-#3'] = (int) $post3['post_id'];
diff --git a/tests/functions/fixtures/validate_email.xml b/tests/functions/fixtures/validate_email.xml
index eb4fd90217..fa139f6f18 100644
--- a/tests/functions/fixtures/validate_email.xml
+++ b/tests/functions/fixtures/validate_email.xml
@@ -1,5 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dataset>
+ <table name="phpbb_banlist">
+ <column>ban_id</column>
+ <column>ban_userid</column>
+ <column>ban_exclude</column>
+ <column>ban_end</column>
+ <column>ban_email</column>
+ <column>ban_give_reason</column>
+ <row>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>0</value>
+ <value>banned@example.com</value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>0</value>
+ <value>0</value>
+ <value>0</value>
+ <value>banned2@example.com</value>
+ <value>just because</value>
+ </row>
+ </table>
<table name="phpbb_users">
<column>user_id</column>
<column>username</column>
diff --git a/tests/functions/validate_user_email_test.php b/tests/functions/validate_user_email_test.php
index 8dcec88103..d23ffc0503 100644
--- a/tests/functions/validate_user_email_test.php
+++ b/tests/functions/validate_user_email_test.php
@@ -28,10 +28,16 @@ class phpbb_functions_validate_user_email_test extends phpbb_database_test_case
protected function setUp()
{
+ global $cache, $phpbb_dispatcher, $phpbb_root_path, $phpEx;
+
parent::setUp();
+ $cache = new \phpbb\cache\driver\file();
+ $cache->purge();
$this->db = $this->new_dbal();
- $this->user = new phpbb_mock_user;
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $language = new phpbb\language\language(new phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
+ $this->user = new phpbb\user($language, '\phpbb\datetime');
$this->helper = new phpbb_functions_validate_data_helper($this);
}
@@ -47,7 +53,6 @@ class phpbb_functions_validate_user_email_test extends phpbb_database_test_case
$config['email_check_mx'] = $check_mx;
$db = $this->db;
$user = $this->user;
- $user->optionset('banned_users', array('banned@example.com'));
}
public static function validate_user_email_data()
@@ -58,7 +63,8 @@ class phpbb_functions_validate_user_email_test extends phpbb_database_test_case
array('valid_complex', array(), "'%$~test@example.com"),
array('invalid', array('EMAIL_INVALID'), 'fööbar@example.com'),
array('taken', array('EMAIL_TAKEN'), 'admin@example.com'),
- array('banned', array('EMAIL_BANNED'), 'banned@example.com'),
+ array('banned', ['just because'], 'banned2@example.com'),
+ array('banned', ['EMAIL_BANNED'], 'banned@example.com')
);
}
diff --git a/tests/functions_acp/validate_config_vars_test.php b/tests/functions_acp/validate_config_vars_test.php
index 1182d659f0..3bd2204de9 100644
--- a/tests/functions_acp/validate_config_vars_test.php
+++ b/tests/functions_acp/validate_config_vars_test.php
@@ -19,10 +19,11 @@ class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
{
parent::setUp();
- global $user;
+ global $language, $user;
$user = new phpbb_mock_user();
$user->lang = new phpbb_mock_lang();
+ $language = $user->lang;
}
/**
@@ -44,6 +45,7 @@ class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
'test_int_32' => array('lang' => 'TEST_INT', 'validate' => 'int:32'),
'test_int_32_64' => array('lang' => 'TEST_INT', 'validate' => 'int:32:64'),
'test_lang' => array('lang' => 'TEST_LANG', 'validate' => 'lang'),
+ 'test_url' => array('lang' => 'TEST_URL', 'validate' => 'url'),
/*
'test_sp' => array('lang' => 'TEST_SP', 'validate' => 'script_path'),
'test_rpath' => array('lang' => 'TEST_RPATH', 'validate' => 'rpath'),
@@ -64,6 +66,7 @@ class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
'test_int_32' => 32,
'test_int_32_64' => 48,
'test_lang' => 'en',
+ 'test_url' => 'http://foobar.com',
),
),
);
@@ -148,6 +151,11 @@ class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
array('test_lang' => 'this_is_no_language'),
array('WRONG_DATA_LANG'),
),
+ array(
+ array('test_url' => array('lang' => 'TEST_URL', 'validate' => 'url')),
+ array('test_url' => 'javascript://foobar.com'),
+ array('URL_INVALID TEST_URL'),
+ ),
);
}
diff --git a/tests/group/helper_get_name_string_test.php b/tests/group/helper_get_name_string_test.php
new file mode 100644
index 0000000000..c626328dcc
--- /dev/null
+++ b/tests/group/helper_get_name_string_test.php
@@ -0,0 +1,115 @@
+<?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 dirname(__FILE__) . '/helper_test_case.php';
+
+class phpbb_group_helper_get_name_string_test extends phpbb_group_helper_test_case
+{
+
+ public function get_name_string_profile_data()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ return array(
+ array(0, 'Non existing group', '', false, ''),
+ array(2, 'Administrators', 'AA0000', false, "{$phpbb_root_path}memberlist.$phpEx?mode=group&amp;g=2"),
+ array(42, 'Example Group', '', 'http://www.example.org/group.php?mode=show', 'http://www.example.org/group.php?mode=show&amp;g=42'),
+ );
+ }
+
+ /**
+ * @dataProvider get_name_string_profile_data
+ */
+ public function test_get_name_string_profile($group_id, $group_name, $group_colour, $custom_profile_url, $expected)
+ {
+ $this->assertEquals($expected, $this->group_helper->get_name_string('profile', $group_id, $group_name, $group_colour, $custom_profile_url));
+ }
+
+ public function get_name_string_group_name_data()
+ {
+ return array(
+ // Should be fine
+ array(0, 'BOTS', 'AA0000', false, 'Bots'),
+ array(1, 'new_group', '', false, 'Some new group'),
+ array(2, 'group_with_ümlauts', '', 'http://www.example.org/group.php?mode=show', 'Should work'),
+
+ // Should fail and thus return the same
+ array(3, 'not_uppercase', 'FFFFFF', false, 'not_uppercase'),
+ array(4, 'Awesome group', '', false, 'Awesome group'),
+ );
+ }
+
+ /**
+ * @dataProvider get_name_string_group_name_data
+ */
+ public function test_get_name_string_group_name($group_id, $group_name, $group_colour, $custom_profile_url, $expected)
+ {
+ $this->assertEquals($expected, $this->group_helper->get_name_string('group_name', $group_id, $group_name, $group_colour, $custom_profile_url));
+ }
+
+ public function get_name_string_colour_data()
+ {
+ return array(
+ array(0, '', '', false, ''),
+ array(0, '', 'F0F0F0', false, '#F0F0F0'),
+ array(1, 'Guests', '000000', false, '#000000'),
+ array(2, 'Administrators', '', false, ''),
+ );
+ }
+
+ /**
+ * @dataProvider get_name_string_colour_data
+ */
+ public function test_get_name_string_colour($group_id, $group_name, $group_colour, $custom_profile_url, $expected)
+ {
+ $this->assertEquals($expected, $this->group_helper->get_name_string('colour', $group_id, $group_name, $group_colour, $custom_profile_url));
+ }
+
+ public function get_name_string_full_data()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ return array(
+ array(0, 'BOTS', '000000', false, '<span class="username-coloured" style="color: #000000;">Bots</span>'),
+ array(1, 'BOTS', '111111', false, '<span class="username-coloured" style="color: #111111;">Bots</span>'),
+ array(7, 'new_group', 'FFA500', false, '<a class="username-coloured" href="' . $phpbb_root_path . 'memberlist.' . $phpEx . '?mode=group&amp;g=7" style="color: #FFA500;">Some new group</a>'),
+ array(14, 'Awesome group', '', 'http://www.example.org/group.php?mode=show', '<a class="username" href="http://www.example.org/group.php?mode=show&amp;g=14">Awesome group</a>'),
+ );
+ }
+
+ /**
+ * @dataProvider get_name_string_full_data
+ */
+ public function test_get_name_string_full($group_id, $group_name, $group_colour, $custom_profile_url, $expected)
+ {
+ $this->assertEquals($expected, $this->group_helper->get_name_string('full', $group_id, $group_name, $group_colour, $custom_profile_url));
+ }
+
+ public function get_name_string_no_profile_data()
+ {
+ return array(
+ array(0, 'BOTS', '000000', false, '<span class="username-coloured" style="color: #000000;">Bots</span>'),
+ array(1, 'new_group', '', false, '<span class="username">Some new group</span>'),
+ array(2, 'not_uppercase', 'FF0000', false, '<span class="username-coloured" style="color: #FF0000;">not_uppercase</span>'),
+ array(5, 'Awesome group', '', 'http://www.example.org/group.php?mode=show', '<span class="username">Awesome group</span>'),
+ );
+ }
+
+ /**
+ * @dataProvider get_name_string_no_profile_data
+ */
+ public function test_get_name_string_no_profile($group_id, $group_name, $group_colour, $custom_profile_url, $expected)
+ {
+ $this->assertEquals($expected, $this->group_helper->get_name_string('no_profile', $group_id, $group_name, $group_colour, $custom_profile_url));
+ }
+}
diff --git a/tests/group/helper_get_name_test.php b/tests/group/helper_get_name_test.php
new file mode 100644
index 0000000000..b39b2cbedd
--- /dev/null
+++ b/tests/group/helper_get_name_test.php
@@ -0,0 +1,31 @@
+<?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 dirname(__FILE__) . '/helper_test_case.php';
+
+class phpbb_group_helper_get_name_test extends phpbb_group_helper_test_case
+{
+ public function test_get_name()
+ {
+ // They should be totally fine
+ $this->assertEquals('Bots', $this->group_helper->get_name('Bots'));
+ $this->assertEquals('Some new group', $this->group_helper->get_name('new_group'));
+ $this->assertEquals('Should work', $this->group_helper->get_name('group_with_ümlauts'));
+
+ // This should fail (obviously)
+ $this->assertNotEquals('The key does not contain uppercase letters', $this->group_helper->get_name('not_uppercase'));
+
+ // The key doesn't exist so just return group name...
+ $this->assertEquals('Awesome group', $this->group_helper->get_name('Awesome group'));
+ }
+}
diff --git a/tests/group/helper_get_rank_test.php b/tests/group/helper_get_rank_test.php
new file mode 100644
index 0000000000..5efd8ad95e
--- /dev/null
+++ b/tests/group/helper_get_rank_test.php
@@ -0,0 +1,43 @@
+<?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 dirname(__FILE__) . '/helper_test_case.php';
+
+class phpbb_group_helper_get_rank_test extends phpbb_group_helper_test_case
+{
+ public function get_rank_data()
+ {
+ global $phpbb_root_path;
+
+ return array(
+ array(
+ array('group_id' => 0, 'group_rank' => 1),
+ array(
+ 'title' => 'Site admin',
+ 'img' => '<img src="' . $phpbb_root_path . 'images/ranks/siteadmin.png' . '" alt="Site admin" title="Site admin" />',
+ 'img_src' => $phpbb_root_path . 'images/ranks/siteadmin.png',
+ )
+ ),
+ array(array('group_id' => 1, 'group_rank' => 0), array('title' => null, 'img' => null, 'img_src' => null)),
+ array(array('group_id' => 2, 'group_rank' => 2), array('title' => 'Test member', 'img' => '', 'img_src' => '')),
+ );
+ }
+
+ /**
+ * @dataProvider get_rank_data
+ */
+ public function test_get_rank($group_data, $expected)
+ {
+ $this->assertEquals($expected, $this->group_helper->get_rank($group_data));
+ }
+}
diff --git a/tests/group/helper_test.php b/tests/group/helper_test.php
deleted file mode 100644
index 2377a6f47c..0000000000
--- a/tests/group/helper_test.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.
- *
- */
-
-class phpbb_group_helper_test extends phpbb_test_case
-{
- /** @var \phpbb\group\helper */
- protected $group_helper;
-
- public function setUp()
- {
- global $phpbb_root_path, $phpEx;
-
- // Set up language service
- $lang = new \phpbb\language\language(
- new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)
- );
-
- // Set up language data for testing
- $reflection_class = new ReflectionClass('\phpbb\language\language');
-
- // Set default language files loaded flag to true
- $loaded_flag = $reflection_class->getProperty('common_language_files_loaded');
- $loaded_flag->setAccessible(true);
- $loaded_flag->setValue($lang, true);
-
- // Set up test language data
- $lang_array = $reflection_class->getProperty('lang');
- $lang_array->setAccessible(true);
- $lang_array->setValue($lang, $this->get_test_language_data_set());
-
- // Set up group helper
- $this->group_helper = new \phpbb\group\helper($lang);
- }
-
- public function test_get_name()
- {
- // They should be totally fine
- $this->assertEquals('Bots', $this->group_helper->get_name('Bots'));
- $this->assertEquals('Some new group', $this->group_helper->get_name('new_group'));
- $this->assertEquals('Should work', $this->group_helper->get_name('group_with_ümlauts'));
-
- // This should fail (obviously)
- $this->assertNotEquals('They key does not contain uppercase letters', $this->group_helper->get_name('not_uppercase'));
-
- // The key doesn't exist so just return group name...
- $this->assertEquals('Awesome group', $this->group_helper->get_name('Awesome group'));
- }
-
- protected function get_test_language_data_set()
- {
- return array(
- 'G_BOTS' => 'Bots',
- 'G_NEW_GROUP' => 'Some new group',
- 'G_not_uppercase' => 'The key does not contain uppercase letters',
- 'G_GROUP_WITH_ÜMLAUTS' => 'Should work',
- );
- }
-}
diff --git a/tests/group/helper_test_case.php b/tests/group/helper_test_case.php
new file mode 100644
index 0000000000..e298770331
--- /dev/null
+++ b/tests/group/helper_test_case.php
@@ -0,0 +1,123 @@
+<?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.
+ *
+ */
+
+class phpbb_group_helper_test_case extends phpbb_test_case
+{
+ /** @var \phpbb\group\helper */
+ protected $group_helper;
+
+ protected function config_defaults()
+ {
+ $defaults = array(
+ 'ranks_path' => 'images/ranks'
+ );
+ return $defaults;
+ }
+
+ protected function get_test_language_data_set()
+ {
+ return array(
+ 'G_BOTS' => 'Bots',
+ 'G_NEW_GROUP' => 'Some new group',
+ 'G_not_uppercase' => 'The key does not contain uppercase letters',
+ 'G_GROUP_WITH_ÜMLAUTS' => 'Should work',
+ );
+ }
+
+ protected function get_test_rank_data_set()
+ {
+ return array(
+ 'special' => array(
+ 1 => array(
+ 'rank_id' => 1,
+ 'rank_title' => 'Site admin',
+ 'rank_special' => 1,
+ 'rank_image' => 'siteadmin.png',
+ ),
+ 2 => array(
+ 'rank_id' => 2,
+ 'rank_title' => 'Test member',
+ 'rank_special' => 1,
+ 'rank_image' => '',
+ )
+ )
+ );
+ }
+
+ protected function setup_engine(array $new_config = array())
+ {
+ global $phpbb_dispatcher, $phpbb_root_path, $phpEx;
+
+ // Set up authentication data for testing
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $auth->expects($this->any())
+ ->method('acl_get')
+ ->with($this->stringContains('_'), $this->anything())
+ ->will($this->returnValueMap(array(
+ array('u_viewprofile', true),
+ )));
+
+ // Set up cache service
+ $cache_service = $this->getMockBuilder('\phpbb\cache\service')->disableOriginalConstructor()->getMock();
+ $cache_service->expects($this->any())
+ ->method('obtain_ranks')
+ ->will($this->returnValue($this->get_test_rank_data_set()));
+
+ // Set up configuration
+ $defaults = $this->config_defaults();
+ $config = new \phpbb\config\config(array_merge($defaults, $new_config));
+
+ // Set up language service
+ $lang = new \phpbb\language\language(
+ new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)
+ );
+
+ // Set up language data for testing
+ $reflection_class = new ReflectionClass('\phpbb\language\language');
+
+ // Set default language files loaded flag to true
+ $loaded_flag = $reflection_class->getProperty('common_language_files_loaded');
+ $loaded_flag->setAccessible(true);
+ $loaded_flag->setValue($lang, true);
+
+ // Set up test language data
+ $lang_array = $reflection_class->getProperty('lang');
+ $lang_array->setAccessible(true);
+ $lang_array->setValue($lang, $this->get_test_language_data_set());
+
+ // Set up event dispatcher
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+
+ // Set up path helper
+ $path_helper = $this->getMockBuilder('\phpbb\path_helper')
+ ->disableOriginalConstructor()
+ ->setMethods(array())
+ ->getMock();
+ $path_helper->method('get_phpbb_root_path')
+ ->willReturn($phpbb_root_path);
+ $path_helper->method('get_php_ext')
+ ->willReturn($phpEx);
+ $path_helper->method('update_web_root_path')
+ ->will($this->returnArgument(0));
+
+ $user = new \phpbb\user($lang, '\phpbb\datetime');
+ $user->data['user_id'] = ANONYMOUS;
+
+ $this->group_helper = new \phpbb\group\helper($auth, $cache_service, $config, $lang, $phpbb_dispatcher, $path_helper, $user);
+ }
+
+ public function setUp()
+ {
+ $this->setup_engine();
+ }
+}
diff --git a/tests/notification/group_request_test.php b/tests/notification/group_request_test.php
index 92e758a336..e849c66fa5 100644
--- a/tests/notification/group_request_test.php
+++ b/tests/notification/group_request_test.php
@@ -49,9 +49,23 @@ class phpbb_notification_group_request_test extends phpbb_tests_notification_bas
$this->cache->get_driver()
));
$this->container->set('group_helper', new \phpbb\group\helper(
+ $this->getMock('\phpbb\auth\auth'),
+ $this->cache,
+ $this->config,
new \phpbb\language\language(
new phpbb\language\language_file_loader($phpbb_root_path, $phpEx)
- )
+ ),
+ new phpbb_mock_event_dispatcher(),
+ new \phpbb\path_helper(
+ new \phpbb\symfony_request(
+ new phpbb_mock_request()
+ ),
+ new \phpbb\filesystem\filesystem(),
+ $this->getMock('\phpbb\request\request'),
+ $phpbb_root_path,
+ $phpEx
+ ),
+ $this->user
));
$phpbb_dispatcher = new phpbb_mock_event_dispatcher;
$phpbb_log = new \phpbb\log\dummy();
diff --git a/tests/plupload/plupload_test.php b/tests/plupload/plupload_test.php
index 46bebb8d35..eb4657afbc 100644
--- a/tests/plupload/plupload_test.php
+++ b/tests/plupload/plupload_test.php
@@ -54,4 +54,77 @@ class phpbb_plupload_test extends phpbb_test_case
$this->assertEquals($expected, $plupload->generate_resize_string());
}
+
+ public function data_get_chunk_size()
+ {
+ return [
+ [[
+ 'memory_limit' => -1,
+ 'upload_max_filesize' => 0,
+ 'post_max_size' => 0,
+ ], 0],
+ [[
+ 'memory_limit' => -1,
+ 'upload_max_filesize' => 500,
+ 'post_max_size' => 400,
+ ], 200],
+ [[
+ 'memory_limit' => 100,
+ 'upload_max_filesize' => 0,
+ 'post_max_size' => 300,
+ ], 50],
+ [[
+ 'memory_limit' => 300,
+ 'upload_max_filesize' => 200,
+ 'post_max_size' => 0,
+ ], 100],
+ [[
+ 'memory_limit' => 3000,
+ 'upload_max_filesize' => 800,
+ 'post_max_size' => 900,
+ ], 400],
+ [[
+ 'memory_limit' => 2000,
+ 'upload_max_filesize' => 1000,
+ 'post_max_size' => 600,
+ ], 300],
+ [[
+ 'memory_limit' => 1000,
+ 'upload_max_filesize' => 2000,
+ 'post_max_size' => 3000,
+ ], 500],
+ ];
+ }
+
+ /**
+ * @dataProvider data_get_chunk_size
+ */
+ public function test_get_chunk_size($limits_ary, $expected)
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $lang = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
+ $config = new \phpbb\config\config([]);
+
+ $ini_wrapper = $this->getMockBuilder('\bantu\IniGetWrapper\IniGetWrapper')
+ ->setMethods(['getBytes'])
+ ->getMock();
+ $ini_wrapper->method('getBytes')
+ ->will($this->returnValueMap([
+ ['memory_limit', $limits_ary['memory_limit']],
+ ['upload_max_filesize', $limits_ary['upload_max_filesize']],
+ ['post_max_size', $limits_ary['post_max_size']]
+ ]));
+
+ $plupload = new \phpbb\plupload\plupload(
+ '',
+ $config,
+ new phpbb_mock_request,
+ new \phpbb\user($lang, '\phpbb\datetime'),
+ $ini_wrapper,
+ new \phpbb\mimetype\guesser(array(new \phpbb\mimetype\extension_guesser))
+ );
+
+ $this->assertEquals($expected, $plupload->get_chunk_size());
+ }
}
diff --git a/tests/search/native_test.php b/tests/search/native_test.php
index 29d0d0a8d3..0e6f719cef 100644
--- a/tests/search/native_test.php
+++ b/tests/search/native_test.php
@@ -70,7 +70,7 @@ class phpbb_search_native_test extends phpbb_search_test_case
'ba*az',
'all',
true,
- array('\'ba%az\''),
+ array(4),
array(),
array(),
),
@@ -78,7 +78,7 @@ class phpbb_search_native_test extends phpbb_search_test_case
'ba*z',
'all',
true,
- array('\'ba%z\''),
+ array(), // <= 3 chars after removing *
array(),
array(),
),
@@ -86,7 +86,7 @@ class phpbb_search_native_test extends phpbb_search_test_case
'baa* baaz*',
'all',
true,
- array('\'baa%\'', '\'baaz%\''),
+ array('\'baa%\'', 4),
array(),
array(),
),
@@ -94,7 +94,7 @@ class phpbb_search_native_test extends phpbb_search_test_case
'ba*z baa*',
'all',
true,
- array('\'ba%z\'', '\'baa%\''),
+ array('\'baa%\''), // baz is <= 3 chars, only baa* is left
array(),
array(),
),
diff --git a/tests/session/check_ban_test.php b/tests/session/check_ban_test.php
index 04da5f08b9..16a65b0ade 100644
--- a/tests/session/check_ban_test.php
+++ b/tests/session/check_ban_test.php
@@ -72,7 +72,8 @@ class phpbb_session_check_ban_test extends phpbb_session_test_case
{
try
{
- $is_banned = $this->session->check_ban($user_id, $user_ips, $user_email, $return);
+ $ban = $this->session->check_ban($user_id, $user_ips, $user_email, $return);
+ $is_banned = !empty($ban);
}
catch (PHPUnit_Framework_Error_Notice $e)
{
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index d4856f954a..2659cf6e73 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -397,6 +397,14 @@ class phpbb_functional_test_case extends phpbb_test_case
global $phpbb_container;
$phpbb_container->reset();
+ // Purge cache to remove cached files
+ $phpbb_container = new phpbb_mock_container_builder();
+ $phpbb_container->setParameter('core.environment', PHPBB_ENVIRONMENT);
+ $phpbb_container->setParameter('core.cache_dir', $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/');
+
+ $cache = new \phpbb\cache\driver\file;
+ $cache->purge();
+
$blacklist = ['phpbb_class_loader_mock', 'phpbb_class_loader_ext', 'phpbb_class_loader'];
foreach (array_keys($GLOBALS) as $key)
@@ -1158,24 +1166,14 @@ class phpbb_functional_test_case extends phpbb_test_case
'error' => UPLOAD_ERR_OK,
);
- $crawler = self::$client->request('POST', $posting_url, array('add_file' => $this->lang('ADD_FILE')), array('fileupload' => $file));
+ $file_form_data = array_merge(['add_file' => $this->lang('ADD_FILE')], $this->get_hidden_fields($crawler, $posting_url));
+
+ $crawler = self::$client->request('POST', $posting_url, $file_form_data, array('fileupload' => $file));
}
unset($form_data['upload_files']);
}
- $hidden_fields = array(
- $crawler->filter('[type="hidden"]')->each(function ($node, $i) {
- return array('name' => $node->attr('name'), 'value' => $node->attr('value'));
- }),
- );
-
- foreach ($hidden_fields as $fields)
- {
- foreach($fields as $field)
- {
- $form_data[$field['name']] = $field['value'];
- }
- }
+ $form_data = array_merge($form_data, $this->get_hidden_fields($crawler, $posting_url));
// I use a request because the form submission method does not allow you to send data that is not
// contained in one of the actual form fields that the browser sees (i.e. it ignores "hidden" inputs)
@@ -1306,4 +1304,37 @@ class phpbb_functional_test_case extends phpbb_test_case
return self::request('GET', substr($link, strpos($link, 'mcp.')));
}
+
+ /**
+ * Get hidden fields for URL
+ *
+ * @param Symfony\Component\DomCrawler\Crawler|null $crawler Crawler instance or null
+ * @param string $url Request URL
+ *
+ * @return array Hidden form fields array
+ */
+ protected function get_hidden_fields($crawler, $url)
+ {
+ if (!$crawler)
+ {
+ $crawler = self::$client->request('GET', $url);
+ }
+ $hidden_fields = [
+ $crawler->filter('[type="hidden"]')->each(function ($node, $i) {
+ return ['name' => $node->attr('name'), 'value' => $node->attr('value')];
+ }),
+ ];
+
+ $file_form_data = [];
+
+ foreach ($hidden_fields as $fields)
+ {
+ foreach($fields as $field)
+ {
+ $file_form_data[$field['name']] = $field['value'];
+ }
+ }
+
+ return $file_form_data;
+ }
}
diff --git a/tests/test_framework/phpbb_ui_test_case.php b/tests/test_framework/phpbb_ui_test_case.php
index 7b950a7d5d..48e510abe3 100644
--- a/tests/test_framework/phpbb_ui_test_case.php
+++ b/tests/test_framework/phpbb_ui_test_case.php
@@ -11,6 +11,7 @@
*
*/
+use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\WebDriverBy;
use Facebook\WebDriver\Exception\WebDriverCurlException;
use Facebook\WebDriver\Remote\RemoteWebDriver;
@@ -79,12 +80,14 @@ class phpbb_ui_test_case extends phpbb_test_case
}
try {
- $capabilities = DesiredCapabilities::firefox();
+ $capabilities = DesiredCapabilities::chrome();
+ $chromeOptions = (new ChromeOptions)->addArguments(['headless', 'disable-gpu']);
+ $capabilities->setCapability(ChromeOptions::CAPABILITY, $chromeOptions);
self::$webDriver = RemoteWebDriver::create(
self::$host . ':' . self::$port,
$capabilities,
- 60 * 1000, // 60 seconds connection timeout
- 60 * 1000 // 60 seconds request timeout
+ 30 * 1000, // 30 seconds connection timeout
+ 30 * 1000 // 30 seconds request timeout
);
} catch (WebDriverCurlException $e) {
self::markTestSkipped('PhantomJS webserver is not running.');
@@ -155,7 +158,26 @@ class phpbb_ui_test_case extends phpbb_test_case
public function visit($path)
{
- $this->getDriver()->get(self::$root_url . $path);
+ // Retry three times on curl issues, e.g. timeout
+ $attempts = 0;
+ $retries = 3;
+
+ while (true)
+ {
+ $attempts++;
+ try
+ {
+ $this->getDriver()->get(self::$root_url . $path);
+ break;
+ }
+ catch (Facebook\WebDriver\Exception\WebDriverCurlException $exception)
+ {
+ if ($attempts >= $retries)
+ {
+ throw $exception;
+ }
+ }
+ }
}
static protected function recreate_database($config)
diff --git a/tests/text_formatter/s9e/bbcode_merger_test.php b/tests/text_formatter/s9e/bbcode_merger_test.php
index 815539056b..5ec0c91971 100644
--- a/tests/text_formatter/s9e/bbcode_merger_test.php
+++ b/tests/text_formatter/s9e/bbcode_merger_test.php
@@ -275,6 +275,22 @@ class phpbb_textformatter_s9e_bbcode_merger_test extends phpbb_test_case
</table>
<p> </p>'
],
+ [
+ // https://www.phpbb.com/community/viewtopic.php?f=438&t=2530451
+ '[issue]{NUMBER}[/issue]',
+ '<a href="/default/issues/{NUMBER}"> Issue #{NUMBER}</a>',
+
+ '[issue={SIMPLETEXT}]{NUMBER}[/issue]',
+ '<a href="/{SIMPLETEXT}/issues/{NUMBER}"> Issue #{NUMBER} ({SIMPLETEXT})</a>',
+
+ '[issue={SIMPLETEXT?}]{NUMBER}[/issue]',
+ '<a>
+ <xsl:choose>
+ <xsl:when test="@issue"><xsl:attribute name="href">/<xsl:value-of select="@issue"/>/issues/<xsl:value-of select="@content"/></xsl:attribute> Issue #<xsl:value-of select="@content"/> (<xsl:value-of select="@issue"/>)</xsl:when>
+ <xsl:otherwise><xsl:attribute name="href">/default/issues/<xsl:value-of select="@content"/></xsl:attribute> Issue #<xsl:value-of select="@content"/></xsl:otherwise>
+ </xsl:choose>
+ </a>'
+ ],
];
}
}
diff --git a/tests/text_formatter/s9e/default_formatting_test.php b/tests/text_formatter/s9e/default_formatting_test.php
index 05a41c5095..1aa4f0bc3a 100644
--- a/tests/text_formatter/s9e/default_formatting_test.php
+++ b/tests/text_formatter/s9e/default_formatting_test.php
@@ -70,7 +70,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
),
array(
'[size=75]smaller[/size]',
- '<span style="font-size:75%;line-height:normal">smaller</span>'
+ '<span style="font-size: 75%; line-height: normal">smaller</span>'
),
array(
'[quote]quoted[/quote]',
@@ -254,6 +254,10 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
'<a href="http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" class="postlink">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</a>'
),
array(
+ '[url=http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[/url]',
+ '<a href="http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" class="postlink">http://example.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</a>'
+ ),
+ array(
'[quote="[url=http://example.org]xxx[/url]"]...[/quote]',
'<blockquote><div><cite><a href="http://example.org" class="postlink">xxx</a> wrote:</cite>...</div></blockquote>'
),
diff --git a/tests/text_formatter/s9e/link_helper_test.php b/tests/text_formatter/s9e/link_helper_test.php
new file mode 100644
index 0000000000..762d67f883
--- /dev/null
+++ b/tests/text_formatter/s9e/link_helper_test.php
@@ -0,0 +1,35 @@
+<?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.
+*
+*/
+
+class phpbb_textformatter_s9e_link_helper_test extends phpbb_test_case
+{
+ public function test_does_not_override_autoimage()
+ {
+ $container = $this->get_test_case_helpers()->set_s9e_services();
+ $configurator = $container->get('text_formatter.s9e.factory')->get_configurator();
+
+ $configurator->Autoimage;
+ extract($configurator->finalize());
+
+ $original = 'http://localhost/path_to_long_image_filename_0123456789.png';
+ $expected = '<r>
+ <URL url="http://localhost/path_to_long_image_filename_0123456789.png">
+ <IMG src="http://localhost/path_to_long_image_filename_0123456789.png">
+ <LINK_TEXT text="http://localhost/path_to_long_image_fil ... 456789.png">http://localhost/path_to_long_image_filename_0123456789.png</LINK_TEXT>
+ </IMG>
+ </URL>
+ </r>';
+
+ $this->assertXmlStringEqualsXmlString($expected, $parser->parse($original));
+ }
+}
diff --git a/tests/text_processing/tickets_data/PHPBB3-13921.html b/tests/text_processing/tickets_data/PHPBB3-13921.html
index 690668ef28..6a9dc7f504 100644
--- a/tests/text_processing/tickets_data/PHPBB3-13921.html
+++ b/tests/text_processing/tickets_data/PHPBB3-13921.html
@@ -1 +1 @@
-<span style="font-size:200%;line-height:normal"></span><div style="text-align:center"><span style="font-size:200%;line-height:normal">xxx</span></div> \ No newline at end of file
+<span style="font-size: 200%; line-height: normal"></span><div style="text-align:center"><span style="font-size: 200%; line-height: normal">xxx</span></div> \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-16053.html b/tests/text_processing/tickets_data/PHPBB3-16053.html
new file mode 100644
index 0000000000..af70ddf7eb
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-16053.html
@@ -0,0 +1 @@
+<a href="http://ea117.com" alt="Test">Test</a> \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-16053.txt b/tests/text_processing/tickets_data/PHPBB3-16053.txt
new file mode 100644
index 0000000000..c786665eb9
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-16053.txt
@@ -0,0 +1 @@
+[test=http://ea117.com]Test[/test] \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-16053.xml b/tests/text_processing/tickets_data/PHPBB3-16053.xml
new file mode 100644
index 0000000000..25f7c9e34e
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-16053.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_bbcodes">
+ <column>bbcode_id</column>
+ <column>bbcode_tag</column>
+ <column>bbcode_helpline</column>
+ <column>display_on_posting</column>
+ <column>bbcode_match</column>
+ <column>bbcode_tpl</column>
+ <column>first_pass_match</column>
+ <column>first_pass_replace</column>
+ <column>second_pass_match</column>
+ <column>second_pass_replace</column>
+
+ <row>
+ <value>13</value>
+ <value>test</value>
+ <value></value>
+ <value>1</value>
+ <value>[test={URL}]{TEXT}[/test]</value>
+ <value><![CDATA[<a href="{URL}" alt="{TEXT}">{TEXT}</a>]]></value>
+ <value>((?!))</value>
+ <value></value>
+ <value>((?!))</value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/text_processing/tickets_data/PHPBB3-16074.html b/tests/text_processing/tickets_data/PHPBB3-16074.html
new file mode 100644
index 0000000000..b588e2ac47
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-16074.html
@@ -0,0 +1 @@
+<img alt=":man_judge:" class="emoji smilies" draggable="false" src="//twemoji.maxcdn.com/2/svg/1f468-200d-2696-fe0f.svg"> <img alt="👨‍⚖️" class="emoji smilies" draggable="false" src="//twemoji.maxcdn.com/2/svg/1f468-200d-2696-fe0f.svg"> \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-16074.txt b/tests/text_processing/tickets_data/PHPBB3-16074.txt
new file mode 100644
index 0000000000..f067a7294d
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-16074.txt
@@ -0,0 +1 @@
+:man_judge: 👨‍⚖️ \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-16252.after.php b/tests/text_processing/tickets_data/PHPBB3-16252.after.php
new file mode 100644
index 0000000000..c2f57c171e
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-16252.after.php
@@ -0,0 +1,18 @@
+<?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.
+*
+*/
+
+function after_assert_phpbb3_16252($vars)
+{
+ extract($vars);
+ $test->assertEmpty($parser->get_errors());
+}
diff --git a/tests/text_processing/tickets_data/PHPBB3-16252.before.php b/tests/text_processing/tickets_data/PHPBB3-16252.before.php
new file mode 100644
index 0000000000..94c59d9602
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-16252.before.php
@@ -0,0 +1,17 @@
+<?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.
+*
+*/
+
+function before_assert_phpbb3_16252($vars)
+{
+ $vars['parser']->disable_bbcode('url');
+}
diff --git a/tests/text_processing/tickets_data/PHPBB3-16252.html b/tests/text_processing/tickets_data/PHPBB3-16252.html
new file mode 100644
index 0000000000..5b14ab0e7a
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-16252.html
@@ -0,0 +1 @@
+http://localhost/ \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-16252.txt b/tests/text_processing/tickets_data/PHPBB3-16252.txt
new file mode 100644
index 0000000000..5b14ab0e7a
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-16252.txt
@@ -0,0 +1 @@
+http://localhost/ \ No newline at end of file
diff --git a/travis/setup-php-extensions.sh b/travis/setup-php-extensions.sh
index de27965e39..a69468a637 100755
--- a/travis/setup-php-extensions.sh
+++ b/travis/setup-php-extensions.sh
@@ -48,9 +48,6 @@ then
echo 'Enabling APC PHP extension'
printf "\n" | pecl install apc
echo 'apc.enable_cli=1' >> "$php_ini_file"
-else
- echo 'Disabling Opcache'
- echo 'opcache.enable=0' >> "$php_ini_file"
fi
# APCu
@@ -65,6 +62,8 @@ then
fi
fi
+# Disable xdebug on travis
+phpenv config-rm xdebug.ini
# redis
# Disabled redis for now as it causes travis to fail