aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/build.xml6
-rw-r--r--phpBB/adm/style/installer_header.html1
-rw-r--r--phpBB/adm/style/overall_header.html1
-rw-r--r--phpBB/adm/style/simple_header.html1
-rw-r--r--phpBB/assets/javascript/editor.js6
-rw-r--r--phpBB/assets/javascript/installer.js60
-rw-r--r--phpBB/composer.json2
-rw-r--r--phpBB/composer.lock278
-rw-r--r--phpBB/config/default/container/services.yml2
-rw-r--r--phpBB/config/default/container/services_attachment.yml8
-rw-r--r--phpBB/config/default/container/services_captcha.yml12
-rw-r--r--phpBB/config/default/container/services_cron.yml1
-rw-r--r--phpBB/config/default/container/services_db.yml14
-rw-r--r--phpBB/config/default/container/services_feed.yml14
-rw-r--r--phpBB/config/default/container/services_files.yml10
-rw-r--r--phpBB/config/default/container/services_notification.yml46
-rw-r--r--phpBB/config/default/container/services_report.yml6
-rw-r--r--phpBB/config/default/container/services_routing.yml3
-rw-r--r--phpBB/config/default/container/services_text_formatter.yml2
-rw-r--r--phpBB/config/default/container/services_twig.yml2
-rw-r--r--phpBB/config/installer/container/services.yml2
-rw-r--r--phpBB/config/installer/container/services_install_console.yml29
-rw-r--r--phpBB/config/installer/container/services_install_controller.yml6
-rw-r--r--phpBB/config/installer/container/services_install_finish.yml2
-rw-r--r--phpBB/config/installer/container/services_install_navigation.yml8
-rw-r--r--phpBB/config/installer/container/services_installer.yml1
-rw-r--r--phpBB/config/installer/routing/installer.yml5
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/docs/FAQ.html1
-rw-r--r--phpBB/docs/INSTALL.html1
-rw-r--r--phpBB/docs/README.html9
-rw-r--r--phpBB/docs/auth_api.html1
-rw-r--r--phpBB/docs/coding-guidelines.html1
-rw-r--r--phpBB/docs/nginx.sample.conf25
-rw-r--r--phpBB/docs/update-config.sample.yml2
-rw-r--r--phpBB/includes/acp/acp_users.php5
-rw-r--r--phpBB/includes/bbcode.php4
-rw-r--r--phpBB/includes/constants.php2
-rw-r--r--phpBB/includes/functions.php57
-rw-r--r--phpBB/includes/functions_content.php32
-rw-r--r--phpBB/includes/functions_download.php3
-rw-r--r--phpBB/includes/functions_messenger.php4
-rw-r--r--phpBB/includes/functions_posting.php8
-rw-r--r--phpBB/includes/mcp/mcp_warn.php24
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php2
-rw-r--r--phpBB/includes/ucp/ucp_profile.php5
-rw-r--r--phpBB/install/convert/convertor.php2
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php2
-rwxr-xr-xphpBB/install/phpbbcli.php2
-rw-r--r--phpBB/install/schemas/schema_data.sql2
-rw-r--r--phpBB/language/en/acp/common.php1
-rw-r--r--phpBB/language/en/captcha_qa.php2
-rw-r--r--phpBB/language/en/common.php2
-rw-r--r--phpBB/language/en/install.php6
-rw-r--r--phpBB/language/en/ucp.php2
-rw-r--r--phpBB/memberlist.php3
-rw-r--r--phpBB/phpbb/avatar/driver/upload.php14
-rw-r--r--phpBB/phpbb/cache/driver/file.php4
-rw-r--r--phpBB/phpbb/cache/driver/memory.php4
-rw-r--r--phpBB/phpbb/captcha/plugins/qa.php34
-rw-r--r--phpBB/phpbb/composer.json2
-rw-r--r--phpBB/phpbb/controller/helper.php9
-rw-r--r--phpBB/phpbb/cron/task/core/queue.php19
-rw-r--r--phpBB/phpbb/db/driver/driver.php1
-rw-r--r--phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php13
-rw-r--r--phpBB/phpbb/db/migration/data/v320/notifications_board.php2
-rw-r--r--phpBB/phpbb/di/container_builder.php1
-rw-r--r--phpBB/phpbb/install/console/command/install/config/show.php12
-rw-r--r--phpBB/phpbb/install/console/command/install/config/validate.php10
-rw-r--r--phpBB/phpbb/install/console/command/install/install.php2
-rw-r--r--phpBB/phpbb/install/console/command/update/config/show.php123
-rw-r--r--phpBB/phpbb/install/console/command/update/config/validate.php124
-rw-r--r--phpBB/phpbb/install/console/command/update/update.php179
-rw-r--r--phpBB/phpbb/install/controller/timeout_check.php80
-rw-r--r--phpBB/phpbb/install/event/kernel_exception_subscriber.php1
-rw-r--r--phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php41
-rw-r--r--phpBB/phpbb/install/installer.php22
-rw-r--r--phpBB/phpbb/install/module/install_data/task/add_bots.php1
-rw-r--r--phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php8
-rw-r--r--phpBB/phpbb/install/module/requirements/task/check_update.php2
-rw-r--r--phpBB/phpbb/install/updater_configuration.php40
-rw-r--r--phpBB/phpbb/notification/manager.php4
-rw-r--r--phpBB/phpbb/notification/method/messenger_base.php2
-rw-r--r--phpBB/phpbb/recursive_dot_prefix_filter_iterator.php2
-rw-r--r--phpBB/phpbb/routing/router.php31
-rw-r--r--phpBB/phpbb/textreparser/base.php3
-rw-r--r--phpBB/phpbb/user.php2
-rw-r--r--phpBB/posting.php4
-rw-r--r--phpBB/styles/prosilver/style.cfg4
-rw-r--r--phpBB/styles/prosilver/template/navbar_header.html4
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html1
-rw-r--r--phpBB/styles/prosilver/template/simple_header.html1
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html1
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_print.html1
-rw-r--r--phpBB/viewforum.php44
-rw-r--r--phpBB/viewtopic.php30
-rw-r--r--tests/controller/common_helper_route.php2
-rw-r--r--tests/controller/controller_test.php2
-rw-r--r--tests/functional/visit_installer_test.php30
-rw-r--r--tests/pagination/pagination_test.php2
-rw-r--r--tests/session/testable_factory.php3
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php3
-rw-r--r--tests/text_processing/decode_message_test.php17
-rw-r--r--tests/text_reparser/base_test.php70
-rw-r--r--tests/text_reparser/fixtures/base.xml19
-rwxr-xr-xtravis/setup-phpbb.sh2
-rwxr-xr-xtravis/setup-webserver.sh22
107 files changed, 1402 insertions, 391 deletions
diff --git a/build/build.xml b/build/build.xml
index d9a182fbc1..7a244e48d9 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.0-b2-dev" />
- <property name="prevversion" value="3.2.0-b1" />
- <property name="olderversions" value="3.0.14, 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.2.0-a1, 3.2.0-a2" />
+ <property name="newversion" value="3.2.0-b3-dev" />
+ <property name="prevversion" value="3.2.0-b2" />
+ <property name="olderversions" value="3.0.14, 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.2.0-a1, 3.2.0-a2, 3.2.0-b1" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
diff --git a/phpBB/adm/style/installer_header.html b/phpBB/adm/style/installer_header.html
index 775caa7c67..704db9e174 100644
--- a/phpBB/adm/style/installer_header.html
+++ b/phpBB/adm/style/installer_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index 9266372ab8..f227f729fd 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html
index f62a7a900e..9f47b2052b 100644
--- a/phpBB/adm/style/simple_header.html
+++ b/phpBB/adm/style/simple_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
diff --git a/phpBB/assets/javascript/editor.js b/phpBB/assets/javascript/editor.js
index df353bc29d..332ab42e37 100644
--- a/phpBB/assets/javascript/editor.js
+++ b/phpBB/assets/javascript/editor.js
@@ -414,6 +414,12 @@ function getCaretPosition(txtarea) {
if ($('#attach-panel').length) {
phpbb.showDragNDrop(textarea);
}
+
+ $('textarea').on('keydown', function (e) {
+ if (e.which === 13 && (e.metaKey || e.ctrlKey)) {
+ $(this).closest('form').submit();
+ }
+ });
});
})(jQuery);
diff --git a/phpBB/assets/javascript/installer.js b/phpBB/assets/javascript/installer.js
index d9f446a28d..a11b76b863 100644
--- a/phpBB/assets/javascript/installer.js
+++ b/phpBB/assets/javascript/installer.js
@@ -13,6 +13,7 @@
var currentProgress = 0;
var refreshRequested = false;
var transmissionOver = false;
+ var statusCount = 0;
// Template related variables
var $contentWrapper = $('.install-body').find('.main');
@@ -339,6 +340,57 @@
}
/**
+ * Processes status data
+ *
+ * @param status
+ */
+ function processTimeoutResponse(status) {
+ if (statusCount === 12) { // 1 minute hard cap
+ status = 'fail';
+ }
+
+ if (status === 'continue') {
+ refreshRequested = false;
+ doRefresh();
+ } else if (status === 'running') {
+ statusCount++;
+ $('#loading_indicator').css('display', 'block');
+ setTimeout(queryInstallerStatus, 5000);
+ } else {
+ $('#loading_indicator').css('display', 'none');
+ addMessage('error',
+ [{
+ title: installLang.title,
+ description: installLang.msg
+ }]
+ );
+ }
+ }
+
+ /**
+ * Queries the installer's status
+ */
+ function queryInstallerStatus() {
+ var url = $(location).attr('pathname');
+ var lookUp = 'install/app.php';
+ var position = url.indexOf(lookUp);
+
+ if (position === -1) {
+ lookUp = 'install';
+ position = url.indexOf(lookUp);
+
+ if (position === -1) {
+ return false;
+ }
+ }
+
+ url = url.substring(0, position) + lookUp + '/installer/status';
+ $.getJSON(url, function(data) {
+ processTimeoutResponse(data.status);
+ });
+ }
+
+ /**
* Process updates in streamed response
*
* @param xhReq XHR object
@@ -372,12 +424,8 @@
}
if (timeoutDetected) {
- addMessage('error',
- [{
- title: installLang.title,
- description: installLang.msg
- }]
- );
+ statusCount = 0;
+ queryInstallerStatus();
}
}
}
diff --git a/phpBB/composer.json b/phpBB/composer.json
index b0c9b57cb6..d6a4213c4a 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -62,7 +62,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "3.2.x-dev"
+ "dev-master": "3.3.x-dev"
}
}
}
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index d10c94a75f..f565c424fa 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "9cbb41222e71eb86e0ef9118baafc691",
- "content-hash": "03a990fa2d088c89afe4824d2d53e873",
+ "hash": "e61304256160e9e0c521a4996912d65d",
+ "content-hash": "64ae8ac9ac0cc8b1f47e58f43e2d7461",
"packages": [
{
"name": "bantu/ini-get-wrapper",
@@ -285,16 +285,16 @@
},
{
"name": "lusitanian/oauth",
- "version": "v0.8.6",
+ "version": "v0.8.9",
"source": {
"type": "git",
"url": "https://github.com/Lusitanian/PHPoAuthLib.git",
- "reference": "769fea1bb53845c7b03cca97cbdd0708e9ec26da"
+ "reference": "29bda6e176df6c292a9b1c43ae8a44d56a87c30b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Lusitanian/PHPoAuthLib/zipball/769fea1bb53845c7b03cca97cbdd0708e9ec26da",
- "reference": "769fea1bb53845c7b03cca97cbdd0708e9ec26da",
+ "url": "https://api.github.com/repos/Lusitanian/PHPoAuthLib/zipball/29bda6e176df6c292a9b1c43ae8a44d56a87c30b",
+ "reference": "29bda6e176df6c292a9b1c43ae8a44d56a87c30b",
"shasum": ""
},
"require": {
@@ -348,7 +348,7 @@
"oauth",
"security"
],
- "time": "2015-12-21 00:06:34"
+ "time": "2016-02-24 00:20:18"
},
{
"name": "marc1706/fast-image-size",
@@ -403,16 +403,16 @@
},
{
"name": "paragonie/random_compat",
- "version": "v1.2.0",
+ "version": "v1.2.2",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
- "reference": "b0e69d10852716b2ccbdff69c75c477637220790"
+ "reference": "b3313b618f4edd76523572531d5d7e22fe747430"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/b0e69d10852716b2ccbdff69c75c477637220790",
- "reference": "b0e69d10852716b2ccbdff69c75c477637220790",
+ "url": "https://api.github.com/repos/paragonie/random_compat/zipball/b3313b618f4edd76523572531d5d7e22fe747430",
+ "reference": "b3313b618f4edd76523572531d5d7e22fe747430",
"shasum": ""
},
"require": {
@@ -447,7 +447,7 @@
"pseudorandom",
"random"
],
- "time": "2016-02-06 03:52:05"
+ "time": "2016-03-11 19:54:08"
},
{
"name": "patchwork/utf8",
@@ -540,16 +540,16 @@
},
{
"name": "react/promise",
- "version": "v2.2.1",
+ "version": "v2.2.2",
"source": {
"type": "git",
"url": "https://github.com/reactphp/promise.git",
- "reference": "3b6fca09c7d56321057fa8867c8dbe1abf648627"
+ "reference": "3aacad8bf10c7d83e6fa2089d413529888c2bedf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/reactphp/promise/zipball/3b6fca09c7d56321057fa8867c8dbe1abf648627",
- "reference": "3b6fca09c7d56321057fa8867c8dbe1abf648627",
+ "url": "https://api.github.com/repos/reactphp/promise/zipball/3aacad8bf10c7d83e6fa2089d413529888c2bedf",
+ "reference": "3aacad8bf10c7d83e6fa2089d413529888c2bedf",
"shasum": ""
},
"require": {
@@ -580,20 +580,20 @@
}
],
"description": "A lightweight implementation of CommonJS Promises/A for PHP",
- "time": "2015-07-03 13:48:55"
+ "time": "2016-02-26 19:09:02"
},
{
"name": "s9e/text-formatter",
- "version": "0.4.10",
+ "version": "0.4.11",
"source": {
"type": "git",
"url": "https://github.com/s9e/TextFormatter.git",
- "reference": "dc6b7b069d17fc18c8a40cce9e1048e25aa11fec"
+ "reference": "e6dc4615081b1668742076aa05d11aa0f7b00103"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/dc6b7b069d17fc18c8a40cce9e1048e25aa11fec",
- "reference": "dc6b7b069d17fc18c8a40cce9e1048e25aa11fec",
+ "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/e6dc4615081b1668742076aa05d11aa0f7b00103",
+ "reference": "e6dc4615081b1668742076aa05d11aa0f7b00103",
"shasum": ""
},
"require": {
@@ -640,26 +640,29 @@
"parser",
"shortcodes"
],
- "time": "2016-02-11 14:03:12"
+ "time": "2016-02-21 20:38:42"
},
{
"name": "symfony/config",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "41ee6c70758f40fa1dbf90d019ae0a66c4a09e74"
+ "reference": "0f8f94e6a32b5c480024eed5fa5cbd2790d0ad19"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/41ee6c70758f40fa1dbf90d019ae0a66c4a09e74",
- "reference": "41ee6c70758f40fa1dbf90d019ae0a66c4a09e74",
+ "url": "https://api.github.com/repos/symfony/config/zipball/0f8f94e6a32b5c480024eed5fa5cbd2790d0ad19",
+ "reference": "0f8f94e6a32b5c480024eed5fa5cbd2790d0ad19",
"shasum": ""
},
"require": {
"php": ">=5.3.9",
"symfony/filesystem": "~2.3|~3.0.0"
},
+ "suggest": {
+ "symfony/yaml": "To use the yaml reference dumper"
+ },
"type": "library",
"extra": {
"branch-alias": {
@@ -690,20 +693,20 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2016-01-03 15:33:41"
+ "time": "2016-02-22 16:12:45"
},
{
"name": "symfony/console",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "d0239fb42f98dd02e7d342f793c5d2cdee0c478d"
+ "reference": "56cc5caf051189720b8de974e4746090aaa10d44"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/d0239fb42f98dd02e7d342f793c5d2cdee0c478d",
- "reference": "d0239fb42f98dd02e7d342f793c5d2cdee0c478d",
+ "url": "https://api.github.com/repos/symfony/console/zipball/56cc5caf051189720b8de974e4746090aaa10d44",
+ "reference": "56cc5caf051189720b8de974e4746090aaa10d44",
"shasum": ""
},
"require": {
@@ -750,20 +753,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2016-01-14 08:33:16"
+ "time": "2016-02-28 16:20:50"
},
{
"name": "symfony/debug",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "386364a0e71158615ab9ae76b74bf84efc0bac7e"
+ "reference": "8e255a0c551d443a8159e3da95b5f99997d100fd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/386364a0e71158615ab9ae76b74bf84efc0bac7e",
- "reference": "386364a0e71158615ab9ae76b74bf84efc0bac7e",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/8e255a0c551d443a8159e3da95b5f99997d100fd",
+ "reference": "8e255a0c551d443a8159e3da95b5f99997d100fd",
"shasum": ""
},
"require": {
@@ -807,20 +810,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2016-01-13 10:28:07"
+ "time": "2016-01-27 05:14:19"
},
{
"name": "symfony/dependency-injection",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "ba94a914e244e0d05f0aaef460d5558d5541d2b1"
+ "reference": "62251761a7615435b22ccf562384c588b431be44"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ba94a914e244e0d05f0aaef460d5558d5541d2b1",
- "reference": "ba94a914e244e0d05f0aaef460d5558d5541d2b1",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/62251761a7615435b22ccf562384c588b431be44",
+ "reference": "62251761a7615435b22ccf562384c588b431be44",
"shasum": ""
},
"require": {
@@ -869,20 +872,20 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
- "time": "2016-01-12 17:46:01"
+ "time": "2016-02-28 16:34:46"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "ee278f7c851533e58ca307f66305ccb9188aceda"
+ "reference": "78c468665c9568c3faaa9c416a7134308f2d85c3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ee278f7c851533e58ca307f66305ccb9188aceda",
- "reference": "ee278f7c851533e58ca307f66305ccb9188aceda",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/78c468665c9568c3faaa9c416a7134308f2d85c3",
+ "reference": "78c468665c9568c3faaa9c416a7134308f2d85c3",
"shasum": ""
},
"require": {
@@ -929,20 +932,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2016-01-13 10:28:07"
+ "time": "2016-01-27 05:14:19"
},
{
"name": "symfony/filesystem",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "637b64d0ee10f44ae98dbad651b1ecdf35a11e8c"
+ "reference": "65cb36b6539b1d446527d60457248f30d045464d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/637b64d0ee10f44ae98dbad651b1ecdf35a11e8c",
- "reference": "637b64d0ee10f44ae98dbad651b1ecdf35a11e8c",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/65cb36b6539b1d446527d60457248f30d045464d",
+ "reference": "65cb36b6539b1d446527d60457248f30d045464d",
"shasum": ""
},
"require": {
@@ -978,20 +981,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2016-01-13 10:28:07"
+ "time": "2016-02-22 15:02:30"
},
{
"name": "symfony/finder",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "c90fabdd97e431ee19b6383999cf35334dff27da"
+ "reference": "877bb4b16ea573cc8c024e9590888fcf7eb7e0f7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/c90fabdd97e431ee19b6383999cf35334dff27da",
- "reference": "c90fabdd97e431ee19b6383999cf35334dff27da",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/877bb4b16ea573cc8c024e9590888fcf7eb7e0f7",
+ "reference": "877bb4b16ea573cc8c024e9590888fcf7eb7e0f7",
"shasum": ""
},
"require": {
@@ -1027,20 +1030,20 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2016-01-14 08:26:52"
+ "time": "2016-02-22 16:12:45"
},
{
"name": "symfony/http-foundation",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "9194b33c71da8ef4d05d22964376f2f9c95a1bfd"
+ "reference": "6f4e41c41e7d352ed9adf71ff6f2ec1756490a1b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/9194b33c71da8ef4d05d22964376f2f9c95a1bfd",
- "reference": "9194b33c71da8ef4d05d22964376f2f9c95a1bfd",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6f4e41c41e7d352ed9adf71ff6f2ec1756490a1b",
+ "reference": "6f4e41c41e7d352ed9adf71ff6f2ec1756490a1b",
"shasum": ""
},
"require": {
@@ -1081,20 +1084,20 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "time": "2016-01-13 10:28:07"
+ "time": "2016-02-28 16:20:50"
},
{
"name": "symfony/http-kernel",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "dbe146efdc040dc87cc730a926c7858bb3c3b3bc"
+ "reference": "67ca6a98d8d7cf243ccb4b716deab2342f409a4d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/dbe146efdc040dc87cc730a926c7858bb3c3b3bc",
- "reference": "dbe146efdc040dc87cc730a926c7858bb3c3b3bc",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/67ca6a98d8d7cf243ccb4b716deab2342f409a4d",
+ "reference": "67ca6a98d8d7cf243ccb4b716deab2342f409a4d",
"shasum": ""
},
"require": {
@@ -1163,20 +1166,20 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
- "time": "2016-01-14 12:00:59"
+ "time": "2016-02-28 21:06:17"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.0.1",
+ "version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25"
+ "reference": "1289d16209491b584839022f29257ad859b8532d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/49ff736bd5d41f45240cec77b44967d76e0c3d25",
- "reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d",
+ "reference": "1289d16209491b584839022f29257ad859b8532d",
"shasum": ""
},
"require": {
@@ -1188,7 +1191,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-master": "1.1-dev"
}
},
"autoload": {
@@ -1222,20 +1225,20 @@
"portable",
"shim"
],
- "time": "2015-11-20 09:19:13"
+ "time": "2016-01-20 09:13:37"
},
{
"name": "symfony/polyfill-php54",
- "version": "v1.0.1",
+ "version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php54.git",
- "reference": "2c9f6d98eb30dc04fe0b06f9cc92a55acea5bdcc"
+ "reference": "9ba741ca01c77282ecf5796c2c1d667f03454ffb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/2c9f6d98eb30dc04fe0b06f9cc92a55acea5bdcc",
- "reference": "2c9f6d98eb30dc04fe0b06f9cc92a55acea5bdcc",
+ "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/9ba741ca01c77282ecf5796c2c1d667f03454ffb",
+ "reference": "9ba741ca01c77282ecf5796c2c1d667f03454ffb",
"shasum": ""
},
"require": {
@@ -1244,7 +1247,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-master": "1.1-dev"
}
},
"autoload": {
@@ -1280,20 +1283,20 @@
"portable",
"shim"
],
- "time": "2015-11-04 20:28:58"
+ "time": "2016-01-25 19:13:00"
},
{
"name": "symfony/polyfill-php55",
- "version": "v1.0.1",
+ "version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php55.git",
- "reference": "3adc962a6250c02adb508e85ecfa6fcfee9eec47"
+ "reference": "b4f3f07d91702f8f926339fc4fcf81671d8c27e6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/3adc962a6250c02adb508e85ecfa6fcfee9eec47",
- "reference": "3adc962a6250c02adb508e85ecfa6fcfee9eec47",
+ "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/b4f3f07d91702f8f926339fc4fcf81671d8c27e6",
+ "reference": "b4f3f07d91702f8f926339fc4fcf81671d8c27e6",
"shasum": ""
},
"require": {
@@ -1303,7 +1306,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-master": "1.1-dev"
}
},
"autoload": {
@@ -1336,20 +1339,20 @@
"portable",
"shim"
],
- "time": "2015-11-04 20:28:58"
+ "time": "2016-01-20 09:13:37"
},
{
"name": "symfony/routing",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "5451a8a1874fd4e6a4dd347ea611d86cd8441735"
+ "reference": "ae38e64bae52753c0f4a1a6583f5ba9bb2b742ab"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/5451a8a1874fd4e6a4dd347ea611d86cd8441735",
- "reference": "5451a8a1874fd4e6a4dd347ea611d86cd8441735",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/ae38e64bae52753c0f4a1a6583f5ba9bb2b742ab",
+ "reference": "ae38e64bae52753c0f4a1a6583f5ba9bb2b742ab",
"shasum": ""
},
"require": {
@@ -1372,6 +1375,7 @@
"symfony/config": "For using the all-in-one router or any loader",
"symfony/dependency-injection": "For loading routes from a service",
"symfony/expression-language": "For using expression matching",
+ "symfony/http-foundation": "For using a Symfony Request object",
"symfony/yaml": "For using the YAML loader"
},
"type": "library",
@@ -1410,20 +1414,20 @@
"uri",
"url"
],
- "time": "2016-01-11 16:43:36"
+ "time": "2016-02-04 13:53:00"
},
{
"name": "symfony/twig-bridge",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/twig-bridge.git",
- "reference": "e33b512de4b769a1c728cd6775e22668ae89fca9"
+ "reference": "ba898e4714734948dc00c4d776e1d6be165ff8c4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/e33b512de4b769a1c728cd6775e22668ae89fca9",
- "reference": "e33b512de4b769a1c728cd6775e22668ae89fca9",
+ "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/ba898e4714734948dc00c4d776e1d6be165ff8c4",
+ "reference": "ba898e4714734948dc00c4d776e1d6be165ff8c4",
"shasum": ""
},
"require": {
@@ -1491,20 +1495,20 @@
],
"description": "Symfony Twig Bridge",
"homepage": "https://symfony.com",
- "time": "2016-01-12 17:46:01"
+ "time": "2016-02-22 15:02:30"
},
{
"name": "symfony/yaml",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "34c8a4b51e751e7ea869b8262f883d008a2b81b8"
+ "reference": "2a4ee40acb880c56f29fb1b8886e7ffe94f3b995"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/34c8a4b51e751e7ea869b8262f883d008a2b81b8",
- "reference": "34c8a4b51e751e7ea869b8262f883d008a2b81b8",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/2a4ee40acb880c56f29fb1b8886e7ffe94f3b995",
+ "reference": "2a4ee40acb880c56f29fb1b8886e7ffe94f3b995",
"shasum": ""
},
"require": {
@@ -1540,20 +1544,20 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2016-01-13 10:28:07"
+ "time": "2016-02-23 07:41:20"
},
{
"name": "twig/twig",
- "version": "v1.23.3",
+ "version": "v1.24.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "ae53fc2c312fdee63773b75cb570304f85388b08"
+ "reference": "3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/ae53fc2c312fdee63773b75cb570304f85388b08",
- "reference": "ae53fc2c312fdee63773b75cb570304f85388b08",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8",
+ "reference": "3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8",
"shasum": ""
},
"require": {
@@ -1566,7 +1570,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.23-dev"
+ "dev-master": "1.24-dev"
}
},
"autoload": {
@@ -1601,7 +1605,7 @@
"keywords": [
"templating"
],
- "time": "2016-01-11 14:02:19"
+ "time": "2016-01-25 21:22:18"
}
],
"packages-dev": [
@@ -2496,16 +2500,16 @@
},
{
"name": "sebastian/environment",
- "version": "1.3.3",
+ "version": "1.3.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "6e7133793a8e5a5714a551a8324337374be209df"
+ "reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df",
- "reference": "6e7133793a8e5a5714a551a8324337374be209df",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf",
+ "reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf",
"shasum": ""
},
"require": {
@@ -2542,7 +2546,7 @@
"environment",
"hhvm"
],
- "time": "2015-12-02 08:37:27"
+ "time": "2016-02-26 18:40:46"
},
{
"name": "sebastian/exporter",
@@ -2700,16 +2704,16 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "2.5.0",
+ "version": "2.5.1",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "e4fb41d5d0387d556e2c25534d630b3cce90ea67"
+ "reference": "6731851d6aaf1d0d6c58feff1065227b7fda3ba8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/e4fb41d5d0387d556e2c25534d630b3cce90ea67",
- "reference": "e4fb41d5d0387d556e2c25534d630b3cce90ea67",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6731851d6aaf1d0d6c58feff1065227b7fda3ba8",
+ "reference": "6731851d6aaf1d0d6c58feff1065227b7fda3ba8",
"shasum": ""
},
"require": {
@@ -2727,7 +2731,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "2.x-dev"
}
},
"autoload": {
@@ -2773,20 +2777,20 @@
"phpcs",
"standards"
],
- "time": "2015-12-11 00:12:46"
+ "time": "2016-01-19 23:39:10"
},
{
"name": "symfony/browser-kit",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "a93dffaf763182acad12a4c42c7efc372899891e"
+ "reference": "6b2085020b4e86fcb7ae44c3ab8ddb91774b33d2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/a93dffaf763182acad12a4c42c7efc372899891e",
- "reference": "a93dffaf763182acad12a4c42c7efc372899891e",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/6b2085020b4e86fcb7ae44c3ab8ddb91774b33d2",
+ "reference": "6b2085020b4e86fcb7ae44c3ab8ddb91774b33d2",
"shasum": ""
},
"require": {
@@ -2830,20 +2834,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
- "time": "2016-01-12 17:46:01"
+ "time": "2016-01-27 11:34:40"
},
{
"name": "symfony/css-selector",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "ac06d8173bd80790536c0a4a634a7d705b91f54f"
+ "reference": "8d83ff9777cdbd83e7f90d9c48f4729823791a5e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/ac06d8173bd80790536c0a4a634a7d705b91f54f",
- "reference": "ac06d8173bd80790536c0a4a634a7d705b91f54f",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/8d83ff9777cdbd83e7f90d9c48f4729823791a5e",
+ "reference": "8d83ff9777cdbd83e7f90d9c48f4729823791a5e",
"shasum": ""
},
"require": {
@@ -2883,20 +2887,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2016-01-03 15:33:41"
+ "time": "2016-01-27 05:14:19"
},
{
"name": "symfony/dom-crawler",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "650d37aacb1fa0dcc24cced483169852b3a0594e"
+ "reference": "e1a4b4c83f5ee6f5902f1d53035e3718909a0c11"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/650d37aacb1fa0dcc24cced483169852b3a0594e",
- "reference": "650d37aacb1fa0dcc24cced483169852b3a0594e",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/e1a4b4c83f5ee6f5902f1d53035e3718909a0c11",
+ "reference": "e1a4b4c83f5ee6f5902f1d53035e3718909a0c11",
"shasum": ""
},
"require": {
@@ -2939,20 +2943,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2016-01-03 15:33:41"
+ "time": "2016-02-28 16:20:50"
},
{
"name": "symfony/process",
- "version": "v2.8.2",
+ "version": "v2.8.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "6f1979c3b0f4c22c77a8a8971afaa7dd07f082ac"
+ "reference": "7dedd5b60550f33dca16dd7e94ef8aca8b67bbfe"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/6f1979c3b0f4c22c77a8a8971afaa7dd07f082ac",
- "reference": "6f1979c3b0f4c22c77a8a8971afaa7dd07f082ac",
+ "url": "https://api.github.com/repos/symfony/process/zipball/7dedd5b60550f33dca16dd7e94ef8aca8b67bbfe",
+ "reference": "7dedd5b60550f33dca16dd7e94ef8aca8b67bbfe",
"shasum": ""
},
"require": {
@@ -2988,7 +2992,7 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2016-01-06 09:59:23"
+ "time": "2016-02-02 13:33:15"
}
],
"aliases": [],
diff --git a/phpBB/config/default/container/services.yml b/phpBB/config/default/container/services.yml
index f5f85fbcad..2ccda6a38e 100644
--- a/phpBB/config/default/container/services.yml
+++ b/phpBB/config/default/container/services.yml
@@ -161,7 +161,7 @@ services:
version_helper:
class: phpbb\version_helper
- scope: prototype
+ shared: false
arguments:
- '@cache'
- '@config'
diff --git a/phpBB/config/default/container/services_attachment.yml b/phpBB/config/default/container/services_attachment.yml
index f448367473..c56ced21f4 100644
--- a/phpBB/config/default/container/services_attachment.yml
+++ b/phpBB/config/default/container/services_attachment.yml
@@ -1,7 +1,7 @@
services:
attachment.delete:
class: phpbb\attachment\delete
- scope: prototype
+ shared: false
arguments:
- '@config'
- '@dbal.conn'
@@ -12,7 +12,7 @@ services:
attachment.manager:
class: phpbb\attachment\manager
- scope: prototype
+ shared: false
arguments:
- '@attachment.delete'
- '@attachment.resync'
@@ -20,13 +20,13 @@ services:
attachment.resync:
class: phpbb\attachment\resync
- scope: prototype
+ shared: false
arguments:
- '@dbal.conn'
attachment.upload:
class: phpbb\attachment\upload
- scope: prototype
+ shared: false
arguments:
- '@auth'
- '@cache'
diff --git a/phpBB/config/default/container/services_captcha.yml b/phpBB/config/default/container/services_captcha.yml
index a1d063ada8..e462c43bb8 100644
--- a/phpBB/config/default/container/services_captcha.yml
+++ b/phpBB/config/default/container/services_captcha.yml
@@ -6,7 +6,7 @@ services:
- '@captcha.plugins.service_collection'
# ----- Captcha plugins -----
-# Scope MUST be prototype for all the plugins to work.
+# Service MUST NOT be shared for all the plugins to work.
captcha.plugins.service_collection:
class: phpbb\di\service_collection
arguments:
@@ -16,7 +16,7 @@ services:
core.captcha.plugins.gd:
class: phpbb\captcha\plugins\gd
- scope: prototype
+ shared: false
calls:
- [set_name, [core.captcha.plugins.gd]]
tags:
@@ -24,7 +24,7 @@ services:
core.captcha.plugins.gd_wave:
class: phpbb\captcha\plugins\gd_wave
- scope: prototype
+ shared: false
calls:
- [set_name, [core.captcha.plugins.gd_wave]]
tags:
@@ -32,7 +32,7 @@ services:
core.captcha.plugins.nogd:
class: phpbb\captcha\plugins\nogd
- scope: prototype
+ shared: false
calls:
- [set_name, [core.captcha.plugins.nogd]]
tags:
@@ -40,7 +40,7 @@ services:
core.captcha.plugins.qa:
class: phpbb\captcha\plugins\qa
- scope: prototype
+ shared: false
arguments:
- '%tables.captcha_qa_questions%'
- '%tables.captcha_qa_answers%'
@@ -52,7 +52,7 @@ services:
core.captcha.plugins.recaptcha:
class: phpbb\captcha\plugins\recaptcha
- scope: prototype
+ shared: false
calls:
- [set_name, [core.captcha.plugins.recaptcha]]
tags:
diff --git a/phpBB/config/default/container/services_cron.yml b/phpBB/config/default/container/services_cron.yml
index dd3982a659..0b95a96190 100644
--- a/phpBB/config/default/container/services_cron.yml
+++ b/phpBB/config/default/container/services_cron.yml
@@ -75,6 +75,7 @@ services:
- '%core.root_path%'
- '%core.php_ext%'
- '@config'
+ - '%core.cache_dir%'
calls:
- [set_name, [cron.task.core.queue]]
tags:
diff --git a/phpBB/config/default/container/services_db.yml b/phpBB/config/default/container/services_db.yml
index 20b3426e7e..30c5a7fc7f 100644
--- a/phpBB/config/default/container/services_db.yml
+++ b/phpBB/config/default/container/services_db.yml
@@ -31,10 +31,10 @@ services:
factory: ['@dbal.extractor.factory', get]
# ----- DB Extractors for different drivers -----
-# Scope MUST be prototype for all the handlers to work correctly.
+# Service MUST NOT be shared for all the handlers to work correctly.
dbal.extractor.extractors.mssql_extractor:
class: phpbb\db\extractor\mssql_extractor
- scope: prototype
+ shared: false
arguments:
- '%core.root_path%'
- '@request'
@@ -42,7 +42,7 @@ services:
dbal.extractor.extractors.mysql_extractor:
class: phpbb\db\extractor\mysql_extractor
- scope: prototype
+ shared: false
arguments:
- '%core.root_path%'
- '@request'
@@ -50,7 +50,7 @@ services:
dbal.extractor.extractors.oracle_extractor:
class: phpbb\db\extractor\oracle_extractor
- scope: prototype
+ shared: false
arguments:
- '%core.root_path%'
- '@request'
@@ -58,7 +58,7 @@ services:
dbal.extractor.extractors.postgres_extractor:
class: phpbb\db\extractor\postgres_extractor
- scope: prototype
+ shared: false
arguments:
- '%core.root_path%'
- '@request'
@@ -66,7 +66,7 @@ services:
dbal.extractor.extractors.sqlite3_extractor:
class: phpbb\db\extractor\sqlite3_extractor
- scope: prototype
+ shared: false
arguments:
- '%core.root_path%'
- '@request'
@@ -74,7 +74,7 @@ services:
dbal.extractor.extractors.sqlite_extractor:
class: phpbb\db\extractor\sqlite_extractor
- scope: prototype
+ shared: false
arguments:
- '%core.root_path%'
- '@request'
diff --git a/phpBB/config/default/container/services_feed.yml b/phpBB/config/default/container/services_feed.yml
index 443016160b..bec8649672 100644
--- a/phpBB/config/default/container/services_feed.yml
+++ b/phpBB/config/default/container/services_feed.yml
@@ -23,7 +23,7 @@ services:
feed.forum:
class: phpbb\feed\forum
- scope: prototype
+ shared: false
arguments:
- '@feed.helper'
- '@config'
@@ -36,7 +36,7 @@ services:
feed.forums:
class: phpbb\feed\forums
- scope: prototype
+ shared: false
arguments:
- '@feed.helper'
- '@config'
@@ -49,7 +49,7 @@ services:
feed.news:
class: phpbb\feed\news
- scope: prototype
+ shared: false
arguments:
- '@feed.helper'
- '@config'
@@ -62,7 +62,7 @@ services:
feed.overall:
class: phpbb\feed\overall
- scope: prototype
+ shared: false
arguments:
- '@feed.helper'
- '@config'
@@ -75,7 +75,7 @@ services:
feed.topic:
class: phpbb\feed\topic
- scope: prototype
+ shared: false
arguments:
- '@feed.helper'
- '@config'
@@ -88,7 +88,7 @@ services:
feed.topics:
class: phpbb\feed\topics
- scope: prototype
+ shared: false
arguments:
- '@feed.helper'
- '@config'
@@ -101,7 +101,7 @@ services:
feed.topics_active:
class: phpbb\feed\topics_active
- scope: prototype
+ shared: false
arguments:
- '@feed.helper'
- '@config'
diff --git a/phpBB/config/default/container/services_files.yml b/phpBB/config/default/container/services_files.yml
index 88414d89a9..cf51ebdab8 100644
--- a/phpBB/config/default/container/services_files.yml
+++ b/phpBB/config/default/container/services_files.yml
@@ -6,7 +6,7 @@ services:
files.filespec:
class: phpbb\files\filespec
- scope: prototype
+ shared: false
arguments:
- '@filesystem'
- '@language'
@@ -18,7 +18,7 @@ services:
files.upload:
class: phpbb\files\upload
- scope: prototype
+ shared: false
arguments:
- '@filesystem'
- '@files.factory'
@@ -28,7 +28,7 @@ services:
files.types.form:
class: phpbb\files\types\form
- scope: prototype
+ shared: false
arguments:
- '@files.factory'
- '@language'
@@ -38,7 +38,7 @@ services:
files.types.local:
class: phpbb\files\types\form
- scope: prototype
+ shared: false
arguments:
- '@files.factory'
- '@language'
@@ -47,7 +47,7 @@ services:
files.types.remote:
class: phpbb\files\types\remote
- scope: prototype
+ shared: false
arguments:
- '@config'
- '@files.factory'
diff --git a/phpBB/config/default/container/services_notification.yml b/phpBB/config/default/container/services_notification.yml
index 0cf64f7f24..6c3cea3dbc 100644
--- a/phpBB/config/default/container/services_notification.yml
+++ b/phpBB/config/default/container/services_notification.yml
@@ -15,7 +15,7 @@ services:
- '%tables.user_notifications%'
# ----- Notification's types -----
-# Scope MUST be prototype for all the plugins to work.
+# Service MUST NOT be shared for all the plugins to work.
notification.type_collection:
class: phpbb\di\service_collection
arguments:
@@ -36,7 +36,7 @@ services:
notification.type.admin_activate_user:
class: phpbb\notification\type\admin_activate_user
- scope: prototype
+ shared: false
parent: notification.type.base
calls:
- [set_user_loader, ['@user_loader']]
@@ -46,42 +46,42 @@ services:
notification.type.approve_post:
class: phpbb\notification\type\approve_post
- scope: prototype
+ shared: false
parent: notification.type.post
tags:
- { name: notification.type }
notification.type.approve_topic:
class: phpbb\notification\type\approve_topic
- scope: prototype
+ shared: false
parent: notification.type.topic
tags:
- { name: notification.type }
notification.type.bookmark:
class: phpbb\notification\type\bookmark
- scope: prototype
+ shared: false
parent: notification.type.post
tags:
- { name: notification.type }
notification.type.disapprove_post:
class: phpbb\notification\type\disapprove_post
- scope: prototype
+ shared: false
parent: notification.type.post
tags:
- { name: notification.type }
notification.type.disapprove_topic:
class: phpbb\notification\type\disapprove_topic
- scope: prototype
+ shared: false
parent: notification.type.topic
tags:
- { name: notification.type }
notification.type.group_request:
class: phpbb\notification\type\group_request
- scope: prototype
+ shared: false
parent: notification.type.base
calls:
- [set_user_loader, ['@user_loader']]
@@ -90,14 +90,14 @@ services:
notification.type.group_request_approved:
class: phpbb\notification\type\group_request_approved
- scope: prototype
+ shared: false
parent: notification.type.base
tags:
- { name: notification.type }
notification.type.pm:
class: phpbb\notification\type\pm
- scope: prototype
+ shared: false
parent: notification.type.base
calls:
- [set_user_loader, ['@user_loader']]
@@ -107,7 +107,7 @@ services:
notification.type.post:
class: phpbb\notification\type\post
- scope: prototype
+ shared: false
parent: notification.type.base
calls:
- [set_user_loader, ['@user_loader']]
@@ -117,14 +117,14 @@ services:
notification.type.post_in_queue:
class: phpbb\notification\type\post_in_queue
- scope: prototype
+ shared: false
parent: notification.type.post
tags:
- { name: notification.type }
notification.type.quote:
class: phpbb\notification\type\quote
- scope: prototype
+ shared: false
parent: notification.type.post
calls:
- [set_utils, ['@text_formatter.utils']]
@@ -133,35 +133,35 @@ services:
notification.type.report_pm:
class: phpbb\notification\type\report_pm
- scope: prototype
+ shared: false
parent: notification.type.pm
tags:
- { name: notification.type }
notification.type.report_pm_closed:
class: phpbb\notification\type\report_pm_closed
- scope: prototype
+ shared: false
parent: notification.type.pm
tags:
- { name: notification.type }
notification.type.report_post:
class: phpbb\notification\type\report_post
- scope: prototype
+ shared: false
parent: notification.type.post
tags:
- { name: notification.type }
notification.type.report_post_closed:
class: phpbb\notification\type\report_post_closed
- scope: prototype
+ shared: false
parent: notification.type.post
tags:
- { name: notification.type }
notification.type.topic:
class: phpbb\notification\type\topic
- scope: prototype
+ shared: false
parent: notification.type.base
calls:
- [set_user_loader, ['@user_loader']]
@@ -171,13 +171,13 @@ services:
notification.type.topic_in_queue:
class: phpbb\notification\type\topic_in_queue
- scope: prototype
+ shared: false
parent: notification.type.topic
tags:
- { name: notification.type }
# ----- Notification's methods -----
-# Scope MUST be prototype for all the plugins to work.
+# Service MUST NOT be shared for all the plugins to work.
notification.method_collection:
class: phpbb\di\service_collection
arguments:
@@ -187,7 +187,7 @@ services:
notification.method.board:
class: phpbb\notification\method\board
- scope: prototype # scope MUST be prototype for this to work!
+ shared: false
arguments:
- '@user_loader'
- '@dbal.conn'
@@ -201,7 +201,7 @@ services:
notification.method.email:
class: phpbb\notification\method\email
- scope: prototype
+ shared: false
arguments:
- '@user_loader'
- '@user'
@@ -213,7 +213,7 @@ services:
notification.method.jabber:
class: phpbb\notification\method\jabber
- scope: prototype
+ shared: false
arguments:
- '@user_loader'
- '@user'
diff --git a/phpBB/config/default/container/services_report.yml b/phpBB/config/default/container/services_report.yml
index eaaf6ae4c4..2c5b3bf3d5 100644
--- a/phpBB/config/default/container/services_report.yml
+++ b/phpBB/config/default/container/services_report.yml
@@ -29,10 +29,10 @@ services:
- '@user'
# ----- Report handlers -----
-# Scope MUST be prototype for all the handlers to work correctly.
+# Service MUST NOT be shared for all the handlers to work correctly.
phpbb.report.handlers.report_handler_pm:
class: phpbb\report\report_handler_pm
- scope: prototype
+ shared: false
arguments:
- '@dbal.conn.driver'
- '@dispatcher'
@@ -43,7 +43,7 @@ services:
phpbb.report.handlers.report_handler_post:
class: phpbb\report\report_handler_post
- scope: prototype
+ shared: false
arguments:
- '@dbal.conn.driver'
- '@dispatcher'
diff --git a/phpBB/config/default/container/services_routing.yml b/phpBB/config/default/container/services_routing.yml
index 3cb74ca2b1..3048145a2f 100644
--- a/phpBB/config/default/container/services_routing.yml
+++ b/phpBB/config/default/container/services_routing.yml
@@ -5,9 +5,8 @@ services:
- '@service_container'
- '@routing.chained_resources_locator'
- '@routing.delegated_loader'
- - '%core.root_path%'
- '%core.php_ext%'
- - '%core.environment%'
+ - '%core.cache_dir%'
router.listener:
class: Symfony\Component\HttpKernel\EventListener\RouterListener
diff --git a/phpBB/config/default/container/services_text_formatter.yml b/phpBB/config/default/container/services_text_formatter.yml
index 943a79cd65..a9f2efdb16 100644
--- a/phpBB/config/default/container/services_text_formatter.yml
+++ b/phpBB/config/default/container/services_text_formatter.yml
@@ -1,5 +1,5 @@
parameters:
- text_formatter.cache.dir: '%core.root_path%cache/%core.environment%/'
+ text_formatter.cache.dir: '%core.cache_dir%'
text_formatter.cache.parser.key: _text_formatter_parser
text_formatter.cache.renderer.key: _text_formatter_renderer
diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml
index 2dbf444e0c..dc08d65e1a 100644
--- a/phpBB/config/default/container/services_twig.yml
+++ b/phpBB/config/default/container/services_twig.yml
@@ -1,5 +1,5 @@
parameters:
- core.template.cache_path: '%core.root_path%cache/%core.environment%/twig/'
+ core.template.cache_path: '%core.cache_dir%twig/'
services:
template.twig.environment:
diff --git a/phpBB/config/installer/container/services.yml b/phpBB/config/installer/container/services.yml
index 20d790e9a6..97fc1256fd 100644
--- a/phpBB/config/installer/container/services.yml
+++ b/phpBB/config/installer/container/services.yml
@@ -12,7 +12,7 @@ services:
cache.driver:
class: '%cache.driver.class%'
arguments:
- - '%core.root_path%/cache/installer/'
+ - '%core.cache_dir%'
config:
class: phpbb\config\config
diff --git a/phpBB/config/installer/container/services_install_console.yml b/phpBB/config/installer/container/services_install_console.yml
index 73c804d9ff..41d3aa4c1b 100644
--- a/phpBB/config/installer/container/services_install_console.yml
+++ b/phpBB/config/installer/container/services_install_console.yml
@@ -21,7 +21,6 @@ services:
arguments:
- '@language'
- '@installer.helper.iohandler_factory'
- - '@installer.installer.install'
tags:
- { name: console.installer.command }
@@ -31,6 +30,32 @@ services:
arguments:
- '@language'
- '@installer.helper.iohandler_factory'
- - '@installer.installer.install'
+ tags:
+ - { name: console.installer.command }
+
+ console.updater.command.update:
+ class: phpbb\install\console\command\update\update
+ arguments:
+ - '@language'
+ - '@installer.helper.iohandler_factory'
+ - '@installer.installer.update'
+ - '@installer.helper.install_helper'
+ tags:
+ - { name: console.installer.command }
+
+ console.updater.command.config.show:
+ class: phpbb\install\console\command\update\config\show
+ arguments:
+ - '@language'
+ - '@installer.helper.iohandler_factory'
+ tags:
+ - { name: console.installer.command }
+
+
+ console.updater.command.config.validate:
+ class: phpbb\install\console\command\update\config\validate
+ arguments:
+ - '@language'
+ - '@installer.helper.iohandler_factory'
tags:
- { name: console.installer.command }
diff --git a/phpBB/config/installer/container/services_install_controller.yml b/phpBB/config/installer/container/services_install_controller.yml
index 394eb95c06..5aaba0f47f 100644
--- a/phpBB/config/installer/container/services_install_controller.yml
+++ b/phpBB/config/installer/container/services_install_controller.yml
@@ -65,3 +65,9 @@ services:
- '@template'
- '%core.root_path%'
- '%core.php_ext%'
+
+ phpbb.installer.controller.status:
+ class: phpbb\install\controller\timeout_check
+ arguments:
+ - '@phpbb.installer.controller.helper'
+ - '%core.root_path%'
diff --git a/phpBB/config/installer/container/services_install_finish.yml b/phpBB/config/installer/container/services_install_finish.yml
index f144cc6317..8b06ad7d97 100644
--- a/phpBB/config/installer/container/services_install_finish.yml
+++ b/phpBB/config/installer/container/services_install_finish.yml
@@ -26,7 +26,7 @@ services:
- { name: service_collection, tag: install_finish, class_name_aware: true }
installer.module.finish_install:
- class: phpbb\install\module\install_filesystem\module
+ class: phpbb\install\module\install_finish\module
parent: installer.module_base
arguments:
- '@installer.module.install_finish_collection'
diff --git a/phpBB/config/installer/container/services_install_navigation.yml b/phpBB/config/installer/container/services_install_navigation.yml
index 4fc6abb6eb..d7151eb1c6 100644
--- a/phpBB/config/installer/container/services_install_navigation.yml
+++ b/phpBB/config/installer/container/services_install_navigation.yml
@@ -13,7 +13,7 @@ services:
installer.navigation.main_navigation:
class: phpbb\install\helper\navigation\main_navigation
- scope: prototype
+ shared: false
tags:
- { name: installer.navigation }
@@ -21,7 +21,7 @@ services:
class: phpbb\install\helper\navigation\install_navigation
arguments:
- '@installer.helper.install_helper'
- scope: prototype
+ shared: false
tags:
- { name: installer.navigation }
@@ -29,7 +29,7 @@ services:
class: phpbb\install\helper\navigation\update_navigation
arguments:
- '@installer.helper.install_helper'
- scope: prototype
+ shared: false
tags:
- { name: installer.navigation }
@@ -37,6 +37,6 @@ services:
class: phpbb\install\helper\navigation\convertor_navigation
arguments:
- '@installer.helper.install_helper'
- scope: prototype
+ shared: false
tags:
- { name: installer.navigation }
diff --git a/phpBB/config/installer/container/services_installer.yml b/phpBB/config/installer/container/services_installer.yml
index 19b1b4f08e..57181b21d4 100644
--- a/phpBB/config/installer/container/services_installer.yml
+++ b/phpBB/config/installer/container/services_installer.yml
@@ -47,6 +47,7 @@ services:
- '@request'
- '@template'
- '@router'
+ - '%core.root_path%'
installer.helper.iohandler_cli:
class: phpbb\install\helper\iohandler\cli_iohandler
diff --git a/phpBB/config/installer/routing/installer.yml b/phpBB/config/installer/routing/installer.yml
index 1961ba8ed6..47e16aa454 100644
--- a/phpBB/config/installer/routing/installer.yml
+++ b/phpBB/config/installer/routing/installer.yml
@@ -60,3 +60,8 @@ phpbb_convert_finish:
path: /convert/finished
defaults:
_controller: phpbb.installer.controller.convert:finish
+
+phpbb_installer_status:
+ path: /installer/status
+ defaults:
+ _controller: phpbb.installer.controller.status:status
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index f6e63196ee..10dc48b801 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x Changelog" />
<title>phpBB &bull; Changelog</title>
diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html
index 4786d8d796..5f3a425cda 100644
--- a/phpBB/docs/FAQ.html
+++ b/phpBB/docs/FAQ.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x frequently asked questions" />
<title>phpBB &bull; FAQ</title>
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
index 86b320d197..c0e0dce2a7 100644
--- a/phpBB/docs/INSTALL.html
+++ b/phpBB/docs/INSTALL.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x Installation, updating and conversion informations" />
<title>phpBB &bull; Install</title>
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html
index 96af78f48a..20afc310db 100644
--- a/phpBB/docs/README.html
+++ b/phpBB/docs/README.html
@@ -2,8 +2,9 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.1.x Readme" />
+<meta name="description" content="phpBB 3.3.x Readme" />
<title>phpBB &bull; Readme</title>
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
@@ -20,7 +21,7 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
- <h1>phpBB 3.1.x Readme</h1>
+ <h1>phpBB 3.3.x Readme</h1>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
@@ -224,7 +225,7 @@
<div class="content">
- <p>This is a stable release of phpBB. The 3.1.x line is feature frozen, with point releases principally including fixes for bugs and security issues. Feature alterations and minor feature additions may be done if deemed absolutely required. The next major release will be phpBB 3.2 which is currently under development. Please do not post questions asking when 3.2 will be available, no release date has been set.</p>
+ <p>This is a stable release of phpBB. The 3.2.x line is feature frozen, with point releases principally including fixes for bugs and security issues. Feature alterations and minor feature additions may be done if deemed absolutely required. The next major release will be phpBB 3.3 which is currently under development. Please do not post questions asking when 3.3 will be available, no release date has been set.</p>
<p>Those interested in the development of phpBB should keep an eye on the development forums to see how things are progressing:</p>
@@ -323,7 +324,7 @@
<div class="content">
- <p>phpBB 3.2.x takes advantage of new features added in PHP 5.4. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 5.4.0 and the maximum supported version is PHP 7.0.</p>
+ <p>phpBB 3.3.x takes advantage of new features added in PHP 5.4. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 5.4.0 and the maximum supported version is PHP 7.0.</p>
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html
index 27d090c296..960fa76417 100644
--- a/phpBB/docs/auth_api.html
+++ b/phpBB/docs/auth_api.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" />
<title>phpBB3 &bull; Auth API</title>
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index 26189235ef..eb0fb60de2 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="Ascraeus coding guidelines document" />
<title>phpBB3 &bull; Coding Guidelines</title>
diff --git a/phpBB/docs/nginx.sample.conf b/phpBB/docs/nginx.sample.conf
index 2ead3552fd..c415720e9c 100644
--- a/phpBB/docs/nginx.sample.conf
+++ b/phpBB/docs/nginx.sample.conf
@@ -62,7 +62,7 @@ http {
root /path/to/phpbb;
location / {
- # phpbb uses index.htm
+ # phpBB uses index.htm
index index.php index.html index.htm;
try_files $uri $uri/ @rewriteapp;
}
@@ -92,6 +92,29 @@ http {
fastcgi_pass php;
}
+ # Correctly pass scripts for installer
+ location /install/ {
+ # phpBB uses index.htm
+ try_files $uri $uri/ @rewrite_installapp;
+
+ # Pass the php scripts to fastcgi server specified in upstream declaration.
+ location ~ \.php(/|$) {
+ # Unmodified fastcgi_params from nginx distribution.
+ include fastcgi_params;
+ # Necessary for php.
+ fastcgi_split_path_info ^(.+\.php)(/.*)$;
+ 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;
+ fastcgi_pass php;
+ }
+ }
+
+ location @rewrite_installapp {
+ rewrite ^(.*)$ /install/app.php/$1 last;
+ }
+
# Deny access to version control system directories.
location ~ /\.svn|/\.git {
deny all;
diff --git a/phpBB/docs/update-config.sample.yml b/phpBB/docs/update-config.sample.yml
new file mode 100644
index 0000000000..f3b52a8c01
--- /dev/null
+++ b/phpBB/docs/update-config.sample.yml
@@ -0,0 +1,2 @@
+updater:
+ type: all
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 0ee6452ada..76b6275954 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -2073,7 +2073,10 @@ class acp_users
// Replace "error" strings with their real, localised form
$error = array_map(array($user, 'lang'), $error);
- $decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_bitfield);
+ if ($request->is_set_post('preview'))
+ {
+ $decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_bitfield);
+ }
/** @var \phpbb\controller\helper $controller_helper */
$controller_helper = $phpbb_container->get('controller.helper');
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index eb6133d013..5fb8304b9a 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -155,13 +155,13 @@ class bbcode
$phpbb_container->get('filesystem'),
$phpbb_container->get('path_helper'),
$phpbb_container,
- $phpbb_container->getParameter('core.root_path') . 'cache/',
+ $phpbb_container->getParameter('core.cache_dir'),
$phpbb_container->get('ext.manager'),
new \phpbb\template\twig\loader(
$phpbb_filesystem
)
),
- $phpbb_container->getParameter('core.root_path') . 'cache/',
+ $phpbb_container->getParameter('core.cache_dir'),
$phpbb_container->get('user'),
$phpbb_container->get('template.twig.extensions.collection'),
$phpbb_extension_manager
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index f2b56cc84b..3a186fd892 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
-@define('PHPBB_VERSION', '3.2.0-b2-dev');
+@define('PHPBB_VERSION', '3.2.0-b3-dev');
// QA-related
// define('PHPBB_QA', 1);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 5125a601d6..10788d0d6a 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -96,7 +96,7 @@ function gen_rand_string_friendly($num_chars = 8)
*/
function unique_id()
{
- return bin2hex(random_bytes(6));
+ return bin2hex(random_bytes(8));
}
/**
@@ -1813,6 +1813,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
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>';
@@ -2233,6 +2234,21 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
$user->setup();
}
+ /**
+ * This event allows an extension to modify the login process
+ *
+ * @event core.login_box_before
+ * @var string redirect Redirect string
+ * @var string l_explain Explain language string
+ * @var string l_success Success language string
+ * @var bool admin Is admin?
+ * @var bool s_display Display full login form?
+ * @var string err Error string
+ * @since 3.1.9-RC1
+ */
+ $vars = array('redirect', 'l_explain', 'l_success', 'admin', 's_display', 'err');
+ extract($phpbb_dispatcher->trigger_event('core.login_box_before', compact($vars)));
+
// Print out error if user tries to authenticate as an administrator without having the privileges...
if ($admin && !$auth->acl_get('a_'))
{
@@ -2245,7 +2261,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
trigger_error('NO_AUTH_ADMIN');
}
- if ($request->is_set_post('login') || ($request->is_set('login') && $request->variable('login', '') == 'external'))
+ if (empty($err) && ($request->is_set_post('login') || ($request->is_set('login') && $request->variable('login', '') == 'external')))
{
// Get credential
if ($admin)
@@ -2314,11 +2330,11 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
*
* @event core.login_box_redirect
* @var string redirect Redirect string
- * @var boolean admin Is admin?
- * @var bool return If true, do not redirect but return the sanitized URL.
+ * @var bool admin Is admin?
* @since 3.1.0-RC5
+ * @changed 3.1.9-RC1 Removed undefined return variable
*/
- $vars = array('redirect', 'admin', 'return');
+ $vars = array('redirect', 'admin');
extract($phpbb_dispatcher->trigger_event('core.login_box_redirect', compact($vars)));
// append/replace SID (may change during the session for AOL users)
@@ -2730,7 +2746,8 @@ function get_preg_expression($mode)
return array(
'#<!\-\- e \-\-><a href="mailto:(.*?)">.*?</a><!\-\- e \-\->#',
'#<!\-\- l \-\-><a (?:class="[\w-]+" )?href="(.*?)(?:(&amp;|\?)sid=[0-9a-f]{32})?">.*?</a><!\-\- l \-\->#',
- '#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="(.*?)">(.*?)</a><!\-\- \1 \-\->#',
+ '#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="http://(.*?)">\2</a><!\-\- \1 \-\->#',
+ '#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="(.*?)">.*?</a><!\-\- \1 \-\->#',
'#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
'#<!\-\- .*? \-\->#s',
'#<.*?>#s',
@@ -3307,6 +3324,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
echo '<html dir="ltr">';
echo '<head>';
echo '<meta charset="utf-8">';
+ echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
echo '<title>' . $msg_title . '</title>';
echo '<style type="text/css">' . "\n" . '/* <![CDATA[ */' . "\n";
echo '* { margin: 0; padding: 0; } html { font-size: 100%; height: 100%; margin-bottom: 1px; background-color: #E4EDF0; } body { font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #536482; background: #E4EDF0; font-size: 62.5%; margin: 0; } ';
@@ -4071,7 +4089,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
/**
* Generate page header
*/
-function page_header($page_title = '', $display_online_list = false, $item_id = 0, $item = 'forum')
+function page_header($page_title = '', $display_online_list = false, $item_id = 0, $item = 'forum', $send_headers = true)
{
global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path;
global $phpbb_dispatcher, $request, $phpbb_container, $phpbb_admin_path;
@@ -4416,17 +4434,22 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'SITE_LOGO_IMG' => $user->img('site_logo'),
));
- // 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',
- );
- if (!empty($user->data['is_bot']))
+ $http_headers = array();
+
+ if ($send_headers)
{
- // Let reverse proxies know we detected a bot.
- $http_headers['X-PHPBB-IS-BOT'] = 'yes';
+ // 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',
+ );
+ if (!empty($user->data['is_bot']))
+ {
+ // Let reverse proxies know we detected a bot.
+ $http_headers['X-PHPBB-IS-BOT'] = 'yes';
+ }
}
/**
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 39a3f0352f..fd7fc478bd 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -469,7 +469,7 @@ function decode_message(&$message, $bbcode_uid = '')
$message = str_replace($match, $replace, $message);
$match = get_preg_expression('bbcode_htm');
- $replace = array('\1', '\1', '\3', '\1', '', '');
+ $replace = array('\1', '\1', '\2', '\2', '\1', '', '');
$message = preg_replace($match, $replace, $message);
}
@@ -1091,17 +1091,8 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
unset($new_attachment_data);
}
- // Sort correctly
- if ($config['display_order'])
- {
- // Ascending sort
- krsort($attachments);
- }
- else
- {
- // Descending sort
- ksort($attachments);
- }
+ // Make sure attachments are properly ordered
+ ksort($attachments);
foreach ($attachments as $attachment)
{
@@ -1309,8 +1300,6 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
$attachments = $compiled_attachments;
unset($compiled_attachments);
- $tpl_size = sizeof($attachments);
-
$unset_tpl = array();
preg_match_all('#<!\-\- ia([0-9]+) \-\->(.*?)<!\-\- ia\1 \-\->#', $message, $matches, PREG_PATTERN_ORDER);
@@ -1318,8 +1307,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
$replace = array();
foreach ($matches[0] as $num => $capture)
{
- // Flip index if we are displaying the reverse way
- $index = ($config['display_order']) ? ($tpl_size-($matches[1][$num] + 1)) : $matches[1][$num];
+ $index = $matches[1][$num];
$replace['from'][] = $matches[0][$num];
$replace['to'][] = (isset($attachments[$index])) ? $attachments[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][array_search($index, $matches[1])]);
@@ -1334,6 +1322,18 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
$unset_tpl = array_unique($unset_tpl);
+ // Sort correctly
+ if ($config['display_order'])
+ {
+ // Ascending sort
+ krsort($attachments);
+ }
+ else
+ {
+ // Descending sort
+ ksort($attachments);
+ }
+
// Needed to let not display the inlined attachments at the end of the post again
foreach ($unset_tpl as $index)
{
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index 916655e77c..b295d4cd1e 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -108,6 +108,7 @@ function wrap_img_in_html($src, $title)
echo '<html>';
echo '<head>';
echo '<meta charset="utf-8">';
+ echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
echo '<title>' . $title . '</title>';
echo '</head>';
echo '<body>';
@@ -412,7 +413,7 @@ function set_modified_headers($stamp, $browser)
global $request;
// let's see if we have to send the file at all
- $last_load = $request->header('Modified-Since') ? strtotime(trim($request->header('Modified-Since'))) : false;
+ $last_load = $request->header('If-Modified-Since') ? strtotime(trim($request->header('If-Modified-Since'))) : false;
if (strpos(strtolower($browser), 'msie 6.0') === false && !phpbb_is_greater_ie_version($browser, 7))
{
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index e8d4e0d7f1..f55b5e7ec3 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -640,13 +640,13 @@ class messenger
$phpbb_container->get('filesystem'),
$phpbb_container->get('path_helper'),
$phpbb_container,
- $phpbb_container->getParameter('core.root_path') . 'cache/',
+ $phpbb_container->getParameter('core.cache_dir'),
$phpbb_container->get('ext.manager'),
new \phpbb\template\twig\loader(
$phpbb_filesystem
)
),
- $phpbb_container->getParameter('core.root_path') . 'cache/',
+ $phpbb_container->getParameter('core.cache_dir'),
$phpbb_container->get('user'),
$phpbb_container->get('template.twig.extensions.collection'),
$phpbb_extension_manager
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 58753122cc..2bc7ed471e 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1492,6 +1492,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
break;
}
}
+ else if (isset($data_ary['post_visibility']) && $data_ary['post_visibility'] !== false)
+ {
+ $post_visibility = $data_ary['post_visibility'];
+ }
// MODs/Extensions are able to force any visibility on posts
if (isset($data_ary['force_approved_state']))
@@ -2299,7 +2303,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
$params = $add_anchor = '';
- if ($post_visibility == ITEM_APPROVED)
+ if ($post_visibility == ITEM_APPROVED ||
+ ($auth->acl_get('m_softdelete', $data_ary['forum_id']) && $post_visibility == ITEM_DELETED) ||
+ ($auth->acl_get('m_approve', $data_ary['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE))))
{
$params .= '&amp;t=' . $data_ary['topic_id'];
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index 0b66aae030..0e80372f43 100644
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -530,12 +530,28 @@ function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)
include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
- $user_row['user_lang'] = (file_exists($phpbb_root_path . 'language/' . $user_row['user_lang'] . "/mcp.$phpEx")) ? $user_row['user_lang'] : $config['default_lang'];
- include($phpbb_root_path . 'language/' . basename($user_row['user_lang']) . "/mcp.$phpEx");
+ // Attempt to translate warning to language of user being warned if user's language differs from issuer's language
+ if ($user_row['user_lang'] != $user->lang_name)
+ {
+ $lang = array();
+
+ $user_row['user_lang'] = (file_exists($phpbb_root_path . 'language/' . basename($user_row['user_lang']) . "/mcp." . $phpEx)) ? $user_row['user_lang'] : $config['default_lang'];
+ include($phpbb_root_path . 'language/' . basename($user_row['user_lang']) . "/mcp." . $phpEx);
+
+ $warn_pm_subject = $lang['WARNING_PM_SUBJECT'];
+ $warn_pm_body = sprintf($lang['WARNING_PM_BODY'], $warning);
+
+ unset($lang);
+ }
+ else
+ {
+ $warn_pm_subject = $user->lang('WARNING_PM_SUBJECT');
+ $warn_pm_body = $user->lang('WARNING_PM_BODY', $warning);
+ }
$message_parser = new parse_message();
- $message_parser->message = $user->lang('WARNING_PM_BODY', $warning);
+ $message_parser->message = $warn_pm_body;
$message_parser->parse(true, true, true, false, false, true, true);
$pm_data = array(
@@ -553,7 +569,7 @@ function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)
'address_list' => array('u' => array($user_row['user_id'] => 'to')),
);
- submit_pm('post', $user->lang('WARNING_PM_SUBJECT'), $pm_data, false);
+ submit_pm('post', $warn_pm_subject, $pm_data, false);
}
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_WARNING', false, array($user_row['username']));
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index e707c251fe..1132271689 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -157,7 +157,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
'S_SHOW_PM_BOX' => true,
'S_ALLOW_MASS_PM' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false,
'S_GROUP_OPTIONS' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm_group')) ? $group_options : '',
- 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&amp;form=postform&amp;field=username_list&amp;select_single=$select_single"),
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&amp;form=postform&amp;field=username_list&amp;select_single=" . (int) $select_single),
));
}
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index 4ac8e0f17d..5c0b792f6f 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -544,7 +544,10 @@ class ucp_profile
// Replace "error" strings with their real, localised form
$error = array_map(array($user, 'lang'), $error);
- $decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_bitfield);
+ if ($request->is_set_post('preview'))
+ {
+ $decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_flags);
+ }
/** @var \phpbb\controller\helper $controller_helper */
$controller_helper = $phpbb_container->get('controller.helper');
diff --git a/phpBB/install/convert/convertor.php b/phpBB/install/convert/convertor.php
index 2dae356c26..769f8bb637 100644
--- a/phpBB/install/convert/convertor.php
+++ b/phpBB/install/convert/convertor.php
@@ -1044,7 +1044,7 @@ class convertor
OR config_name = 'convert_db_user'");
$db->sql_query('DELETE FROM ' . SESSIONS_TABLE);
- @unlink($phpbb_root_path . 'cache/data_global.' . $phpEx);
+ @unlink($phpbb_container->getParameter('core.cache_dir') . 'data_global.' . $phpEx);
phpbb_cache_moderators($db, $cache, $auth);
// And finally, add a note to the log
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index 414d23623a..d0885dc620 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms);
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.3',
- 'phpbb_version' => '3.2.0-b1',
+ 'phpbb_version' => '3.3.0-a1-dev',
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
diff --git a/phpBB/install/phpbbcli.php b/phpBB/install/phpbbcli.php
index 6b0ac39f84..4b86f64e2a 100755
--- a/phpBB/install/phpbbcli.php
+++ b/phpBB/install/phpbbcli.php
@@ -23,7 +23,7 @@ if (php_sapi_name() !== 'cli')
define('IN_PHPBB', true);
define('IN_INSTALL', true);
define('PHPBB_ENVIRONMENT', 'production');
-define('PHPBB_VERSION', '3.2.0-b2-dev');
+define('PHPBB_VERSION', '3.3.0-a1-dev');
$phpbb_root_path = __DIR__ . '/../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index ede31e53e6..9791174e0f 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -276,7 +276,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.0-b2-dev');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.0-b3-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/common.php b/phpBB/language/en/acp/common.php
index 4a70aafc6f..3d1ab7f873 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -606,6 +606,7 @@ $lang = array_merge($lang, array(
'LOG_ERROR_JABBER' => '<strong>Jabber error</strong><br />» %s',
'LOG_ERROR_EMAIL' => '<strong>Email error</strong><br />» %s',
+ 'LOG_ERROR_CAPTCHA' => '<strong>CAPTCHA error</strong><br />» %s',
'LOG_FORUM_ADD' => '<strong>Created new forum</strong><br />» %s',
'LOG_FORUM_COPIED_PERMISSIONS' => '<strong>Copied forum permissions</strong> from %1$s<br />» %2$s',
diff --git a/phpBB/language/en/captcha_qa.php b/phpBB/language/en/captcha_qa.php
index f764a83f24..28011eb636 100644
--- a/phpBB/language/en/captcha_qa.php
+++ b/phpBB/language/en/captcha_qa.php
@@ -40,6 +40,7 @@ $lang = array_merge($lang, array(
'CAPTCHA_QA' => 'Q&amp;A',
'CONFIRM_QUESTION_EXPLAIN' => 'This question is a means of preventing automated form submissions by spambots.',
'CONFIRM_QUESTION_WRONG' => 'You have provided an invalid answer to the question.',
+ 'CONFIRM_QUESTION_MISSING' => 'Questions for the captcha could not be retrieved. Please contact a board administrator.',
'QUESTION_ANSWERS' => 'Answers',
'ANSWERS_EXPLAIN' => 'Please enter valid answers to the question, one per line.',
@@ -60,5 +61,4 @@ $lang = array_merge($lang, array(
'QA_ERROR_MSG' => 'Please fill in all fields and enter at least one answer.',
'QA_LAST_QUESTION' => 'You cannot delete all questions while the plugin is active.',
-
));
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index a473e0d091..3bd5eea354 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -822,7 +822,7 @@ $lang = array_merge($lang, array(
'USERS' => 'Users',
'USE_PERMISSIONS' => 'Test out user’s permissions',
- 'USER_NEW_PERMISSION_DISALLOWED' => 'We are sorry, but you are not authorised to use this feature. You may have just registered here and may need to participate more to be able to use this feature.',
+ 'USER_NEW_PERMISSION_DISALLOWED' => 'We are sorry, but you are not authorised to use this feature. You may have just registered here and may need to participate more in discussions to be able to use this feature.',
'VARIANT_DATE_SEPARATOR' => ' / ', // Used in date format dropdown, eg: "Today, 13:37 / 01 Jan 2007, 13:37" ... to join a relative date with calendar date
'VIEWED' => 'Viewed',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 31578824ef..39d53ece7b 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -121,8 +121,6 @@ $lang = array_merge($lang, array(
$lang = array_merge($lang, array(
'INST_ERR_MISSING_DATA' => 'You must fill out all fields in this block.',
- 'PHPBB_ALREADY_INSTALLED' => 'phpBB is already installed.',
-
'TIMEOUT_DETECTED_TITLE' => 'The installer detected a timeout',
'TIMEOUT_DETECTED_MESSAGE' => 'The installer has detected a timeout, you may try to refresh the page, which may lead to data corruption. We suggest that you either increase your timeout settings or try to use the CLI.',
));
@@ -319,12 +317,14 @@ $lang = array_merge($lang, array(
// CLI messages
$lang = array_merge($lang, array(
'CLI_INSTALL_BOARD' => 'Install phpBB',
+ 'CLI_UPDATE_BOARD' => 'Update phpBB',
'CLI_INSTALL_SHOW_CONFIG' => 'Show the configuration which will be used',
'CLI_INSTALL_VALIDATE_CONFIG' => 'Validate a configuration file',
'CLI_CONFIG_FILE' => 'Config file to use',
'MISSING_FILE' => 'Unable to access file %1$s',
'MISSING_DATA' => 'Config file is missing data or might contain invalid settings.',
'INVALID_YAML_FILE' => 'Could not parse YAML file %1$s',
+ 'CONFIGURATION_VALID' => 'The configuration file is valid',
));
// Common updater messages
@@ -523,7 +523,7 @@ $lang = array_merge($lang, array(
// Finish conversion
'CONVERT_COMPLETE' => 'Conversion completed',
- 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.2. You can now login and <a href="../">access your board</a>. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the <a href="https://www.phpbb.com/support/docs/en/3.2/ug/">Documentation</a> and the <a href="https://www.phpbb.com/community/viewforum.php?f=466">support forums</a>.',
+ 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.3. You can now login and <a href="../">access your board</a>. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the <a href="https://www.phpbb.com/support/docs/en/3.3/ug/">Documentation</a> and the <a href="https://www.phpbb.com/community/viewforum.php?f=466">support forums</a>.',
'CONV_ERROR_ATTACH_FTP_DIR' => 'FTP upload for attachments is enabled at the old board. Please disable the FTP upload option and make sure a valid upload directory is specified, then copy all attachment files to this new web accessible directory. Once you have done this, restart the convertor.',
'CONV_ERROR_CONFIG_EMPTY' => 'There is no configuration information available for the conversion.',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 6063f71d98..ec7f3fe714 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -66,7 +66,7 @@ $lang = array_merge($lang, array(
'ACCOUNT_COPPA' => 'Your account has been created but has to be approved, please check your email for details.',
'ACCOUNT_EMAIL_CHANGED' => 'Your account has been updated. However, this board requires account reactivation on email changes. An activation key has been sent to the new email address you provided. Please check your email for further information.',
'ACCOUNT_EMAIL_CHANGED_ADMIN' => 'Your account has been updated. However, this board requires account reactivation by the administrators on email changes. An email has been sent to them and you will be informed when your account has been reactivated.',
- 'ACCOUNT_INACTIVE' => 'Your account has been created. However, this board requires account activation, an activation key has been sent to the email address you provided. Please check your email for further information.',
+ 'ACCOUNT_INACTIVE' => 'Your account has been created. However, this board requires account activation. An activation key has been sent to the email address you provided. Please check your email for further information and also be sure to check your junk mail box. It may take a while to get the email depending on your email provider.',
'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this board requires account activation by the administrator group. An email has been sent to them and you will be informed when your account has been activated.',
'ACTIVATION_EMAIL_SENT' => 'The activation email has been sent to your email address.',
'ACTIVATION_EMAIL_SENT_ADMIN' => 'The activation email has been sent to the administrators email addresses.',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 759a899de1..146ded0929 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1279,7 +1279,8 @@ switch ($mode)
}
$param = call_user_func_array(array($request, 'variable'), $call);
- $param = urlencode($key) . '=' . ((is_string($param)) ? urlencode($param) : $param);
+ // Encode strings, convert everything else to int in order to prevent empty parameters.
+ $param = urlencode($key) . '=' . ((is_string($param)) ? urlencode($param) : (int) $param);
$params[] = $param;
if ($key != 'first_char')
diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php
index a0c23cb624..2640e1ad1e 100644
--- a/phpBB/phpbb/avatar/driver/upload.php
+++ b/phpBB/phpbb/avatar/driver/upload.php
@@ -179,17 +179,29 @@ class upload extends \phpbb\avatar\driver\driver
$destination = '';
}
+ $filedata = array(
+ 'filename' => $file->get('filename'),
+ 'filesize' => $file->get('filesize'),
+ 'mimetype' => $file->get('mimetype'),
+ 'extension' => $file->get('extension'),
+ 'physical_filename' => $file->get('realname'),
+ 'real_filename' => $file->get('uploadname'),
+ );
+
/**
* Before moving new file in place (and eventually overwriting the existing avatar with the newly uploaded avatar)
*
* @event core.avatar_driver_upload_move_file_before
+ * @var array filedata Array containing uploaded file data
* @var string destination Destination directory where the file is going to be moved
* @var string prefix Prefix for the avatar filename
* @var array row Array with avatar row data
* @var array error Array of errors, if filled in by this event file will not be moved
* @since 3.1.6-RC1
+ * @changed 3.1.9-RC1 Added filedata
*/
$vars = array(
+ 'filedata',
'destination',
'prefix',
'row',
@@ -197,6 +209,8 @@ class upload extends \phpbb\avatar\driver\driver
);
extract($this->dispatcher->trigger_event('core.avatar_driver_upload_move_file_before', compact($vars)));
+ unset($filedata);
+
if (!sizeof($error))
{
// Move file and overwrite any existing image
diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php
index d994394249..a210d877f0 100644
--- a/phpBB/phpbb/cache/driver/file.php
+++ b/phpBB/phpbb/cache/driver/file.php
@@ -32,9 +32,9 @@ class file extends \phpbb\cache\driver\base
*/
function __construct($cache_dir = null)
{
- global $phpbb_root_path, $phpbb_container;
+ global $phpbb_container;
- $this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_root_path . 'cache/' . $phpbb_container->getParameter('core.environment') . '/';
+ $this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_container->getParameter('core.cache_dir');
$this->filesystem = new \phpbb\filesystem\filesystem();
if (!is_dir($this->cache_dir))
diff --git a/phpBB/phpbb/cache/driver/memory.php b/phpBB/phpbb/cache/driver/memory.php
index baae22d809..cc03804705 100644
--- a/phpBB/phpbb/cache/driver/memory.php
+++ b/phpBB/phpbb/cache/driver/memory.php
@@ -25,9 +25,9 @@ abstract class memory extends \phpbb\cache\driver\base
*/
function __construct()
{
- global $phpbb_root_path, $dbname, $table_prefix;
+ global $phpbb_root_path, $dbname, $table_prefix, $phpbb_container;
- $this->cache_dir = $phpbb_root_path . 'cache/';
+ $this->cache_dir = $phpbb_container->getParameter('core.cache_dir');
$this->key_prefix = substr(md5($dbname . $table_prefix), 0, 8) . '_';
if (!isset($this->extension) || !extension_loaded($this->extension))
diff --git a/phpBB/phpbb/captcha/plugins/qa.php b/phpBB/phpbb/captcha/plugins/qa.php
index 4df8a86432..7f804850a4 100644
--- a/phpBB/phpbb/captcha/plugins/qa.php
+++ b/phpBB/phpbb/captcha/plugins/qa.php
@@ -100,6 +100,28 @@ class qa
$db->sql_freeresult($result);
}
+ // final fallback to any language
+ if (!sizeof($this->question_ids))
+ {
+ $this->question_lang = '';
+
+ $sql = 'SELECT q.question_id, q.lang_iso
+ FROM ' . $this->table_captcha_questions . ' q, ' . $this->table_captcha_answers . ' a
+ WHERE q.question_id = a.question_id
+ GROUP BY lang_iso';
+ $result = $db->sql_query($sql, 7200);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (empty($this->question_lang))
+ {
+ $this->question_lang = $row['lang_iso'];
+ }
+ $this->question_ids[$row['question_id']] = $row['question_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
// okay, if there is a confirm_id, we try to load that confirm's state. If not, we try to find one
if (!$this->load_answer() && (!$this->load_confirm_id() || !$this->load_answer()))
{
@@ -198,10 +220,12 @@ class qa
*/
function get_template()
{
- global $template;
+ global $phpbb_log, $template, $user;
- if ($this->is_solved())
+ if ($this->is_solved() || empty($this->question_text) || !count($this->question_ids))
{
+ /** @var \phpbb\log\log_interface $phpbb_log */
+ $phpbb_log->add('critical', $user->data['user_id'], $user->ip, 'LOG_ERROR_CAPTCHA', time(), array($user->lang('CONFIRM_QUESTION_MISSING')));
return false;
}
else
@@ -363,13 +387,15 @@ class qa
*/
function validate()
{
- global $user;
+ global $phpbb_log, $user;
$error = '';
if (!sizeof($this->question_ids))
{
- return false;
+ /** @var \phpbb\log\log_interface $phpbb_log */
+ $phpbb_log->add('critical', $user->data['user_id'], $user->ip, 'LOG_ERROR_CAPTCHA', time(), array($user->lang('CONFIRM_QUESTION_MISSING')));
+ return $user->lang('CONFIRM_QUESTION_MISSING');
}
if (!$this->confirm_id)
diff --git a/phpBB/phpbb/composer.json b/phpBB/phpbb/composer.json
index 758125234f..0b6299d6bc 100644
--- a/phpBB/phpbb/composer.json
+++ b/phpBB/phpbb/composer.json
@@ -26,7 +26,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "3.2.x-dev"
+ "dev-master": "3.3.x-dev"
}
}
}
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php
index e98de0e771..9dbc3737f7 100644
--- a/phpBB/phpbb/controller/helper.php
+++ b/phpBB/phpbb/controller/helper.php
@@ -80,12 +80,13 @@ class helper
* @param bool $display_online_list Do we display online users list
* @param int $item_id Restrict online users to item id
* @param string $item Restrict online users to a certain session item, e.g. forum for session_forum_id
+ * @param bool $send_headers Whether headers should be sent by page_header(). Defaults to false for controllers.
*
* @return Response object containing rendered page
*/
- public function render($template_file, $page_title = '', $status_code = 200, $display_online_list = false, $item_id = 0, $item = 'forum')
+ public function render($template_file, $page_title = '', $status_code = 200, $display_online_list = false, $item_id = 0, $item = 'forum', $send_headers = false)
{
- page_header($page_title, $display_online_list, $item_id, $item);
+ page_header($page_title, $display_online_list, $item_id, $item, $send_headers);
$this->template->set_filenames(array(
'body' => $template_file,
@@ -93,7 +94,9 @@ class helper
page_footer(true, false, false);
- return new Response($this->template->assign_display('body'), $status_code);
+ $headers = !empty($this->user->data['is_bot']) ? array('X-PHPBB-IS-BOT' => 'yes') : array();
+
+ return new Response($this->template->assign_display('body'), $status_code, $headers);
}
/**
diff --git a/phpBB/phpbb/cron/task/core/queue.php b/phpBB/phpbb/cron/task/core/queue.php
index a9345a44df..eca69a5041 100644
--- a/phpBB/phpbb/cron/task/core/queue.php
+++ b/phpBB/phpbb/cron/task/core/queue.php
@@ -20,20 +20,23 @@ class queue extends \phpbb\cron\task\base
{
protected $phpbb_root_path;
protected $php_ext;
+ protected $cache_dir;
protected $config;
/**
- * Constructor.
- *
- * @param string $phpbb_root_path The root path
- * @param string $php_ext PHP file extension
- * @param \phpbb\config\config $config The config
- */
- public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config)
+ * Constructor.
+ *
+ * @param string $phpbb_root_path The root path
+ * @param string $php_ext PHP file extension
+ * @param \phpbb\config\config $config The config
+ * @param string $cache_dir phpBB cache directory
+ */
+ public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, $cache_dir)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
$this->config = $config;
+ $this->cache_dir = $cache_dir;
}
/**
@@ -60,7 +63,7 @@ class queue extends \phpbb\cron\task\base
*/
public function is_runnable()
{
- return file_exists($this->phpbb_root_path . 'cache/queue.' . $this->php_ext);
+ return file_exists($this->cache_dir . 'queue.' . $this->php_ext);
}
/**
diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php
index 30cb667344..214c5590e7 100644
--- a/phpBB/phpbb/db/driver/driver.php
+++ b/phpBB/phpbb/db/driver/driver.php
@@ -1041,6 +1041,7 @@ abstract class driver implements driver_interface
<html dir="ltr">
<head>
<meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SQL Report</title>
<link href="' . htmlspecialchars($phpbb_path_helper->update_web_root_path($phpbb_root_path) . $phpbb_path_helper->get_adm_relative_path()) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />
</head>
diff --git a/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php
index aad8e44681..295f2d2a14 100644
--- a/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php
+++ b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php
@@ -56,19 +56,16 @@ class passwords_convert_p1 extends \phpbb\db\migration\migration
{
// Use $CP$ prefix for passwords that need to
// be converted and set pass convert to false.
- $update_users[$user_id] = array(
- 'user_password' => '$CP$' . $row['user_password'],
- 'user_pass_convert' => 0,
- );
+ $update_users[$user_id] = '$CP$' . $row['user_password'];
}
}
$this->db->sql_freeresult($result);
- foreach ($update_users as $user_id => $user_data)
+ foreach ($update_users as $user_id => $user_password)
{
- $sql = 'UPDATE ' . $this->table_prefix . 'users
- SET ' . $this->db->sql_build_array('UPDATE', $user_data) . '
- WHERE user_id = ' . $user_id;
+ $sql = 'UPDATE ' . $this->table_prefix . "users
+ SET user_password = '" . $this->db->sql_escape($user_password) . "'
+ WHERE user_id = $user_id";
$this->sql_query($sql);
}
diff --git a/phpBB/phpbb/db/migration/data/v320/notifications_board.php b/phpBB/phpbb/db/migration/data/v320/notifications_board.php
index 8a76ebab58..ac1b3a0f2c 100644
--- a/phpBB/phpbb/db/migration/data/v320/notifications_board.php
+++ b/phpBB/phpbb/db/migration/data/v320/notifications_board.php
@@ -34,7 +34,7 @@ class notifications_board extends \phpbb\db\migration\migration
public function update_module()
{
$sql = 'UPDATE ' . MODULES_TABLE . "
- SET auth = 'cfg_allow_board_notifications'
+ SET module_auth = 'cfg_allow_board_notifications'
WHERE module_basename = 'ucp_notifications'
AND module_mode = 'notification_list'";
$this->sql_query($sql);
diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php
index 2fb248082f..7bfe1bbb87 100644
--- a/phpBB/phpbb/di/container_builder.php
+++ b/phpBB/phpbb/di/container_builder.php
@@ -522,6 +522,7 @@ class container_builder
'core.php_ext' => $this->php_ext,
'core.environment' => $this->get_environment(),
'core.debug' => defined('DEBUG') ? DEBUG : false,
+ 'core.cache_dir' => $this->get_cache_dir(),
),
$this->get_env_parameters()
);
diff --git a/phpBB/phpbb/install/console/command/install/config/show.php b/phpBB/phpbb/install/console/command/install/config/show.php
index 5d82d8d1ef..b6c11956fe 100644
--- a/phpBB/phpbb/install/console/command/install/config/show.php
+++ b/phpBB/phpbb/install/console/command/install/config/show.php
@@ -14,7 +14,6 @@
namespace phpbb\install\console\command\install\config;
use phpbb\install\helper\iohandler\factory;
-use phpbb\install\installer;
use phpbb\install\installer_configuration;
use phpbb\language\language;
use Symfony\Component\Config\Definition\Exception\Exception;
@@ -34,11 +33,6 @@ class show extends \phpbb\console\command\command
protected $iohandler_factory;
/**
- * @var installer
- */
- protected $installer;
-
- /**
* @var language
*/
protected $language;
@@ -48,12 +42,10 @@ class show extends \phpbb\console\command\command
*
* @param language $language
* @param factory $factory
- * @param installer $installer
*/
- public function __construct(language $language, factory $factory, installer $installer)
+ public function __construct(language $language, factory $factory)
{
$this->iohandler_factory = $factory;
- $this->installer = $installer;
$this->language = $language;
parent::__construct(new \phpbb\user($language, 'datetime'));
@@ -126,6 +118,6 @@ class show extends \phpbb\console\command\command
return;
}
- $iohandler->add_log_message(Yaml::dump(array('installer' => $config), 10, 4, true, false));
+ $style->block(Yaml::dump(array('installer' => $config), 10, 4, true, false));
}
}
diff --git a/phpBB/phpbb/install/console/command/install/config/validate.php b/phpBB/phpbb/install/console/command/install/config/validate.php
index 3bbbc23e34..b48a1acbd4 100644
--- a/phpBB/phpbb/install/console/command/install/config/validate.php
+++ b/phpBB/phpbb/install/console/command/install/config/validate.php
@@ -14,7 +14,6 @@
namespace phpbb\install\console\command\install\config;
use phpbb\install\helper\iohandler\factory;
-use phpbb\install\installer;
use phpbb\install\installer_configuration;
use phpbb\language\language;
use Symfony\Component\Config\Definition\Exception\Exception;
@@ -34,11 +33,6 @@ class validate extends \phpbb\console\command\command
protected $iohandler_factory;
/**
- * @var installer
- */
- protected $installer;
-
- /**
* @var language
*/
protected $language;
@@ -48,12 +42,10 @@ class validate extends \phpbb\console\command\command
*
* @param language $language
* @param factory $factory
- * @param installer $installer
*/
- public function __construct(language $language, factory $factory, installer $installer)
+ public function __construct(language $language, factory $factory)
{
$this->iohandler_factory = $factory;
- $this->installer = $installer;
$this->language = $language;
parent::__construct(new \phpbb\user($language, 'datetime'));
diff --git a/phpBB/phpbb/install/console/command/install/install.php b/phpBB/phpbb/install/console/command/install/install.php
index d76182af92..50c23f6877 100644
--- a/phpBB/phpbb/install/console/command/install/install.php
+++ b/phpBB/phpbb/install/console/command/install/install.php
@@ -109,7 +109,7 @@ class install extends \phpbb\console\command\command
if ($this->install_helper->is_phpbb_installed())
{
- $iohandler->add_error_message('PHPBB_ALREADY_INSTALLED');
+ $iohandler->add_error_message('INSTALL_PHPBB_INSTALLED');
return 1;
}
diff --git a/phpBB/phpbb/install/console/command/update/config/show.php b/phpBB/phpbb/install/console/command/update/config/show.php
new file mode 100644
index 0000000000..e462763b5d
--- /dev/null
+++ b/phpBB/phpbb/install/console/command/update/config/show.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.
+*
+*/
+
+namespace phpbb\install\console\command\update\config;
+
+use phpbb\install\helper\iohandler\factory;
+use phpbb\install\updater_configuration;
+use phpbb\language\language;
+use Symfony\Component\Config\Definition\Exception\Exception;
+use Symfony\Component\Config\Definition\Processor;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Style\SymfonyStyle;
+use Symfony\Component\Yaml\Exception\ParseException;
+use Symfony\Component\Yaml\Yaml;
+
+class show extends \phpbb\console\command\command
+{
+ /**
+ * @var factory
+ */
+ protected $iohandler_factory;
+
+ /**
+ * @var language
+ */
+ protected $language;
+
+ /**
+ * Constructor
+ *
+ * @param language $language
+ * @param factory $factory
+ */
+ public function __construct(language $language, factory $factory)
+ {
+ $this->iohandler_factory = $factory;
+ $this->language = $language;
+
+ parent::__construct(new \phpbb\user($language, 'datetime'));
+ }
+
+ /**
+ *
+ * {@inheritdoc}
+ */
+ protected function configure()
+ {
+ $this
+ ->setName('update:config:show')
+ ->addArgument(
+ 'config-file',
+ InputArgument::REQUIRED,
+ $this->language->lang('CLI_CONFIG_FILE'))
+ ->setDescription($this->language->lang('CLI_INSTALL_SHOW_CONFIG'))
+ ;
+ }
+
+ /**
+ * Show the validated configuration
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ */
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $this->iohandler_factory->set_environment('cli');
+
+ /** @var \phpbb\install\helper\iohandler\cli_iohandler $iohandler */
+ $iohandler = $this->iohandler_factory->get();
+ $style = new SymfonyStyle($input, $output);
+ $iohandler->set_style($style, $output);
+
+ $config_file = $input->getArgument('config-file');
+
+ if (!is_file($config_file))
+ {
+ $iohandler->add_error_message(array('MISSING_FILE', $config_file));
+
+ return;
+ }
+
+ try
+ {
+ $config = Yaml::parse(file_get_contents($config_file), true, false);
+ }
+ catch (ParseException $e)
+ {
+ $iohandler->add_error_message('INVALID_YAML_FILE');
+
+ return;
+ }
+
+ $processor = new Processor();
+ $configuration = new updater_configuration();
+
+ try
+ {
+ $config = $processor->processConfiguration($configuration, $config);
+ }
+ catch (Exception $e)
+ {
+ $iohandler->add_error_message('INVALID_CONFIGURATION', $e->getMessage());
+
+ return;
+ }
+
+ $style->block(Yaml::dump(array('updater' => $config), 10, 4, true, false));
+ }
+}
diff --git a/phpBB/phpbb/install/console/command/update/config/validate.php b/phpBB/phpbb/install/console/command/update/config/validate.php
new file mode 100644
index 0000000000..18de5eab46
--- /dev/null
+++ b/phpBB/phpbb/install/console/command/update/config/validate.php
@@ -0,0 +1,124 @@
+<?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\install\console\command\update\config;
+
+use phpbb\install\helper\iohandler\factory;
+use phpbb\install\updater_configuration;
+use phpbb\language\language;
+use Symfony\Component\Config\Definition\Exception\Exception;
+use Symfony\Component\Config\Definition\Processor;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Style\SymfonyStyle;
+use Symfony\Component\Yaml\Exception\ParseException;
+use Symfony\Component\Yaml\Yaml;
+
+class validate extends \phpbb\console\command\command
+{
+ /**
+ * @var factory
+ */
+ protected $iohandler_factory;
+
+ /**
+ * @var language
+ */
+ protected $language;
+
+ /**
+ * Constructor
+ *
+ * @param language $language
+ * @param factory $factory
+ */
+ public function __construct(language $language, factory $factory)
+ {
+ $this->iohandler_factory = $factory;
+ $this->language = $language;
+
+ parent::__construct(new \phpbb\user($language, 'datetime'));
+ }
+
+ /**
+ *
+ * {@inheritdoc}
+ */
+ protected function configure()
+ {
+ $this
+ ->setName('update:config:validate')
+ ->addArgument(
+ 'config-file',
+ InputArgument::REQUIRED,
+ $this->language->lang('CLI_CONFIG_FILE'))
+ ->setDescription($this->language->lang('CLI_INSTALL_VALIDATE_CONFIG'))
+ ;
+ }
+
+ /**
+ * Validate the configuration file
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ */
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $this->iohandler_factory->set_environment('cli');
+
+ /** @var \phpbb\install\helper\iohandler\cli_iohandler $iohandler */
+ $iohandler = $this->iohandler_factory->get();
+ $style = new SymfonyStyle($input, $output);
+ $iohandler->set_style($style, $output);
+
+ $config_file = $input->getArgument('config-file');
+
+ if (!is_file($config_file))
+ {
+ $iohandler->add_error_message(array('MISSING_FILE', array($config_file)));
+
+ return 1;
+ }
+
+ try
+ {
+ $config = Yaml::parse(file_get_contents($config_file), true, false);
+ }
+ catch (ParseException $e)
+ {
+ $iohandler->add_error_message('INVALID_YAML_FILE');
+
+ return 1;
+ }
+
+ $processor = new Processor();
+ $configuration = new updater_configuration();
+
+ try
+ {
+ $processor->processConfiguration($configuration, $config);
+ }
+ catch (Exception $e)
+ {
+ $iohandler->add_error_message('INVALID_CONFIGURATION', $e->getMessage());
+
+ return 1;
+ }
+
+ $iohandler->add_success_message('CONFIGURATION_VALID');
+ return 0;
+ }
+}
diff --git a/phpBB/phpbb/install/console/command/update/update.php b/phpBB/phpbb/install/console/command/update/update.php
new file mode 100644
index 0000000000..116f42f758
--- /dev/null
+++ b/phpBB/phpbb/install/console/command/update/update.php
@@ -0,0 +1,179 @@
+<?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\install\console\command\update;
+
+use phpbb\install\exception\installer_exception;
+use phpbb\install\helper\install_helper;
+use phpbb\install\helper\iohandler\cli_iohandler;
+use phpbb\install\helper\iohandler\factory;
+use phpbb\install\installer;
+use phpbb\install\updater_configuration;
+use phpbb\language\language;
+use Symfony\Component\Config\Definition\Exception\Exception;
+use Symfony\Component\Config\Definition\Processor;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Style\SymfonyStyle;
+use Symfony\Component\Yaml\Exception\ParseException;
+use Symfony\Component\Yaml\Yaml;
+
+class update extends \phpbb\console\command\command
+{
+ /**
+ * @var factory
+ */
+ protected $iohandler_factory;
+
+ /**
+ * @var installer
+ */
+ protected $installer;
+
+ /**
+ * @var install_helper
+ */
+ protected $install_helper;
+
+ /**
+ * @var language
+ */
+ protected $language;
+
+ /**
+ * Constructor
+ *
+ * @param language $language
+ * @param factory $factory
+ * @param installer $installer
+ * @param install_helper $install_helper
+ */
+ public function __construct(language $language, factory $factory, installer $installer, install_helper $install_helper)
+ {
+ $this->iohandler_factory = $factory;
+ $this->installer = $installer;
+ $this->language = $language;
+ $this->install_helper = $install_helper;
+
+ parent::__construct(new \phpbb\user($language, 'datetime'));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function configure()
+ {
+ $this
+ ->setName('update')
+ ->addArgument(
+ 'config-file',
+ InputArgument::REQUIRED,
+ $this->language->lang('CLI_CONFIG_FILE'))
+ ->setDescription($this->language->lang('CLI_UPDATE_BOARD'))
+ ;
+ }
+
+ /**
+ * Executes the command update.
+ *
+ * Update the board
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return int
+ */
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $this->iohandler_factory->set_environment('cli');
+
+ /** @var \phpbb\install\helper\iohandler\cli_iohandler $iohandler */
+ $iohandler = $this->iohandler_factory->get();
+ $style = new SymfonyStyle($input, $output);
+ $iohandler->set_style($style, $output);
+
+ $this->installer->set_iohandler($iohandler);
+
+ $config_file = $input->getArgument('config-file');
+
+ if (!$this->install_helper->is_phpbb_installed())
+ {
+ $iohandler->add_error_message('INSTALL_PHPBB_NOT_INSTALLED');
+
+ return 1;
+ }
+
+ if (!is_file($config_file))
+ {
+ $iohandler->add_error_message(array('MISSING_FILE', $config_file));
+
+ return 1;
+ }
+
+ try
+ {
+ $config = Yaml::parse(file_get_contents($config_file), true, false);
+ }
+ catch (ParseException $e)
+ {
+ $iohandler->add_error_message(array('INVALID_YAML_FILE', $config_file));
+
+ return 1;
+ }
+
+ $processor = new Processor();
+ $configuration = new updater_configuration();
+
+ try
+ {
+ $config = $processor->processConfiguration($configuration, $config);
+ }
+ catch (Exception $e)
+ {
+ $iohandler->add_error_message('INVALID_CONFIGURATION', $e->getMessage());
+
+ return 1;
+ }
+
+ $this->register_configuration($iohandler, $config);
+
+ try
+ {
+ $this->installer->run();
+ }
+ catch (installer_exception $e)
+ {
+ $iohandler->add_error_message($e->getMessage());
+ return 1;
+ }
+ }
+
+ /**
+ * Register the configuration to simulate the forms.
+ *
+ * @param cli_iohandler $iohandler
+ * @param array $config
+ */
+ private function register_configuration(cli_iohandler $iohandler, $config)
+ {
+ $iohandler->set_input('update_type', $config['type']);
+ $iohandler->set_input('submit_update', 'submit');
+
+ $iohandler->set_input('compression_method', '.tar');
+ $iohandler->set_input('method', 'direct_file');
+ $iohandler->set_input('submit_update_file', 'submit');
+
+ $iohandler->set_input('submit_continue_file_update', 'submit');
+ }
+}
diff --git a/phpBB/phpbb/install/controller/timeout_check.php b/phpBB/phpbb/install/controller/timeout_check.php
new file mode 100644
index 0000000000..1c90e3caf3
--- /dev/null
+++ b/phpBB/phpbb/install/controller/timeout_check.php
@@ -0,0 +1,80 @@
+<?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\install\controller;
+
+use Symfony\Component\HttpFoundation\JsonResponse;
+
+class timeout_check
+{
+ /**
+ * @var helper
+ */
+ protected $helper;
+
+ /**
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * Constructor
+ *
+ * @param helper $helper
+ * @param string $phpbb_root_path
+ */
+ public function __construct(helper $helper, $phpbb_root_path)
+ {
+ $this->helper = $helper;
+ $this->phpbb_root_path = $phpbb_root_path;
+ }
+
+ /**
+ * Controller for querying installer status
+ */
+ public function status()
+ {
+ $lock_file = $this->phpbb_root_path . 'store/io_lock.lock';
+ $response = new JsonResponse();
+
+ if (!file_exists($lock_file))
+ {
+ $response->setData(array(
+ 'status' => 'fail',
+ ));
+ }
+ else
+ {
+ $fp = @fopen($lock_file, 'r');
+
+ if ($fp && flock($fp, LOCK_EX | LOCK_NB))
+ {
+ $status = (filesize($lock_file) >= 2 && fread($fp, 2) === 'ok') ? 'continue' : 'fail';
+
+ $response->setData(array(
+ 'status' => $status,
+ ));
+ flock($fp, LOCK_UN);
+ fclose($fp);
+ }
+ else
+ {
+ $response->setData(array(
+ 'status' => 'running',
+ ));
+ }
+ }
+
+ return $response;
+ }
+}
diff --git a/phpBB/phpbb/install/event/kernel_exception_subscriber.php b/phpBB/phpbb/install/event/kernel_exception_subscriber.php
index c2960cb13c..60b7d9a400 100644
--- a/phpBB/phpbb/install/event/kernel_exception_subscriber.php
+++ b/phpBB/phpbb/install/event/kernel_exception_subscriber.php
@@ -21,6 +21,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
+use Symfony\Component\HttpFoundation\JsonResponse;
/**
* Exception handler for the installer
diff --git a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php
index 8c62ec7bd0..c168d26425 100644
--- a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php
+++ b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php
@@ -44,6 +44,11 @@ class ajax_iohandler extends iohandler_base
/**
* @var string
*/
+ protected $phpbb_root_path;
+
+ /**
+ * @var string
+ */
protected $file_status;
/**
@@ -77,14 +82,20 @@ class ajax_iohandler extends iohandler_base
protected $redirect_url;
/**
+ * @var resource
+ */
+ protected $file_lock_pointer;
+
+ /**
* Constructor
*
* @param path_helper $path_helper
* @param \phpbb\request\request_interface $request HTTP request interface
* @param \phpbb\template\template $template Template engine
* @param router $router Router
+ * @param string $root_path Path to phpBB's root
*/
- public function __construct(path_helper $path_helper, \phpbb\request\request_interface $request, \phpbb\template\template $template, router $router)
+ public function __construct(path_helper $path_helper, \phpbb\request\request_interface $request, \phpbb\template\template $template, router $router, $root_path)
{
$this->path_helper = $path_helper;
$this->request = $request;
@@ -96,6 +107,7 @@ class ajax_iohandler extends iohandler_base
$this->download = array();
$this->redirect_url = array();
$this->file_status = '';
+ $this->phpbb_root_path = $root_path;
parent::__construct();
}
@@ -433,6 +445,33 @@ class ajax_iohandler extends iohandler_base
}
/**
+ * Acquires a file lock
+ */
+ public function acquire_lock()
+ {
+ $lock_file = $this->phpbb_root_path . 'store/io_lock.lock';
+ $this->file_lock_pointer = @fopen($lock_file, 'w+');
+
+ if ($this->file_lock_pointer)
+ {
+ flock($this->file_lock_pointer, LOCK_EX);
+ }
+ }
+
+ /**
+ * Release file lock
+ */
+ public function release_lock()
+ {
+ if ($this->file_lock_pointer)
+ {
+ fwrite($this->file_lock_pointer, 'ok');
+ flock($this->file_lock_pointer, LOCK_UN);
+ fclose($this->file_lock_pointer);
+ }
+ }
+
+ /**
* Callback function for language replacing
*
* @param array $matches
diff --git a/phpBB/phpbb/install/installer.php b/phpBB/phpbb/install/installer.php
index b5709e96c7..240423ae78 100644
--- a/phpBB/phpbb/install/installer.php
+++ b/phpBB/phpbb/install/installer.php
@@ -22,6 +22,7 @@ use phpbb\install\exception\resource_limit_reached_exception;
use phpbb\install\exception\user_interaction_required_exception;
use phpbb\install\helper\config;
use phpbb\install\helper\container_factory;
+use phpbb\install\helper\iohandler\ajax_iohandler;
use phpbb\install\helper\iohandler\cli_iohandler;
use phpbb\install\helper\iohandler\iohandler_interface;
use phpbb\path_helper;
@@ -126,6 +127,11 @@ class installer
*/
public function run()
{
+ if ($this->iohandler instanceof ajax_iohandler)
+ {
+ $this->iohandler->acquire_lock();
+ }
+
// Load install progress
$this->install_config->load_config();
@@ -174,7 +180,16 @@ class installer
try
{
$iterator = $this->installer_modules->getIterator();
- $iterator->seek($module_index);
+
+ if ($module_index < $iterator->count())
+ {
+ $iterator->seek($module_index);
+ }
+ else
+ {
+ $iterator->seek($module_index - 1);
+ $iterator->next();
+ }
while ($iterator->valid())
{
@@ -256,6 +271,11 @@ class installer
$fail_cleanup = true;
}
+ if ($this->iohandler instanceof ajax_iohandler)
+ {
+ $this->iohandler->release_lock();
+ }
+
if ($install_finished)
{
// Send install finished message
diff --git a/phpBB/phpbb/install/module/install_data/task/add_bots.php b/phpBB/phpbb/install/module/install_data/task/add_bots.php
index d45a6839a0..1f1cecceb2 100644
--- a/phpBB/phpbb/install/module/install_data/task/add_bots.php
+++ b/phpBB/phpbb/install/module/install_data/task/add_bots.php
@@ -214,6 +214,7 @@ class add_bots extends \phpbb\install\task_base
// If we can't insert this user then continue to the next one to avoid inconsistent data
$this->io_handler->add_error_message('CONV_ERROR_INSERT_BOT');
+ $i++;
continue;
}
diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php
index c139b70fa4..3b24e8ba40 100644
--- a/phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php
+++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php
@@ -53,6 +53,14 @@ class obtain_update_settings extends task_base
if ($this->iohandler->get_input('submit_update', false))
{
$update_files = $this->iohandler->get_input('update_type', 'all') === 'all';
+
+ if ($this->installer_config->get('disable_filesystem_update', false) && $update_files)
+ {
+ $this->iohandler->add_error_message('UPDATE_FILES_NOT_FOUND');
+
+ throw new user_interaction_required_exception();
+ }
+
$this->installer_config->set('do_update_files', $update_files);
}
else
diff --git a/phpBB/phpbb/install/module/requirements/task/check_update.php b/phpBB/phpbb/install/module/requirements/task/check_update.php
index 4e9124ff47..cd66ffc8f9 100644
--- a/phpBB/phpbb/install/module/requirements/task/check_update.php
+++ b/phpBB/phpbb/install/module/requirements/task/check_update.php
@@ -122,7 +122,7 @@ class check_update extends task_base
// Check for a valid update directory
if (!$this->filesystem->exists($update_files) || !$this->filesystem->is_readable($update_files))
{
- $this->iohandler->add_error_message('UPDATE_FILES_NOT_FOUND');
+ $this->iohandler->add_warning_message('UPDATE_FILES_NOT_FOUND');
$this->set_test_passed(false);
// If there are no update files, we can't check the version etc
diff --git a/phpBB/phpbb/install/updater_configuration.php b/phpBB/phpbb/install/updater_configuration.php
new file mode 100644
index 0000000000..e992356290
--- /dev/null
+++ b/phpBB/phpbb/install/updater_configuration.php
@@ -0,0 +1,40 @@
+<?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\install;
+
+use Symfony\Component\Config\Definition\Builder\TreeBuilder;
+use Symfony\Component\Config\Definition\ConfigurationInterface;
+
+class updater_configuration implements ConfigurationInterface
+{
+
+ /**
+ * Generates the configuration tree builder.
+ *
+ * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
+ */
+ public function getConfigTreeBuilder()
+ {
+ $treeBuilder = new TreeBuilder();
+ $rootNode = $treeBuilder->root('updater');
+ $rootNode
+ ->addDefaultsIfNotSet()
+ ->children()
+ ->enumNode('type')->values(['all','db_only'])->defaultValue('all')->end()
+ ->end()
+ ;
+
+ return $treeBuilder;
+ }
+}
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php
index ea1b800dc5..3265bcb629 100644
--- a/phpBB/phpbb/notification/manager.php
+++ b/phpBB/phpbb/notification/manager.php
@@ -899,6 +899,8 @@ class manager
{
$notification_type_ids = $this->cache->get('notification_type_ids');
+ $this->db->sql_transaction('begin');
+
if ($notification_type_ids === false)
{
$notification_type_ids = array();
@@ -933,6 +935,8 @@ class manager
$this->cache->put('notification_type_ids', $notification_type_ids);
}
+ $this->db->sql_transaction('commit');
+
return $notification_type_ids[$notification_type_name];
}
diff --git a/phpBB/phpbb/notification/method/messenger_base.php b/phpBB/phpbb/notification/method/messenger_base.php
index 97bad524e1..812cd6a911 100644
--- a/phpBB/phpbb/notification/method/messenger_base.php
+++ b/phpBB/phpbb/notification/method/messenger_base.php
@@ -104,7 +104,7 @@ abstract class messenger_base extends \phpbb\notification\method\base
$messenger->assign_vars(array_merge(array(
'USERNAME' => $user['username'],
- 'U_NOTIFICATION_SETTINGS' => generate_board_url() . '/ucp.' . $this->php_ext . '?i=ucp_notifications',
+ 'U_NOTIFICATION_SETTINGS' => generate_board_url() . '/ucp.' . $this->php_ext . '?i=ucp_notifications&amp;mode=notification_options',
), $notification->get_email_template_variables()));
$messenger->send($notify_method);
diff --git a/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php b/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
index 2500ba0cf8..1446551b8b 100644
--- a/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
+++ b/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
@@ -25,6 +25,6 @@ class recursive_dot_prefix_filter_iterator extends \RecursiveFilterIterator
public function accept()
{
$filename = $this->current()->getFilename();
- return !$this->current()->isDir() || $filename[0] !== '.';
+ return $filename[0] !== '.' || !$this->current()->isDir();
}
}
diff --git a/phpBB/phpbb/routing/router.php b/phpBB/phpbb/routing/router.php
index 5d237b6433..f19886fb0b 100644
--- a/phpBB/phpbb/routing/router.php
+++ b/phpBB/phpbb/routing/router.php
@@ -49,13 +49,6 @@ class router implements RouterInterface
protected $loader;
/**
- * phpBB root path
- *
- * @var string
- */
- protected $phpbb_root_path;
-
- /**
* PHP file extensions
*
* @var string
@@ -63,13 +56,6 @@ class router implements RouterInterface
protected $php_ext;
/**
- * Name of the current environment
- *
- * @var string
- */
- protected $environment;
-
- /**
* @var \Symfony\Component\Routing\Matcher\UrlMatcherInterface|null
*/
protected $matcher;
@@ -90,24 +76,27 @@ class router implements RouterInterface
protected $route_collection;
/**
+ * @var string
+ */
+ protected $cache_dir;
+
+ /**
* Construct method
*
* @param ContainerInterface $container DI container
* @param resources_locator_interface $resources_locator Resources locator
* @param LoaderInterface $loader Resources loader
- * @param string $phpbb_root_path phpBB root path
* @param string $php_ext PHP file extension
- * @param string $environment Name of the current environment
+ * @param string $cache_dir phpBB cache directory
*/
- public function __construct(ContainerInterface $container, resources_locator_interface $resources_locator, LoaderInterface $loader, $phpbb_root_path, $php_ext, $environment)
+ public function __construct(ContainerInterface $container, resources_locator_interface $resources_locator, LoaderInterface $loader, $php_ext, $cache_dir)
{
$this->container = $container;
$this->resources_locator = $resources_locator;
$this->loader = $loader;
- $this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
- $this->environment = $environment;
$this->context = new RequestContext();
+ $this->cache_dir = $cache_dir;
}
/**
@@ -211,7 +200,7 @@ class router implements RouterInterface
{
try
{
- $cache = new ConfigCache("{$this->phpbb_root_path}cache/{$this->environment}/url_matcher.{$this->php_ext}", defined('DEBUG'));
+ $cache = new ConfigCache("{$this->cache_dir}url_matcher.{$this->php_ext}", defined('DEBUG'));
if (!$cache->isFresh())
{
$dumper = new PhpMatcherDumper($this->get_routes());
@@ -266,7 +255,7 @@ class router implements RouterInterface
{
try
{
- $cache = new ConfigCache("{$this->phpbb_root_path}cache/{$this->environment}/url_generator.{$this->php_ext}", defined('DEBUG'));
+ $cache = new ConfigCache("{$this->cache_dir}url_generator.{$this->php_ext}", defined('DEBUG'));
if (!$cache->isFresh())
{
$dumper = new PhpGeneratorDumper($this->get_routes());
diff --git a/phpBB/phpbb/textreparser/base.php b/phpBB/phpbb/textreparser/base.php
index 3e5ee248a1..afa5ccacad 100644
--- a/phpBB/phpbb/textreparser/base.php
+++ b/phpBB/phpbb/textreparser/base.php
@@ -230,7 +230,8 @@ abstract class base implements reparser_interface
$unparsed['enable_img_bbcode'],
$unparsed['enable_flash_bbcode'],
$unparsed['enable_quote_bbcode'],
- $unparsed['enable_url_bbcode']
+ $unparsed['enable_url_bbcode'],
+ 'reparse'
);
// Save the new text if it has changed and it's not a dry run
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index 5262e10e87..305510851c 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -595,7 +595,7 @@ class user extends \phpbb\session
$utc = new \DateTimeZone('UTC');
}
- $time = new $this->datetime($this, "@$gmepoch", $utc);
+ $time = new $this->datetime($this, '@' . (int) $gmepoch, $utc);
$time->setTimezone($this->timezone);
return $time->format($format, $forcedate);
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 6cfb877f75..9bd4acf99b 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -104,7 +104,7 @@ $vars = array(
extract($phpbb_dispatcher->trigger_event('core.modify_posting_parameters', compact($vars)));
// Was cancel pressed? If so then redirect to the appropriate page
-if ($cancel || ($current_time - $lastclick < 2 && $submit))
+if ($cancel)
{
$f = ($forum_id) ? 'f=' . $forum_id . '&amp;' : '';
$redirect = ($post_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $f . 'p=' . $post_id) . '#p' . $post_id : (($topic_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $f . 't=' . $topic_id) : (($forum_id) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) : append_sid("{$phpbb_root_path}index.$phpEx")));
@@ -602,7 +602,7 @@ if ($post_data['post_attachment'] && !$submit && !$refresh && !$preview && $mode
WHERE post_msg_id = $post_id
AND in_message = 0
AND is_orphan = 0
- ORDER BY filetime DESC";
+ ORDER BY attach_id DESC";
$result = $db->sql_query($sql);
$message_parser->attachment_data = array_merge($message_parser->attachment_data, $db->sql_fetchrowset($result));
$db->sql_freeresult($result);
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
index ec7d8d2e27..e0b87f2398 100644
--- a/phpBB/styles/prosilver/style.cfg
+++ b/phpBB/styles/prosilver/style.cfg
@@ -21,8 +21,8 @@
# General Information about this style
name = prosilver
copyright = © phpBB Limited, 2007
-style_version = 3.2.0-b1
-phpbb_version = 3.2.0-b1
+style_version = 3.3.0-dev
+phpbb_version = 3.3.0-dev
# Defining a different template bitfield
# template_bitfield = lNg=
diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html
index 788989f4c5..7925bd6362 100644
--- a/phpBB/styles/prosilver/template/navbar_header.html
+++ b/phpBB/styles/prosilver/template/navbar_header.html
@@ -180,10 +180,10 @@
<!-- EVENT overall_header_breadcrumbs_before -->
<li class="breadcrumbs">
<!-- IF U_SITE_HOME -->
- <span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span>{L_SITE_HOME}</span></a></span>
+ <span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" itemprop="url" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="title">{L_SITE_HOME}</span></a></span>
<!-- ENDIF -->
<!-- EVENT overall_header_breadcrumb_prepend -->
- <span class="crumb" {$MICRODATA}><a href="{U_INDEX}" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span>{L_INDEX}</span></a></span>
+ <span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemprop="url" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="title">{L_INDEX}</span></a></span>
<!-- BEGIN navlinks -->
<!-- EVENT overall_header_navlink_prepend -->
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index 823d5e1c12..8a3eb65cd4 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
{META}
<title><!-- IF UNREAD_NOTIFICATIONS_COUNT -->({UNREAD_NOTIFICATIONS_COUNT}) <!-- ENDIF --><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title>
diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html
index 954eebd011..0e889b476d 100644
--- a/phpBB/styles/prosilver/template/simple_header.html
+++ b/phpBB/styles/prosilver/template/simple_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
index 70beec8256..9377eeb9f5 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex" />
{META}
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html
index 796111dd3c..3c1ed4c3f1 100644
--- a/phpBB/styles/prosilver/template/viewtopic_print.html
+++ b/phpBB/styles/prosilver/template/viewtopic_print.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex" />
{META}
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index c9a081cc0e..a2ab4d56f5 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -277,14 +277,42 @@ if ($sort_days)
{
$min_post_time = time() - ($sort_days * 86400);
- $sql = 'SELECT COUNT(topic_id) AS num_topics
- FROM ' . TOPICS_TABLE . "
- WHERE forum_id = $forum_id
- AND (topic_last_post_time >= $min_post_time
- OR topic_type = " . POST_ANNOUNCE . '
- OR topic_type = ' . POST_GLOBAL . ')
- AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id);
- $result = $db->sql_query($sql);
+ $sql_array = array(
+ 'SELECT' => 'COUNT(t.topic_id) AS num_topics',
+ 'FROM' => array(
+ TOPICS_TABLE => 't',
+ ),
+ 'WHERE' => 't.forum_id = ' . $forum_id . '
+ AND (t.topic_last_post_time >= ' . $min_post_time . '
+ OR t.topic_type = ' . POST_ANNOUNCE . '
+ OR t.topic_type = ' . POST_GLOBAL . ')
+ AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.'),
+ );
+
+ /**
+ * Modify the sort data SQL query for getting additional fields if needed
+ *
+ * @event core.viewforum_modify_sort_data_sql
+ * @var int forum_id The forum_id whose topics are being listed
+ * @var int start Variable containing start for pagination
+ * @var int sort_days The oldest topic displayable in elapsed days
+ * @var string sort_key The sorting by. It is one of the first character of (in low case):
+ * Author, Post time, Replies, Subject, Views
+ * @var string sort_dir Either "a" for ascending or "d" for descending
+ * @var array sql_array The SQL array to get the data of all topics
+ * @since 3.1.9-RC1
+ */
+ $vars = array(
+ 'forum_id',
+ 'start',
+ 'sort_days',
+ 'sort_key',
+ 'sort_dir',
+ 'sql_array',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_sort_data_sql', compact($vars)));
+
+ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_array));
$topics_count = (int) $db->sql_fetchfield('num_topics');
$db->sql_freeresult($result);
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 87de7c79a4..ded0f9aacc 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -590,6 +590,33 @@ $quickmod_array = array(
'topic_logs' => array('VIEW_TOPIC_LOGS', $auth->acl_get('m_', $forum_id)),
);
+/**
+* Event to modify data in the quickmod_array before it gets sent to the
+* phpbb_add_quickmod_option function.
+*
+* @event core.viewtopic_add_quickmod_option_before
+* @var int forum_id Forum ID
+* @var int post_id Post ID
+* @var array quickmod_array Array with quick moderation options data
+* @var array topic_data Array with topic data
+* @var int topic_id Topic ID
+* @var array topic_tracking_info Array with topic tracking data
+* @var string viewtopic_url URL to the topic page
+* @var bool allow_change_type Topic change permissions check
+* @since 3.1.9-RC1
+*/
+$vars = array(
+ 'forum_id',
+ 'post_id',
+ 'quickmod_array',
+ 'topic_data',
+ 'topic_id',
+ 'topic_tracking_info',
+ 'viewtopic_url',
+ 'allow_change_type',
+);
+extract($phpbb_dispatcher->trigger_event('core.viewtopic_add_quickmod_option_before', compact($vars)));
+
foreach ($quickmod_array as $option => $qm_ary)
{
if (!empty($qm_ary[1]))
@@ -1455,7 +1482,7 @@ if (sizeof($attach_list))
FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . $db->sql_in_set('post_msg_id', $attach_list) . '
AND in_message = 0
- ORDER BY filetime DESC, post_msg_id ASC';
+ ORDER BY attach_id DESC, post_msg_id ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -1597,6 +1624,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
{
$parse_flags = ($user_cache[$poster_id]['sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
$user_cache[$poster_id]['sig'] = generate_text_for_display($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $user_cache[$poster_id]['sig_bbcode_bitfield'], $parse_flags, true);
+ $user_cache[$poster_id]['sig_parsed'] = true;
}
// Parse the message and subject
diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php
index 72c5328b0b..808eb684f2 100644
--- a/tests/controller/common_helper_route.php
+++ b/tests/controller/common_helper_route.php
@@ -126,7 +126,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
new \phpbb\routing\file_locator($this->filesystem, dirname(__FILE__) . '/')
);
$resources_locator = new \phpbb\routing\resources_locator\default_resources_locator(dirname(__FILE__) . '/', PHPBB_ENVIRONMENT, $this->extension_manager);
- $this->router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php', PHPBB_ENVIRONMENT);
+ $this->router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php');
// Set correct current phpBB root path
$this->root_path = $this->get_phpbb_root_path();
diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php
index 431b26b2bc..e8af2f7485 100644
--- a/tests/controller/controller_test.php
+++ b/tests/controller/controller_test.php
@@ -47,7 +47,7 @@ class phpbb_controller_controller_test extends phpbb_test_case
new \phpbb\routing\file_locator(new \phpbb\filesystem\filesystem(), dirname(__FILE__) . '/')
);
$resources_locator = new \phpbb\routing\resources_locator\default_resources_locator(dirname(__FILE__) . '/', PHPBB_ENVIRONMENT, $this->extension_manager);
- $router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php', PHPBB_ENVIRONMENT);
+ $router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php');
$routes = $router->get_routes();
// This will need to be updated if any new routes are defined
diff --git a/tests/functional/visit_installer_test.php b/tests/functional/visit_installer_test.php
new file mode 100644
index 0000000000..b4a75c0b51
--- /dev/null
+++ b/tests/functional/visit_installer_test.php
@@ -0,0 +1,30 @@
+<?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.
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_visit_installer_test extends phpbb_functional_test_case
+{
+ public function test_visit_installer()
+ {
+ self::request('GET', 'install/', [], false);
+ $this->assertContains('<meta http-equiv="refresh" content="0; url=./app.php" />', $this->get_content());
+
+ self::request('GET', 'install/index.html', [], false);
+ $this->assertContains('<meta http-equiv="refresh" content="0; url=./app.php" />', $this->get_content());
+
+ self::request('GET', 'install/app.php');
+ $this->assertContains('installation system', $this->get_content());
+ }
+}
diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php
index 6a3b46cdae..024b6fc02d 100644
--- a/tests/pagination/pagination_test.php
+++ b/tests/pagination/pagination_test.php
@@ -46,7 +46,7 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
new \phpbb\routing\file_locator($filesystem, dirname(__FILE__) . '/')
);
$resources_locator = new \phpbb\routing\resources_locator\default_resources_locator(dirname(__FILE__) . '/', PHPBB_ENVIRONMENT, $manager);
- $router = new phpbb_mock_router(new phpbb_mock_container_builder(), $resources_locator, $loader, dirname(__FILE__) . '/', 'php', PHPBB_ENVIRONMENT);
+ $router = new phpbb_mock_router(new phpbb_mock_container_builder(), $resources_locator, $loader, dirname(__FILE__) . '/', 'php');
$request = new phpbb_mock_request();
$request->overwrite('SCRIPT_NAME', '/app.php', \phpbb\request\request_interface::SERVER);
diff --git a/tests/session/testable_factory.php b/tests/session/testable_factory.php
index 7819063505..6f8b49122b 100644
--- a/tests/session/testable_factory.php
+++ b/tests/session/testable_factory.php
@@ -73,7 +73,7 @@ class phpbb_session_testable_factory
public function get_session(\phpbb\db\driver\driver_interface $dbal)
{
// set up all the global variables used by session
- global $SID, $_SID, $db, $config, $cache, $request, $phpbb_container;
+ global $SID, $_SID, $db, $config, $cache, $request, $phpbb_container, $phpbb_root_path;
$request = $this->request = new phpbb_mock_request(
array(),
@@ -95,6 +95,7 @@ class phpbb_session_testable_factory
new phpbb_mock_auth_provider()
);
$phpbb_container->setParameter('core.environment', PHPBB_ENVIRONMENT);
+ $phpbb_container->setParameter('core.cache_dir', $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/');
$provider_collection = new \phpbb\auth\provider_collection($phpbb_container, $config);
$provider_collection->add('auth.provider.db');
$phpbb_container->set(
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index 53519617b3..d234642898 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -209,10 +209,11 @@ class phpbb_functional_test_case extends phpbb_test_case
{
if (!$this->cache)
{
- global $phpbb_container;
+ global $phpbb_container, $phpbb_root_path;
$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 . '/');
$this->cache = new \phpbb\cache\driver\file;
}
diff --git a/tests/text_processing/decode_message_test.php b/tests/text_processing/decode_message_test.php
index 7de599f2b1..fd1719fedc 100644
--- a/tests/text_processing/decode_message_test.php
+++ b/tests/text_processing/decode_message_test.php
@@ -16,6 +16,15 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
class phpbb_text_processing_decode_message_test extends phpbb_test_case
{
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $phpbb_dispatcher;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ }
+
/**
* @dataProvider get_legacy_tests
*/
@@ -46,6 +55,14 @@ class phpbb_text_processing_decode_message_test extends phpbb_test_case
'<!-- m --><a class="postlink" href="http://www.phpbb.com">http://www.phpbb.com</a><!-- m -->',
'http://www.phpbb.com'
),
+ array(
+ '<!-- m --><a class="postlink" href="http://www.phpbb.com">this is just text</a><!-- m -->',
+ 'http://www.phpbb.com'
+ ),
+ array(
+ '<!-- m --><a class="postlink" href="http://www.phpbb.com/some/more/link/that/is/shortened">http://www.phpbb.com/some/ ... /shortened</a><!-- m -->',
+ 'http://www.phpbb.com/some/more/link/that/is/shortened'
+ ),
/**
* Fails as per PHPBB3-8420
* @link http://tracker.phpbb.com/browse/PHPBB3-8420
diff --git a/tests/text_reparser/base_test.php b/tests/text_reparser/base_test.php
new file mode 100644
index 0000000000..2223ead9a6
--- /dev/null
+++ b/tests/text_reparser/base_test.php
@@ -0,0 +1,70 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/functions_content.php';
+require_once __DIR__ . '/../test_framework/phpbb_database_test_case.php';
+
+class phpbb_textreparser_base_test extends phpbb_database_test_case
+{
+ protected $db;
+
+ public function setUp()
+ {
+ global $config;
+ if (!isset($config))
+ {
+ $config = new \phpbb\config\config(array());
+ }
+ $this->get_test_case_helpers()->set_s9e_services();
+ $this->db = $this->new_dbal();
+ parent::setUp();
+ }
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(__DIR__ . '/fixtures/base.xml');
+ }
+
+ protected function get_reparser()
+ {
+ return new \phpbb\textreparser\plugins\post_text($this->db, POSTS_TABLE);
+ }
+
+ protected function get_rows(array $ids)
+ {
+ $sql = 'SELECT post_id AS id, post_text AS text
+ FROM ' . POSTS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('post_id', $ids) . '
+ ORDER BY id';
+ $result = $this->db->sql_query($sql);
+ $rows = $this->db->sql_fetchrowset($result);
+ $this->db->sql_freeresult($result);
+
+ return $rows;
+ }
+
+ public function test_reparse_empty()
+ {
+ $this->get_reparser()->reparse_range(1, 1);
+
+ $this->assertEquals(
+ array(
+ array(
+ 'id' => 1,
+ 'text' => '<t></t>'
+ )
+ ),
+ $this->get_rows(array(1))
+ );
+ }
+}
diff --git a/tests/text_reparser/fixtures/base.xml b/tests/text_reparser/fixtures/base.xml
new file mode 100644
index 0000000000..a4921a8823
--- /dev/null
+++ b/tests/text_reparser/fixtures/base.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_posts">
+ <column>post_id</column>
+ <column>enable_bbcode</column>
+ <column>enable_smilies</column>
+ <column>enable_magic_url</column>
+ <column>post_text</column>
+ <column>bbcode_uid</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ <value>abcd1234</value>
+ </row>
+ </table>
+</dataset>
diff --git a/travis/setup-phpbb.sh b/travis/setup-phpbb.sh
index 0beaa9ec8c..f9fd9522ca 100755
--- a/travis/setup-phpbb.sh
+++ b/travis/setup-phpbb.sh
@@ -37,5 +37,5 @@ then
fi
cd phpBB
-php ../composer.phar install --dev --no-interaction --prefer-source
+php ../composer.phar install --dev --no-interaction
cd ..
diff --git a/travis/setup-webserver.sh b/travis/setup-webserver.sh
index 911ba12f3c..3369d740fe 100755
--- a/travis/setup-webserver.sh
+++ b/travis/setup-webserver.sh
@@ -57,20 +57,12 @@ else
fi
# nginx
-echo "
- server {
- listen 80;
- root $PHPBB_ROOT_PATH/;
- index index.php index.html;
-
- location ~ \.php {
- include fastcgi_params;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- fastcgi_param PATH_INFO \$fastcgi_path_info;
- fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
- fastcgi_pass unix:$APP_SOCK;
- }
- }
-" | sudo tee $NGINX_CONF > /dev/null
+cat $DIR/../phpBB/docs/nginx.sample.conf \
+| sed "s/root \/path\/to\/phpbb/root $(echo $PHPBB_ROOT_PATH | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/&/\\\&/g')/g" \
+| sed -e '1,/The actual board domain/d' \
+| sed -e '/If running php as fastcgi/,$d' \
+| sed -e "s/fastcgi_pass php;/fastcgi_pass unix:$(echo $APP_SOCK | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/&/\\\&/g');/g" \
+| sed -e 's/#listen 80/listen 80/' \
+| sudo tee $NGINX_CONF
sudo service nginx start