aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/acp_ext_details.html1
-rw-r--r--phpBB/adm/style/ajax.js3
-rw-r--r--phpBB/composer.json2
-rw-r--r--phpBB/composer.lock304
-rw-r--r--phpBB/config/default/container/services_db.yml4
-rw-r--r--phpBB/config/default/container/services_text_reparser.yml18
-rw-r--r--phpBB/docs/events.md20
-rw-r--r--phpBB/includes/functions_admin.php30
-rw-r--r--phpBB/includes/functions_display.php17
-rw-r--r--phpBB/includes/functions_download.php22
-rw-r--r--phpBB/includes/functions_user.php16
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php2
-rw-r--r--phpBB/includes/ucp/ucp_profile.php11
-rw-r--r--phpBB/includes/ucp/ucp_register.php22
-rw-r--r--phpBB/language/en/common.php1
-rw-r--r--phpBB/phpbb/console/command/reparser/list_all.php4
-rw-r--r--phpBB/phpbb/console/command/reparser/reparse.php16
-rw-r--r--phpBB/phpbb/cron/task/text_reparser/reparser.php2
-rw-r--r--phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php1
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/increase_size_of_emotion.php46
-rw-r--r--phpBB/phpbb/db/migration/profilefield_base_migration.php1
-rw-r--r--phpBB/phpbb/di/container_builder.php38
-rw-r--r--phpBB/phpbb/di/extension/config.php6
-rw-r--r--phpBB/phpbb/di/proxy_instantiator.php7
-rw-r--r--phpBB/phpbb/extension/metadata_manager.php3
-rw-r--r--phpBB/phpbb/feed/attachments_base.php34
-rw-r--r--phpBB/phpbb/feed/forum.php2
-rw-r--r--phpBB/phpbb/feed/news.php2
-rw-r--r--phpBB/phpbb/feed/overall.php2
-rw-r--r--phpBB/phpbb/feed/topic.php2
-rw-r--r--phpBB/phpbb/feed/topics.php2
-rw-r--r--phpBB/phpbb/feed/topics_active.php2
-rw-r--r--phpBB/phpbb/install/module/install_finish/task/populate_migrations.php1
-rw-r--r--phpBB/phpbb/plupload/plupload.php2
-rw-r--r--phpBB/phpbb/template/context.php8
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php4
-rw-r--r--phpBB/phpbb/textreparser/base.php27
-rw-r--r--phpBB/phpbb/textreparser/manager.php20
-rw-r--r--phpBB/phpbb/textreparser/reparser_interface.php14
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage.html1
-rw-r--r--phpBB/styles/prosilver/template/ucp_register.html4
-rw-r--r--phpBB/styles/prosilver/theme/common.css14
-rw-r--r--phpBB/styles/prosilver/theme/content.css2
-rw-r--r--phpBB/viewforum.php4
44 files changed, 634 insertions, 110 deletions
diff --git a/phpBB/adm/style/acp_ext_details.html b/phpBB/adm/style/acp_ext_details.html
index 4c1feb59a9..d7839f7ec8 100644
--- a/phpBB/adm/style/acp_ext_details.html
+++ b/phpBB/adm/style/acp_ext_details.html
@@ -134,4 +134,5 @@
<!-- END meta_authors -->
</fieldset>
+ <!-- EVENT acp_ext_details_end -->
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js
index d5154b2a61..6f94048d05 100644
--- a/phpBB/adm/style/ajax.js
+++ b/phpBB/adm/style/ajax.js
@@ -282,7 +282,8 @@ function submitPermissions() {
type: 'POST',
data: formData + '&' + $submitAllButton.name + '=' + encodeURIComponent($submitAllButton.value) +
'&creation_time=' + $form.find('input[type=hidden][name=creation_time]')[0].value +
- '&form_token=' + $form.find('input[type=hidden][name=form_token]')[0].value,
+ '&form_token=' + $form.find('input[type=hidden][name=form_token]')[0].value +
+ '&' + $form.children('input[type=hidden]').serialize(),
success: handlePermissionReturn,
error: handlePermissionReturn
});
diff --git a/phpBB/composer.json b/phpBB/composer.json
index e91430023d..15cbd2d052 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -55,7 +55,7 @@
"laravel/homestead": "~2.2",
"phing/phing": "2.4.*",
"phpunit/dbunit": "1.3.*",
- "phpunit/phpunit": "4.1.*",
+ "phpunit/phpunit": "^4.1",
"sami/sami": "1.*",
"squizlabs/php_codesniffer": "2.*",
"symfony/browser-kit": "^2.8",
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index e550572fb3..70f65a290e 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "067b099cc97334a6a08a77e5648aa260",
- "content-hash": "90198ca524b93a7e915aa6916b2f55af",
+ "hash": "8d03337c5b9f6ae7cc1a26f84ba0270b",
+ "content-hash": "be4cb6437adc268d96f99bcbaad66d03",
"packages": [
{
"name": "bantu/ini-get-wrapper",
@@ -1895,6 +1895,60 @@
],
"packages-dev": [
{
+ "name": "doctrine/instantiator",
+ "version": "1.0.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/instantiator.git",
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3,<8.0-DEV"
+ },
+ "require-dev": {
+ "athletic/athletic": "~0.1.8",
+ "ext-pdo": "*",
+ "ext-phar": "*",
+ "phpunit/phpunit": "~4.0",
+ "squizlabs/php_codesniffer": "~2.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "homepage": "http://ocramius.github.com/"
+ }
+ ],
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+ "homepage": "https://github.com/doctrine/instantiator",
+ "keywords": [
+ "constructor",
+ "instantiate"
+ ],
+ "time": "2015-06-14 21:17:01"
+ },
+ {
"name": "fabpot/goutte",
"version": "v2.0.4",
"source": {
@@ -2179,6 +2233,118 @@
"time": "2012-11-29 21:23:47"
},
{
+ "name": "phpdocumentor/reflection-docblock",
+ "version": "2.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+ "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
+ "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "suggest": {
+ "dflydev/markdown": "~1.0",
+ "erusev/parsedown": "~1.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "phpDocumentor": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mike van Riel",
+ "email": "mike.vanriel@naenius.com"
+ }
+ ],
+ "time": "2015-02-03 12:10:50"
+ },
+ {
+ "name": "phpspec/prophecy",
+ "version": "v1.6.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpspec/prophecy.git",
+ "reference": "6c52c2722f8460122f96f86346600e1077ce22cb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb",
+ "reference": "6c52c2722f8460122f96f86346600e1077ce22cb",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/instantiator": "^1.0.2",
+ "php": "^5.3|^7.0",
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
+ "sebastian/comparator": "^1.1",
+ "sebastian/recursion-context": "^1.0|^2.0"
+ },
+ "require-dev": {
+ "phpspec/phpspec": "^2.0",
+ "phpunit/phpunit": "^4.8 || ^5.6.5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.6.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Prophecy\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ },
+ {
+ "name": "Marcello Duarte",
+ "email": "marcello.duarte@gmail.com"
+ }
+ ],
+ "description": "Highly opinionated mocking framework for PHP 5.3+",
+ "homepage": "https://github.com/phpspec/prophecy",
+ "keywords": [
+ "Double",
+ "Dummy",
+ "fake",
+ "mock",
+ "spy",
+ "stub"
+ ],
+ "time": "2016-11-21 14:58:47"
+ },
+ {
"name": "phpunit/dbunit",
"version": "1.3.2",
"source": {
@@ -2301,31 +2467,33 @@
},
{
"name": "phpunit/php-file-iterator",
- "version": "1.3.4",
+ "version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb"
+ "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb",
- "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
+ "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4.x-dev"
+ }
+ },
"autoload": {
"classmap": [
- "File/"
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
@@ -2342,7 +2510,7 @@
"filesystem",
"iterator"
],
- "time": "2013-10-10 15:34:57"
+ "time": "2016-10-03 07:40:28"
},
{
"name": "phpunit/php-text-template",
@@ -2480,16 +2648,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "4.1.6",
+ "version": "4.8.31",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "241116219bb7e3b8111a36ffd8f37546888738d6"
+ "reference": "98b2b39a520766bec663ff5b7ff1b729db9dbfe3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/241116219bb7e3b8111a36ffd8f37546888738d6",
- "reference": "241116219bb7e3b8111a36ffd8f37546888738d6",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/98b2b39a520766bec663ff5b7ff1b729db9dbfe3",
+ "reference": "98b2b39a520766bec663ff5b7ff1b729db9dbfe3",
"shasum": ""
},
"require": {
@@ -2499,17 +2667,19 @@
"ext-reflection": "*",
"ext-spl": "*",
"php": ">=5.3.3",
- "phpunit/php-code-coverage": "~2.0",
- "phpunit/php-file-iterator": "~1.3.1",
+ "phpspec/prophecy": "^1.3.1",
+ "phpunit/php-code-coverage": "~2.1",
+ "phpunit/php-file-iterator": "~1.4",
"phpunit/php-text-template": "~1.2",
- "phpunit/php-timer": "~1.0.2",
- "phpunit/phpunit-mock-objects": "2.1.5",
- "sebastian/comparator": "~1.0",
- "sebastian/diff": "~1.1",
- "sebastian/environment": "~1.0",
- "sebastian/exporter": "~1.0",
+ "phpunit/php-timer": "^1.0.6",
+ "phpunit/phpunit-mock-objects": "~2.3",
+ "sebastian/comparator": "~1.2.2",
+ "sebastian/diff": "~1.2",
+ "sebastian/environment": "~1.3",
+ "sebastian/exporter": "~1.2",
+ "sebastian/global-state": "~1.0",
"sebastian/version": "~1.0",
- "symfony/yaml": "~2.0"
+ "symfony/yaml": "~2.1|~3.0"
},
"suggest": {
"phpunit/php-invoker": "~1.1"
@@ -2520,7 +2690,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.1.x-dev"
+ "dev-master": "4.8.x-dev"
}
},
"autoload": {
@@ -2529,10 +2699,6 @@
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- "",
- "../../symfony/yaml/"
- ],
"license": [
"BSD-3-Clause"
],
@@ -2544,34 +2710,36 @@
}
],
"description": "The PHP Unit Testing framework.",
- "homepage": "http://www.phpunit.de/",
+ "homepage": "https://phpunit.de/",
"keywords": [
"phpunit",
"testing",
"xunit"
],
- "time": "2014-08-17 08:07:02"
+ "time": "2016-12-09 02:45:31"
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "2.1.5",
+ "version": "2.3.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a"
+ "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/7878b9c41edb3afab92b85edf5f0981014a2713a",
- "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
+ "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
"shasum": ""
},
"require": {
+ "doctrine/instantiator": "^1.0.2",
"php": ">=5.3.3",
- "phpunit/php-text-template": "~1.2"
+ "phpunit/php-text-template": "~1.2",
+ "sebastian/exporter": "~1.2"
},
"require-dev": {
- "phpunit/phpunit": "~4.1"
+ "phpunit/phpunit": "~4.4"
},
"suggest": {
"ext-soap": "*"
@@ -2579,7 +2747,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.1.x-dev"
+ "dev-master": "2.3.x-dev"
}
},
"autoload": {
@@ -2588,9 +2756,6 @@
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
@@ -2607,7 +2772,7 @@
"mock",
"xunit"
],
- "time": "2014-06-12 07:22:15"
+ "time": "2015-10-02 06:51:40"
},
{
"name": "pimple/pimple",
@@ -2644,9 +2809,7 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com",
- "homepage": "http://fabien.potencier.org",
- "role": "Lead Developer"
+ "email": "fabien@symfony.com"
}
],
"description": "Pimple is a simple Dependency Injection Container for PHP 5.3",
@@ -2948,6 +3111,57 @@
"time": "2016-06-17 09:04:28"
},
{
+ "name": "sebastian/global-state",
+ "version": "1.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/global-state.git",
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.2"
+ },
+ "suggest": {
+ "ext-uopz": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Snapshotting of global state",
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
+ "keywords": [
+ "global state"
+ ],
+ "time": "2015-10-12 03:26:01"
+ },
+ {
"name": "sebastian/recursion-context",
"version": "1.0.4",
"source": {
diff --git a/phpBB/config/default/container/services_db.yml b/phpBB/config/default/container/services_db.yml
index d7a8238400..d538177603 100644
--- a/phpBB/config/default/container/services_db.yml
+++ b/phpBB/config/default/container/services_db.yml
@@ -5,9 +5,7 @@ services:
- '@service_container'
dbal.conn.driver:
- class: '%dbal.driver.class%'
- calls:
- - [sql_connect, ['%dbal.dbhost%', '%dbal.dbuser%', '%dbal.dbpasswd%', '%dbal.dbname%', '%dbal.dbport%', false, '%dbal.new_link%']]
+ synthetic: true
# ----- DB Tools -----
dbal.tools.factory:
diff --git a/phpBB/config/default/container/services_text_reparser.yml b/phpBB/config/default/container/services_text_reparser.yml
index 6b0353cf5b..4bc49f5765 100644
--- a/phpBB/config/default/container/services_text_reparser.yml
+++ b/phpBB/config/default/container/services_text_reparser.yml
@@ -24,6 +24,8 @@ services:
class: phpbb\textreparser\plugins\contact_admin_info
arguments:
- '@config_text'
+ calls:
+ - [set_name, [contact_admin_info]]
tags:
- { name: text_reparser.plugin }
@@ -32,6 +34,8 @@ services:
arguments:
- '@dbal.conn'
- '%tables.forums%'
+ calls:
+ - [set_name, [forum_description]]
tags:
- { name: text_reparser.plugin }
@@ -40,6 +44,8 @@ services:
arguments:
- '@dbal.conn'
- '%tables.forums%'
+ calls:
+ - [set_name, [forum_rules]]
tags:
- { name: text_reparser.plugin }
@@ -48,6 +54,8 @@ services:
arguments:
- '@dbal.conn'
- '%tables.groups%'
+ calls:
+ - [set_name, [group_description]]
tags:
- { name: text_reparser.plugin }
@@ -56,6 +64,8 @@ services:
arguments:
- '@dbal.conn'
- '%tables.privmsgs%'
+ calls:
+ - [set_name, [pm_text]]
tags:
- { name: text_reparser.plugin }
@@ -63,6 +73,8 @@ services:
class: phpbb\textreparser\plugins\poll_option
arguments:
- '@dbal.conn'
+ calls:
+ - [set_name, [poll_option]]
tags:
- { name: text_reparser.plugin }
@@ -71,6 +83,8 @@ services:
arguments:
- '@dbal.conn'
- '%tables.topics%'
+ calls:
+ - [set_name, [poll_title]]
tags:
- { name: text_reparser.plugin }
@@ -79,6 +93,8 @@ services:
arguments:
- '@dbal.conn'
- '%tables.posts%'
+ calls:
+ - [set_name, [post_text]]
tags:
- { name: text_reparser.plugin }
@@ -87,5 +103,7 @@ services:
arguments:
- '@dbal.conn'
- '%tables.users%'
+ calls:
+ - [set_name, [user_signature]]
tags:
- { name: text_reparser.plugin }
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index aeea2d72a7..ec3fba91ce 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -58,6 +58,12 @@ acp_email_options_after
* Since: 3.1.2-RC1
* Purpose: Add settings to mass email form
+acp_ext_details_end
+===
+* Location: adm/style/acp_ext_details.html
+* Since: 3.1.11-RC1
+* Purpose: Add more detailed information on extension after the available information.
+
acp_ext_list_disabled_title_after
===
* Location: adm/style/acp_ext_list.html
@@ -1973,6 +1979,13 @@ ucp_pm_viewmessage_custom_fields_before
* Purpose: Add data before the custom fields on the user profile when viewing
a private message
+ucp_pm_viewmessage_options_before
+===
+* Locations:
+ + styles/prosilver/template/ucp_pm_viewmessage.html
+* Since: 3.1.11-RC1
+* Purpose: Add content right before display options
+
ucp_pm_viewmessage_post_buttons_after
===
* Locations:
@@ -2116,6 +2129,13 @@ ucp_profile_register_details_after
* Since: 3.1.4-RC1
* Purpose: Add options in profile page fieldset - after confirm password field.
+ucp_register_buttons_before
+===
+* Locations:
+ + styles/prosilver/template/ucp_register.html
+* Since: 3.1.11-RC1
+* Purpose: Add content before buttons in registration form.
+
ucp_register_credentials_before
===
* Locations:
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index c1a99da231..1ad41156f9 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -644,8 +644,8 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
*
* @event core.move_posts_before
* @var array post_ids Array of post ids to move
- * @var string topic_id The topic id the posts are moved to
- * @var bool auto_sync Whether or not to perform auto sync
+ * @var int topic_id The topic id the posts are moved to
+ * @var bool auto_sync Whether or not to perform auto sync
* @var array forum_ids Array of the forum ids the posts are moved from
* @var array topic_ids Array of the topic ids the posts are moved from
* @var array forum_row Array with the forum id of the topic the posts are moved to
@@ -676,8 +676,8 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
*
* @event core.move_posts_after
* @var array post_ids Array of the moved post ids
- * @var string topic_id The topic id the posts are moved to
- * @var bool auto_sync Whether or not to perform auto sync
+ * @var int topic_id The topic id the posts are moved to
+ * @var bool auto_sync Whether or not to perform auto sync
* @var array forum_ids Array of the forum ids the posts are moved from
* @var array topic_ids Array of the topic ids the posts are moved from
* @var array forum_row Array with the forum id of the topic the posts are moved to
@@ -701,6 +701,28 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
sync('topic_attachment', 'topic_id', $topic_ids);
sync('topic', 'topic_id', $topic_ids, true);
sync('forum', 'forum_id', $forum_ids, true, true);
+
+ /**
+ * Perform additional actions after move post sync
+ *
+ * @event core.move_posts_sync_after
+ * @var array post_ids Array of the moved post ids
+ * @var int topic_id The topic id the posts are moved to
+ * @var bool auto_sync Whether or not to perform auto sync
+ * @var array forum_ids Array of the forum ids the posts are moved from
+ * @var array topic_ids Array of the topic ids the posts are moved from
+ * @var array forum_row Array with the forum id of the topic the posts are moved to
+ * @since 3.1.11-RC1
+ */
+ $vars = array(
+ 'post_ids',
+ 'topic_id',
+ 'auto_sync',
+ 'forum_ids',
+ 'topic_ids',
+ 'forum_row',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.move_posts_sync_after', compact($vars)));
}
// Update posted information
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 498d468983..326378d815 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -1546,6 +1546,23 @@ function phpbb_get_user_rank($user_data, $user_posts)
}
}
+ /**
+ * Modify a user's rank before displaying
+ *
+ * @event core.get_user_rank_after
+ * @var array user_data Array with user's data
+ * @var int user_posts User_posts to change
+ * @var array user_rank_data User rank data
+ * @since 3.1.11-RC1
+ */
+
+ $vars = array(
+ 'user_data',
+ 'user_posts',
+ 'user_rank_data',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.get_user_rank_after', compact($vars)));
+
return $user_rank_data;
}
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index d68709f2f8..e00be1e01a 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -124,7 +124,7 @@ function wrap_img_in_html($src, $title)
*/
function send_file_to_browser($attachment, $upload_dir, $category)
{
- global $user, $db, $phpbb_root_path, $request;
+ global $user, $db, $phpbb_dispatcher, $phpbb_root_path, $request;
$filename = $phpbb_root_path . $upload_dir . '/' . $attachment['physical_filename'];
@@ -149,6 +149,26 @@ function send_file_to_browser($attachment, $upload_dir, $category)
// Now send the File Contents to the Browser
$size = @filesize($filename);
+ /**
+ * Event to alter attachment before it is sent to browser.
+ *
+ * @event core.send_file_to_browser_before
+ * @var array attachment Attachment data
+ * @var string upload_dir Relative path of upload directory
+ * @var int category Attachment category
+ * @var string filename Path to file, including filename
+ * @var int size File size
+ * @since 3.1.11-RC1
+ */
+ $vars = array(
+ 'attachment',
+ 'upload_dir',
+ 'category',
+ 'filename',
+ 'size',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.send_file_to_browser_before', compact($vars)));
+
// To correctly display further errors we need to make sure we are using the correct headers for both (unsetting content-length may not work)
// Check if headers already sent or not able to get the file contents.
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 227ac3fe0c..8e1a9007e3 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -1299,7 +1299,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
*/
function user_unban($mode, $ban)
{
- global $db, $user, $cache, $phpbb_log;
+ global $db, $user, $cache, $phpbb_log, $phpbb_dispatcher;
// Delete stale bans
$sql = 'DELETE FROM ' . BANLIST_TABLE . '
@@ -1373,6 +1373,20 @@ function user_unban($mode, $ban)
));
}
}
+
+ /**
+ * Use this event to perform actions after the unban has been performed
+ *
+ * @event core.user_unban
+ * @var string mode One of the following: user, ip, email
+ * @var array user_ids_ary Array with user_ids
+ * @since 3.1.11-RC1
+ */
+ $vars = array(
+ 'mode',
+ 'user_ids_ary',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.user_unban', compact($vars)));
}
$cache->destroy('sql', BANLIST_TABLE);
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index a06d1bd0a6..b5bb406d7d 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -545,7 +545,7 @@ function get_pm_from($folder_id, $folder, $user_id)
AND $folder_sql
AND t.msg_id = p.msg_id
$sql_limit_time",
- 'ORDER' => $sql_sort_order,
+ 'ORDER_BY' => $sql_sort_order,
);
/**
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index c5ce9f2ec7..3356195dd6 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -664,10 +664,19 @@ class ucp_profile
'user_avatar_height' => $result['avatar_height'],
);
+ /**
+ * Trigger events on successfull avatar change
+ *
+ * @event core.ucp_profile_avatar_sql
+ * @var array result Array with data to be stored in DB
+ * @since 3.1.11-RC1
+ */
+ $vars = array('result');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_profile_avatar_sql', compact($vars)));
+
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $result) . '
WHERE user_id = ' . (int) $user->data['user_id'];
-
$db->sql_query($sql);
meta_refresh(3, $this->u_action);
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 1b62790700..594100ac65 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -45,6 +45,28 @@ class ucp_register
$change_lang = $request->variable('change_lang', '');
$user_lang = $request->variable('lang', $user->lang_name);
+ /**
+ * Add UCP register data before they are assigned to the template or submitted
+ *
+ * To assign data to the template, use $template->assign_vars()
+ *
+ * @event core.ucp_register_requests_after
+ * @var bool coppa Is set coppa
+ * @var bool agreed Did user agree to coppa?
+ * @var bool submit Is set post submit?
+ * @var string change_lang Change language request
+ * @var string user_lang User language request
+ * @since 3.1.11-RC1
+ */
+ $vars = array(
+ 'coppa',
+ 'agreed',
+ 'submit',
+ 'change_lang',
+ 'user_lang',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_register_requests_after', compact($vars)));
+
if ($agreed)
{
add_form_key('ucp_register');
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index c66f728c06..0cc4decb40 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -341,6 +341,7 @@ $lang = array_merge($lang, array(
'INTERESTS' => 'Interests',
'INVALID_DIGEST_CHALLENGE' => 'Invalid digest challenge.',
'INVALID_EMAIL_LOG' => '<strong>%s</strong> possibly an invalid email address?',
+ 'INVALID_FEED_ATTACHMENTS' => 'The selected feed tried fetching attachments with invalid constraints.',
'INVALID_PLURAL_RULE' => 'The chosen plural rule is invalid. Valid values are integers between 0 and 15.',
'IP' => 'IP',
'IP_BLACKLISTED' => 'Your IP %1$s has been blocked because it is blacklisted. For details please see <a href="%2$s">%2$s</a>.',
diff --git a/phpBB/phpbb/console/command/reparser/list_all.php b/phpBB/phpbb/console/command/reparser/list_all.php
index 028468649d..a79578abf0 100644
--- a/phpBB/phpbb/console/command/reparser/list_all.php
+++ b/phpBB/phpbb/console/command/reparser/list_all.php
@@ -34,10 +34,10 @@ class list_all extends \phpbb\console\command\command
{
parent::__construct($user);
$this->reparser_names = array();
- foreach ($reparsers as $name => $reparser)
+ foreach ($reparsers as $reparser)
{
// Store the names without the "text_reparser." prefix
- $this->reparser_names[] = preg_replace('(^text_reparser\\.)', '', $name);
+ $this->reparser_names[] = $reparser->get_name();
}
}
diff --git a/phpBB/phpbb/console/command/reparser/reparse.php b/phpBB/phpbb/console/command/reparser/reparse.php
index cebeee0919..f285977ea2 100644
--- a/phpBB/phpbb/console/command/reparser/reparse.php
+++ b/phpBB/phpbb/console/command/reparser/reparse.php
@@ -140,13 +140,9 @@ class reparse extends \phpbb\console\command\command
}
$name = $input->getArgument('reparser-name');
- if (isset($name))
+ if ($name)
{
- // Allow "post_text" to be an alias for "text_reparser.post_text"
- if (!isset($this->reparsers[$name]))
- {
- $name = 'text_reparser.' . $name;
- }
+ $name = $this->reparser_manager->find_reparser($name);
$this->reparse($name);
}
else
@@ -187,7 +183,7 @@ class reparse extends \phpbb\console\command\command
/**
* Reparse all text handled by given reparser within given range
*
- * @param string $name Reparser name
+ * @param string $name Reparser service name
*/
protected function reparse($name)
{
@@ -218,10 +214,10 @@ class reparse extends \phpbb\console\command\command
return;
}
- $this->io->section($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', preg_replace('(^text_reparser\\.)', '', $name), $min, $max));
+ $this->io->section($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', $reparser->get_name(), $min, $max));
$progress = $this->create_progress_bar($max, $this->io, $this->output, true);
- $progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING_START', preg_replace('(^text_reparser\\.)', '', $name)));
+ $progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING_START', $reparser->get_name()));
$progress->start();
// Start from $max and decrement $current by $size until we reach $min
@@ -231,7 +227,7 @@ class reparse extends \phpbb\console\command\command
$start = max($min, $current + 1 - $size);
$end = max($min, $current);
- $progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', preg_replace('(^text_reparser\\.)', '', $name), $start, $end));
+ $progress->setMessage($this->user->lang('CLI_REPARSER_REPARSE_REPARSING', $reparser->get_name(), $start, $end));
$reparser->reparse_range($start, $end);
$current = $start - 1;
diff --git a/phpBB/phpbb/cron/task/text_reparser/reparser.php b/phpBB/phpbb/cron/task/text_reparser/reparser.php
index 7099128efd..69392f5ac9 100644
--- a/phpBB/phpbb/cron/task/text_reparser/reparser.php
+++ b/phpBB/phpbb/cron/task/text_reparser/reparser.php
@@ -81,7 +81,7 @@ class reparser extends \phpbb\cron\task\base
*/
public function set_reparser($reparser)
{
- $this->reparser_name = (!isset($this->reparsers[$reparser]) ? 'text_reparser.' : '') . $reparser;
+ $this->reparser_name = !isset($this->reparsers[$reparser]) ? $this->reparser_manager->find_reparser($reparser) : $reparser;
if ($this->resume_data === null)
{
diff --git a/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php b/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php
index 2d4d26ae61..d43d432dd9 100644
--- a/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php
+++ b/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php
@@ -52,6 +52,7 @@ class notification_options_reconvert extends \phpbb\db\migration\migration
{
$limit = 250;
$converted_users = 0;
+ $start = $start ?: 0;
$sql = 'SELECT user_id, user_notify_type, user_notify_pm
FROM ' . $this->table_prefix . 'users
diff --git a/phpBB/phpbb/db/migration/data/v31x/increase_size_of_emotion.php b/phpBB/phpbb/db/migration/data/v31x/increase_size_of_emotion.php
new file mode 100644
index 0000000000..7e486aca7c
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/increase_size_of_emotion.php
@@ -0,0 +1,46 @@
+<?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\v31x;
+
+class increase_size_of_emotion extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v3110',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'smilies' => array(
+ 'emotion' => array('VCHAR_UNI', ''),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'smilies' => array(
+ 'emotion' => array('VCHAR_UNI:50', ''),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/profilefield_base_migration.php b/phpBB/phpbb/db/migration/profilefield_base_migration.php
index 3f26a4998c..bc542a8fed 100644
--- a/phpBB/phpbb/db/migration/profilefield_base_migration.php
+++ b/phpBB/phpbb/db/migration/profilefield_base_migration.php
@@ -191,6 +191,7 @@ abstract class profilefield_base_migration extends container_aware_migration
$insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, $this->table_prefix . 'profile_fields_data');
$limit = 250;
$converted_users = 0;
+ $start = $start ?: 0;
$sql = 'SELECT user_id, ' . $this->user_column_name . '
FROM ' . $this->table_prefix . 'users
diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php
index 4d5f189f12..ac1a1a1733 100644
--- a/phpBB/phpbb/di/container_builder.php
+++ b/phpBB/phpbb/di/container_builder.php
@@ -51,6 +51,11 @@ class container_builder
protected $container;
/**
+ * @var \phpbb\db\driver\driver_interface
+ */
+ protected $dbal_connection = null;
+
+ /**
* Indicates whether extensions should be used (default to true).
*
* @var bool
@@ -197,6 +202,8 @@ class container_builder
$this->container->set('config.php', $this->config_php_file);
}
+ $this->inject_dbal_driver();
+
return $this->container;
}
catch (\Exception $e)
@@ -511,7 +518,38 @@ class container_builder
{
$this->container->setParameter($key, $value);
}
+ }
+ /**
+ * Inject the dbal connection driver into container
+ */
+ protected function inject_dbal_driver()
+ {
+ if (empty($this->config_php_file))
+ {
+ return;
+ }
+
+ $config_data = $this->config_php_file->get_all();
+ if (!empty($config_data))
+ {
+ if ($this->dbal_connection === null)
+ {
+ $dbal_driver_class = $this->config_php_file->convert_30_dbms_to_31($this->config_php_file->get('dbms'));
+ /** @var \phpbb\db\driver\driver_interface $dbal_connection */
+ $this->dbal_connection = new $dbal_driver_class();
+ $this->dbal_connection->sql_connect(
+ $this->config_php_file->get('dbhost'),
+ $this->config_php_file->get('dbuser'),
+ $this->config_php_file->get('dbpasswd'),
+ $this->config_php_file->get('dbname'),
+ $this->config_php_file->get('dbport'),
+ false,
+ defined('PHPBB_DB_NEW_LINK') && PHPBB_DB_NEW_LINK
+ );
+ }
+ $this->container->set('dbal.conn.driver', $this->dbal_connection);
+ }
}
/**
diff --git a/phpBB/phpbb/di/extension/config.php b/phpBB/phpbb/di/extension/config.php
index 7984a783df..8c9de48823 100644
--- a/phpBB/phpbb/di/extension/config.php
+++ b/phpBB/phpbb/di/extension/config.php
@@ -43,12 +43,6 @@ class config extends Extension
'core.adm_relative_path' => $this->config_php->get('phpbb_adm_relative_path') ? $this->config_php->get('phpbb_adm_relative_path') : 'adm/',
'core.table_prefix' => $this->config_php->get('table_prefix'),
'cache.driver.class' => $this->convert_30_acm_type($this->config_php->get('acm_type')),
- 'dbal.driver.class' => $this->config_php->convert_30_dbms_to_31($this->config_php->get('dbms')),
- 'dbal.dbhost' => $this->config_php->get('dbhost'),
- 'dbal.dbuser' => $this->config_php->get('dbuser'),
- 'dbal.dbpasswd' => $this->config_php->get('dbpasswd'),
- 'dbal.dbname' => $this->config_php->get('dbname'),
- 'dbal.dbport' => $this->config_php->get('dbport'),
'dbal.new_link' => defined('PHPBB_DB_NEW_LINK') && PHPBB_DB_NEW_LINK,
);
$parameter_bag = $container->getParameterBag();
diff --git a/phpBB/phpbb/di/proxy_instantiator.php b/phpBB/phpbb/di/proxy_instantiator.php
index a388e82c0e..70295a3dec 100644
--- a/phpBB/phpbb/di/proxy_instantiator.php
+++ b/phpBB/phpbb/di/proxy_instantiator.php
@@ -13,8 +13,6 @@
namespace phpbb\di;
-use bantu\IniGetWrapper\IniGetWrapper;
-use phpbb\filesystem\filesystem;
use ProxyManager\Configuration;
use ProxyManager\Factory\LazyLoadingValueHolderFactory;
use ProxyManager\GeneratorStrategy\EvaluatingGeneratorStrategy;
@@ -45,11 +43,8 @@ class proxy_instantiator implements InstantiatorInterface
// Prevent trying to write to system temp dir in case of open_basedir
// restrictions being in effect
- $ini_wrapper = new IniGetWrapper();
- $filesystem = new filesystem();
$tmp_dir = (function_exists('sys_get_temp_dir')) ? sys_get_temp_dir() : '';
- if (empty($tmp_dir) || $ini_wrapper->getString('open_basedir') &&
- (!$filesystem->exists($tmp_dir) || !$filesystem->is_writable($tmp_dir)))
+ if (empty($tmp_dir) || !@file_exists($tmp_dir) || !@is_writable($tmp_dir))
{
$config->setProxiesTargetDir($cache_dir);
}
diff --git a/phpBB/phpbb/extension/metadata_manager.php b/phpBB/phpbb/extension/metadata_manager.php
index fe64c92ee1..2b8b1bbd6a 100644
--- a/phpBB/phpbb/extension/metadata_manager.php
+++ b/phpBB/phpbb/extension/metadata_manager.php
@@ -102,8 +102,9 @@ class metadata_manager
return $this->metadata;
break;
+ case 'version':
case 'name':
- return ($this->validate('name')) ? $this->metadata['name'] : false;
+ return ($this->validate($element)) ? $this->metadata[$element] : false;
break;
case 'display-name':
diff --git a/phpBB/phpbb/feed/attachments_base.php b/phpBB/phpbb/feed/attachments_base.php
index b14dafe15a..5d3272e0d9 100644
--- a/phpBB/phpbb/feed/attachments_base.php
+++ b/phpBB/phpbb/feed/attachments_base.php
@@ -25,8 +25,11 @@ abstract class attachments_base extends base
/**
* Retrieve the list of attachments that may be displayed
+ *
+ * @param array $post_ids Specify for which post IDs to fetch the attachments (optional)
+ * @param array $topic_ids Specify for which topic IDs to fetch the attachments (optional)
*/
- protected function fetch_attachments()
+ protected function fetch_attachments($post_ids = array(), $topic_ids = array())
{
$sql_array = array(
'SELECT' => 'a.*',
@@ -37,7 +40,20 @@ abstract class attachments_base extends base
'ORDER_BY' => 'a.filetime DESC, a.post_msg_id ASC',
);
- if (isset($this->topic_id))
+ if (!empty($post_ids))
+ {
+ $sql_array['WHERE'] .= 'AND ' . $this->db->sql_in_set('a.post_msg_id', $post_ids);
+ }
+ else if (!empty($topic_ids))
+ {
+ if (isset($this->topic_id))
+ {
+ $topic_ids[] = $this->topic_id;
+ }
+
+ $sql_array['WHERE'] .= 'AND ' . $this->db->sql_in_set('a.topic_id', $topic_ids);
+ }
+ else if (isset($this->topic_id))
{
$sql_array['WHERE'] .= 'AND a.topic_id = ' . (int) $this->topic_id;
}
@@ -51,6 +67,11 @@ abstract class attachments_base extends base
);
$sql_array['WHERE'] .= 'AND t.forum_id = ' . (int) $this->forum_id;
}
+ else
+ {
+ // Do not allow querying the full attachments table
+ throw new \RuntimeException($this->user->lang('INVALID_FEED_ATTACHMENTS'));
+ }
$sql = $this->db->sql_build_query('SELECT', $sql_array);
$result = $this->db->sql_query($sql);
@@ -64,15 +85,6 @@ abstract class attachments_base extends base
}
/**
- * {@inheritDoc}
- */
- public function open()
- {
- parent::open();
- $this->fetch_attachments();
- }
-
- /**
* Get attachments related to a given post
*
* @param $post_id int Post id
diff --git a/phpBB/phpbb/feed/forum.php b/phpBB/phpbb/feed/forum.php
index f522e91169..0c142e8cc8 100644
--- a/phpBB/phpbb/feed/forum.php
+++ b/phpBB/phpbb/feed/forum.php
@@ -138,6 +138,8 @@ class forum extends post_base
return false;
}
+ parent::fetch_attachments(array(), $topic_ids);
+
$this->sql = array(
'SELECT' => 'p.post_id, p.topic_id, p.post_time, p.post_edit_time, p.post_visibility, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment, ' .
'u.username, u.user_id',
diff --git a/phpBB/phpbb/feed/news.php b/phpBB/phpbb/feed/news.php
index fb6fa09278..13ca82c093 100644
--- a/phpBB/phpbb/feed/news.php
+++ b/phpBB/phpbb/feed/news.php
@@ -90,6 +90,8 @@ class news extends topic_base
return false;
}
+ parent::fetch_attachments($post_ids);
+
$this->sql = array(
'SELECT' => 'f.forum_id, f.forum_name,
t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_views, t.topic_time, t.topic_last_post_time,
diff --git a/phpBB/phpbb/feed/overall.php b/phpBB/phpbb/feed/overall.php
index 40cf94ace0..b083df922d 100644
--- a/phpBB/phpbb/feed/overall.php
+++ b/phpBB/phpbb/feed/overall.php
@@ -55,6 +55,8 @@ class overall extends post_base
return false;
}
+ parent::fetch_attachments(array(), $topic_ids);
+
// Get the actual data
$this->sql = array(
'SELECT' => 'f.forum_id, f.forum_name, ' .
diff --git a/phpBB/phpbb/feed/topic.php b/phpBB/phpbb/feed/topic.php
index e5f2c41468..2504e411b1 100644
--- a/phpBB/phpbb/feed/topic.php
+++ b/phpBB/phpbb/feed/topic.php
@@ -126,6 +126,8 @@ class topic extends post_base
*/
protected function get_sql()
{
+ parent::fetch_attachments();
+
$this->sql = array(
'SELECT' => 'p.post_id, p.post_time, p.post_edit_time, p.post_visibility, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment, ' .
'u.username, u.user_id',
diff --git a/phpBB/phpbb/feed/topics.php b/phpBB/phpbb/feed/topics.php
index cf4a2e579e..183c29d11c 100644
--- a/phpBB/phpbb/feed/topics.php
+++ b/phpBB/phpbb/feed/topics.php
@@ -58,6 +58,8 @@ class topics extends topic_base
return false;
}
+ parent::fetch_attachments($post_ids);
+
$this->sql = array(
'SELECT' => 'f.forum_id, f.forum_name,
t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_views, t.topic_time, t.topic_last_post_time,
diff --git a/phpBB/phpbb/feed/topics_active.php b/phpBB/phpbb/feed/topics_active.php
index 52340dc2d5..7ae0bde56b 100644
--- a/phpBB/phpbb/feed/topics_active.php
+++ b/phpBB/phpbb/feed/topics_active.php
@@ -77,6 +77,8 @@ class topics_active extends topic_base
return false;
}
+ parent::fetch_attachments($post_ids);
+
$this->sql = array(
'SELECT' => 'f.forum_id, f.forum_name,
t.topic_id, t.topic_title, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_views,
diff --git a/phpBB/phpbb/install/module/install_finish/task/populate_migrations.php b/phpBB/phpbb/install/module/install_finish/task/populate_migrations.php
index 34541c361e..cebf0f425f 100644
--- a/phpBB/phpbb/install/module/install_finish/task/populate_migrations.php
+++ b/phpBB/phpbb/install/module/install_finish/task/populate_migrations.php
@@ -70,6 +70,7 @@ class populate_migrations extends \phpbb\install\task_base
$migrations = $finder
->core_path('phpbb/db/migration/data/')
+ ->set_extensions(array())
->get_classes();
$this->migrator->populate_migrations($migrations);
}
diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php
index a47fc87adf..eb698fb35d 100644
--- a/phpBB/phpbb/plupload/plupload.php
+++ b/phpBB/phpbb/plupload/plupload.php
@@ -266,7 +266,7 @@ class plupload
if ($this->config['img_max_height'] > 0 && $this->config['img_max_width'] > 0)
{
$resize = sprintf(
- 'resize: {width: %d, height: %d, quality: 100},',
+ 'resize: {width: %d, height: %d, quality: 85},',
(int) $this->config['img_max_width'],
(int) $this->config['img_max_height']
);
diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php
index 4ee48205c8..8bf6c10e2d 100644
--- a/phpBB/phpbb/template/context.php
+++ b/phpBB/phpbb/template/context.php
@@ -365,15 +365,15 @@ class context
if ($mode == 'insert')
{
// Make sure we are not exceeding the last iteration
- if ($key >= sizeof($this->tpldata[$blockname]))
+ if ($key >= sizeof($block))
{
- $key = sizeof($this->tpldata[$blockname]);
- unset($this->tpldata[$blockname][($key - 1)]['S_LAST_ROW']);
+ $key = sizeof($block);
+ unset($block[($key - 1)]['S_LAST_ROW']);
$vararray['S_LAST_ROW'] = true;
}
else if ($key === 0)
{
- unset($this->tpldata[$blockname][0]['S_FIRST_ROW']);
+ unset($block[0]['S_FIRST_ROW']);
$vararray['S_FIRST_ROW'] = true;
}
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php
index a310c67359..55149b8e63 100644
--- a/phpBB/phpbb/textformatter/s9e/factory.php
+++ b/phpBB/phpbb/textformatter/s9e/factory.php
@@ -348,10 +348,10 @@ class factory implements \phpbb\textformatter\cache_interface
$configurator->registeredVars['max_img_width'] = 0;
// Load the Emoji plugin and modify its tag's template to obey viewsmilies
- $configurator->Emoji->setImageSize(18);
+ $configurator->Emoji->omitImageSize();
$configurator->Emoji->useSVG();
$tag = $configurator->Emoji->getTag();
- $tag->template = '<xsl:choose><xsl:when test="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="smilies"', $tag->template) . '</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose>';
+ $tag->template = '<xsl:choose><xsl:when test="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="emoji smilies"', $tag->template) . '</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose>';
/**
* Modify the s9e\TextFormatter configurator after the default settings are set
diff --git a/phpBB/phpbb/textreparser/base.php b/phpBB/phpbb/textreparser/base.php
index afa5ccacad..27d7bc1f27 100644
--- a/phpBB/phpbb/textreparser/base.php
+++ b/phpBB/phpbb/textreparser/base.php
@@ -16,6 +16,11 @@ namespace phpbb\textreparser;
abstract class base implements reparser_interface
{
/**
+ * @var string The reparser name
+ */
+ protected $name;
+
+ /**
* @var bool Whether to save changes to the database
*/
protected $save_changes = true;
@@ -90,6 +95,26 @@ abstract class base implements reparser_interface
}
/**
+ * Returns the name of the reparser
+ *
+ * @return string Name of reparser
+ */
+ public function get_name()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Sets the name of the reparser
+ *
+ * @param string $name The reparser name
+ */
+ public function set_name($name)
+ {
+ $this->name = $name;
+ }
+
+ /**
* Disable saving changes to the database
*/
public function disable_save()
@@ -231,7 +256,7 @@ abstract class base implements reparser_interface
$unparsed['enable_flash_bbcode'],
$unparsed['enable_quote_bbcode'],
$unparsed['enable_url_bbcode'],
- 'reparse'
+ 'text_reparser.' . $this->get_name()
);
// Save the new text if it has changed and it's not a dry run
diff --git a/phpBB/phpbb/textreparser/manager.php b/phpBB/phpbb/textreparser/manager.php
index fddd867923..7ca65d708d 100644
--- a/phpBB/phpbb/textreparser/manager.php
+++ b/phpBB/phpbb/textreparser/manager.php
@@ -125,4 +125,24 @@ class manager
$this->schedule($reparser, $interval);
}
}
+
+ /**
+ * Finds a reparser by name.
+ *
+ * If there is no reparser with the specified name, null is returned.
+ *
+ * @param string $name Name of the reparser to look up.
+ * @return string A reparser service name, or null.
+ */
+ public function find_reparser($name)
+ {
+ foreach ($this->reparsers as $service => $reparser)
+ {
+ if ($reparser->get_name() == $name)
+ {
+ return $service;
+ }
+ }
+ return null;
+ }
}
diff --git a/phpBB/phpbb/textreparser/reparser_interface.php b/phpBB/phpbb/textreparser/reparser_interface.php
index 9ea1732870..912de10058 100644
--- a/phpBB/phpbb/textreparser/reparser_interface.php
+++ b/phpBB/phpbb/textreparser/reparser_interface.php
@@ -23,6 +23,20 @@ interface reparser_interface
public function get_max_id();
/**
+ * Returns the name of the reparser
+ *
+ * @return string Name of reparser
+ */
+ public function get_name();
+
+ /**
+ * Sets the name of the reparser
+ *
+ * @param string $name The reparser name
+ */
+ public function set_name($name);
+
+ /**
* Reparse all records in given range
*
* @param integer $min_id Lower bound
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
index 59317da8f7..e2a086060c 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
@@ -167,6 +167,7 @@
</div>
</div>
+<!-- EVENT ucp_pm_viewmessage_options_before -->
<!-- IF S_VIEW_MESSAGE -->
<fieldset class="display-options">
diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html
index 655c0fc48c..38413addba 100644
--- a/phpBB/styles/prosilver/template/ucp_register.html
+++ b/phpBB/styles/prosilver/template/ucp_register.html
@@ -79,8 +79,6 @@
<!-- ENDIF -->
<!-- IF S_COPPA -->
-
-
<div class="panel">
<div class="inner">
@@ -91,6 +89,8 @@
</div>
<!-- ENDIF -->
+<!-- EVENT ucp_register_buttons_before -->
+
<div class="panel">
<div class="inner">
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 1a2c13a758..8505ac13f9 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -339,18 +339,19 @@ ul.linklist.bulletin > li.no-bulletin:before {
vertical-align: top;
}
-.header-avatar:hover {
+a.header-avatar,
+a.header-avatar:hover {
text-decoration: none;
}
-.header-avatar img {
+a.header-avatar img {
margin-bottom: 2px;
max-height: 20px;
vertical-align: middle;
width: auto;
}
-.header-avatar span:after {
+a.header-avatar span:after {
content: '\f0dd';
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
@@ -1046,6 +1047,13 @@ ul.linklist:after,
display: block;
}
+.emoji {
+ min-height: 18px;
+ min-width: 18px;
+ height: 1em;
+ width: 1em;
+}
+
.smilies {
vertical-align: text-bottom;
}
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css
index ef18e26ef1..53beee621d 100644
--- a/phpBB/styles/prosilver/theme/content.css
+++ b/phpBB/styles/prosilver/theme/content.css
@@ -514,7 +514,7 @@ blockquote .codebox {
height: auto;
max-height: 200px;
padding-top: 5px;
- font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
+ font: 0.9em Monaco, "Andale Mono","Courier New", Courier, monospace;
line-height: 1.3em;
margin: 2px 0;
}
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index cdffe69155..0ab29315ee 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -786,9 +786,11 @@ $topic_tracking_info = $tracking_topics = array();
* @var array topic_list Array with current viewforum page topic ids
* @var array rowset Array with topics data (in topic_id => topic_data format)
* @var int total_topic_count Forum's total topic count
+* @var int forum_id Forum identifier
* @since 3.1.0-b3
+* @changed 3.1.11-RC1 Added forum_id
*/
-$vars = array('topic_list', 'rowset', 'total_topic_count');
+$vars = array('topic_list', 'rowset', 'total_topic_count', 'forum_id');
extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_topics_data', compact($vars)));
// Okay, lets dump out the page ...