diff options
78 files changed, 1290 insertions, 297 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index a4fac799b2..b15bbf551d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -64,9 +64,9 @@ before_test: if ($env:db -eq "mssql") { cd c:\tools\php\ext $DLLVersion = "4.1.6.1" - appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/sqlsrv/$($:DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip + curl -o php_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip https://windows.php.net/downloads/pecl/releases/sqlsrv/$($:DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip 7z x -y php_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip > $null - appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip + curl -o php_pdo_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip https://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip 7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip > $null Remove-Item c:\tools\php\* -include .zip cd c:\tools\php diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 39eb83e454..cacfcf1118 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,9 +1,9 @@ Checklist: -- [ ] Correct branch: master for new features; 3.2.x, 3.1.x for fixes +- [ ] Correct branch: master for new features; 3.2.x for fixes - [ ] Tests pass -- [ ] Code follows coding guidelines: [master / 3.2.x](https://area51.phpbb.com/docs/master/coding-guidelines.html), [3.1.x](https://area51.phpbb.com/docs/31x/coding-guidelines.html) -- [ ] Commit follows commit message [format](https://wiki.phpbb.com/Git#Commit_Messages) +- [ ] Code follows coding guidelines: [master](https://area51.phpbb.com/docs/dev/master/development/coding_guidelines.html) and [3.2.x](https://area51.phpbb.com/docs/dev/3.2.x/development/coding_guidelines.html) +- [ ] Commit follows commit message [format](https://area51.phpbb.com/docs/dev/3.2.x/development/git.html) Tracker ticket (set the ticket ID to **your ticket ID**): diff --git a/build/build.xml b/build/build.xml index 1491b95b48..5e7c672195 100644 --- a/build/build.xml +++ b/build/build.xml @@ -2,7 +2,7 @@ <project name="phpBB" description="The phpBB forum software" default="all" basedir="../"> <!-- a few settings for the build --> - <property name="newversion" value="3.2.3-dev" /> + <property name="newversion" value="3.2.4-dev" /> <property name="prevversion" value="3.2.2" /> <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.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0-a1, 3.2.0-a2, 3.2.0-b1, 3.2.0-b2, 3.2.0-RC1, 3.2.0-RC2, 3.2.0, 3.2.1" /> <!-- no configuration should be needed beyond this point --> diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html index 7ab2608e13..8e2c7452a3 100644 --- a/phpBB/adm/style/acp_ext_list.html +++ b/phpBB/adm/style/acp_ext_list.html @@ -7,7 +7,7 @@ <p>{L_EXTENSIONS_EXPLAIN}</p> <fieldset class="quick"> - <span class="small"><a href="https://www.phpbb.com/go/customise/extensions/3.1" target="_blank">{L_BROWSE_EXTENSIONS_DATABASE}</a> • <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE_ALL}</a> • <a href="javascript:phpbb.toggleDisplay('version_check_settings');">{L_SETTINGS}</a></span> + <span class="small"><a href="https://www.phpbb.com/go/customise/extensions/3.2" target="_blank">{L_BROWSE_EXTENSIONS_DATABASE}</a> • <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE_ALL}</a> • <a href="javascript:phpbb.toggleDisplay('version_check_settings');">{L_SETTINGS}</a></span> </fieldset> <form id="version_check_settings" method="post" action="{U_ACTION}" style="display:none"> diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index 26d7030531..d0096370d9 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -316,7 +316,7 @@ <tbody> <!-- ELSE --> <tr> - <td><strong>{groups.GROUP_NAME}</strong></td> + <td><strong<!-- IF groups.GROUP_COLOR --> style="color: #{groups.GROUP_COLOR}"<!-- ENDIF -->>{groups.GROUP_NAME}</strong></td> <td style="text-align: center;">{groups.TOTAL_MEMBERS}</td> <td style="text-align: center;">{groups.PENDING_MEMBERS}</td> <td style="text-align: center;"><a href="{groups.U_EDIT}">{L_SETTINGS}</a></td> diff --git a/phpBB/adm/style/acp_language.html b/phpBB/adm/style/acp_language.html index f708eb1508..79fef94207 100644 --- a/phpBB/adm/style/acp_language.html +++ b/phpBB/adm/style/acp_language.html @@ -69,7 +69,7 @@ <p>{L_ACP_LANGUAGE_PACKS_EXPLAIN}</p> <fieldset class="quick"> - <span class="small"><a href="https://www.phpbb.com/go/customise/language-packs/3.1" target="_blank">{L_BROWSE_LANGUAGE_PACKS_DATABASE}</a></span> + <span class="small"><a href="https://www.phpbb.com/go/customise/language-packs/3.2" target="_blank">{L_BROWSE_LANGUAGE_PACKS_DATABASE}</a></span> </fieldset> <table class="table1 zebra-table"> diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index 9522baa9c2..12477a4b77 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -153,8 +153,14 @@ <td><strong>{PHP_VERSION_INFO}</strong></td> <!-- IF S_TOTAL_ORPHAN --> <td>{L_NUMBER_ORPHAN}{L_COLON} </td> - <td><strong>{TOTAL_ORPHAN}</strong></td> - <!-- ELSE --> + <td> + <!-- IF TOTAL_ORPHAN > 0 --> + <a href="{U_ATTACH_ORPHAN}" title="{L_MORE_INFORMATION}"><strong>{TOTAL_ORPHAN}</strong></a> + <!-- ELSE --> + <strong>{TOTAL_ORPHAN}</strong> + <!-- ENDIF --> + </td> + <!-- ELSE --> <td> </td> <td> </td> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index 43c2f96a65..38bec5a1e4 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -33,7 +33,7 @@ <!-- IF L_EXPLAIN --><p>{L_EXPLAIN}</p><!-- ENDIF --> <fieldset class="quick"> - <span class="small"><a href="https://www.phpbb.com/go/customise/styles/3.1" target="_blank">{L_BROWSE_STYLES_DATABASE}</a></span> + <span class="small"><a href="https://www.phpbb.com/go/customise/styles/3.2" target="_blank">{L_BROWSE_STYLES_DATABASE}</a></span> </fieldset> <form id="acp_styles" method="post" action="{U_ACTION}"> @@ -96,6 +96,7 @@ <thead> <tr> <th>{L_STYLE_NAME}</th> + <th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_PHPBB_VERSION}</th> <!-- IF not STYLES_LIST_HIDE_COUNT --><th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_USED_BY}</th><!-- ENDIF --> <th width="25%" style="white-space: nowrap; text-align: center;">{L_ACTIONS}</th> {STYLES_LIST_EXTRA} @@ -129,6 +130,7 @@ <span class="style-path"><br />{L_STYLE_PATH}{L_COLON} {styles_list.STYLE_PATH_FULL}</span> <!-- ENDIF --> </td> + <td class="{$ROW_CLASS} users">{styles_list.STYLE_PHPBB_VERSION}</td> <!-- IF not STYLES_LIST_HIDE_COUNT --> <td class="{$ROW_CLASS} users">{styles_list.USERS}</td> <!-- ENDIF --> diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index eafe11ee89..7cf6c22236 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -840,6 +840,7 @@ table.zebra-table tbody tr:nth-child(odd) { } .row2 { + word-break: break-all; background-color: #DCEBFE; } @@ -2459,6 +2460,9 @@ fieldset.permissions .padding { text-align: left; } +.rtl .dropdown li { + text-align: right; +} .wrap .dropdown li, .dropdown.wrap li { white-space: normal; } @@ -2473,6 +2477,10 @@ fieldset.permissions .padding { width: 250px; } +.rtl .roles-options > .dropdown { + right: auto; +} + .roles-options { -webkit-user-select: none; -moz-user-select: none; @@ -2491,6 +2499,10 @@ fieldset.permissions .padding { background: url('../images/arrow_down.gif') no-repeat 245px .7em; } +.rtl .roles-options > span { + background: url('../images/arrow_down.gif') no-repeat 7px .7em; +} + .roles-options li { list-style: none; } diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html index 8b3121bfa0..c556664b8c 100644 --- a/phpBB/adm/style/permission_mask.html +++ b/phpBB/adm/style/permission_mask.html @@ -41,7 +41,7 @@ <dt style="width: 20%"><label for="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">{L_ROLE}{L_COLON}</label></dt> {% if p_mask.f_mask.role_options %} <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 20%"> - <div class="dropdown-container dropdown-right dropdown-button-control roles-options" data-alt-text="{LA_ROLE_DESCRIPTION}"> + <div class="dropdown-container dropdown-{S_CONTENT_FLOW_END} dropdown-button-control roles-options" data-alt-text="{LA_ROLE_DESCRIPTION}"> <select id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" name="role[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]">{p_mask.f_mask.S_ROLE_OPTIONS}</select> <span title="Roles" class="button icon-button tools-icon dropdown-trigger dropdown-select">{L_NO_ROLE_ASSIGNED}</span> <div class="dropdown hidden"> diff --git a/phpBB/adm/style/tooltip.js b/phpBB/adm/style/tooltip.js index 8781e2b509..7b7abb11e6 100644 --- a/phpBB/adm/style/tooltip.js +++ b/phpBB/adm/style/tooltip.js @@ -130,10 +130,17 @@ phpbb.positionTooltip = function ($element) { $element = $element.parent(); offset = $element.offset(); - $('#_tooltip_container').css({ - top: offset.top + 30, - left: offset.left - 205 - }); + if ($('body').hasClass('rtl')) { + $('#_tooltip_container').css({ + top: offset.top + 30, + left: offset.left + 255 + }); + } else { + $('#_tooltip_container').css({ + top: offset.top + 30, + left: offset.left - 205 + }); + } }; /** diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 069f9089c2..752dfa4ab2 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -1331,6 +1331,7 @@ phpbb.toggleDropdown = function() { $this.css({ marginLeft: 0, left: 0, + marginRight: 0, maxWidth: (windowWidth - 4) + 'px' }); @@ -1654,7 +1655,7 @@ $(function() { phpbb.registerPageDropdowns(); - $('#color_palette_placeholder').each(function() { + $('[data-orientation]').each(function() { phpbb.registerPalette($(this)); }); diff --git a/phpBB/composer.json b/phpBB/composer.json index 926fad5188..4f796a9dcb 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -4,7 +4,7 @@ "type": "project", "keywords": ["phpbb", "forum"], "homepage": "https://www.phpbb.com", - "license": "GPL-2.0", + "license": "GPL-2.0-only", "authors": [ { "name": "phpBB Limited", diff --git a/phpBB/composer.lock b/phpBB/composer.lock index f6602ad082..5b948eddc1 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "f14915a2ccaf76ccd6d3ea725721a8a8", + "hash": "620519ab8cf439078c08f8a4fb49efb8", "content-hash": "c843abc1344cd9df37f63c08a125cad0", "packages": [ { @@ -84,21 +84,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "5.3.1", + "version": "5.3.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "70f1fa53b71c4647bf2762c09068a95f77e12fb8" + "reference": "f9acb4761844317e626a32259205bec1f1bc60d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/70f1fa53b71c4647bf2762c09068a95f77e12fb8", - "reference": "70f1fa53b71c4647bf2762c09068a95f77e12fb8", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f9acb4761844317e626a32259205bec1f1bc60d2", + "reference": "f9acb4761844317e626a32259205bec1f1bc60d2", "shasum": "" }, "require": { "guzzlehttp/ringphp": "^1.1", - "php": ">=5.4.0" + "php": ">=5.4.0", + "react/promise": "^2.2" }, "require-dev": { "ext-curl": "*", @@ -132,7 +133,7 @@ "rest", "web service" ], - "time": "2016-07-15 19:28:39" + "time": "2018-01-15 07:18:01" }, { "name": "guzzlehttp/ringphp", @@ -726,16 +727,16 @@ }, { "name": "symfony/config", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "f4f3f1d7090c464434bbbc3e8aa2b41149c59196" + "reference": "17605ff58313d9fe94e507620a399721fc347b6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/f4f3f1d7090c464434bbbc3e8aa2b41149c59196", - "reference": "f4f3f1d7090c464434bbbc3e8aa2b41149c59196", + "url": "https://api.github.com/repos/symfony/config/zipball/17605ff58313d9fe94e507620a399721fc347b6d", + "reference": "17605ff58313d9fe94e507620a399721fc347b6d", "shasum": "" }, "require": { @@ -778,20 +779,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2017-11-07 11:56:23" + "time": "2018-01-21 19:03:25" }, { "name": "symfony/console", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "46270f1ca44f08ebc134ce120fd2c2baf5fd63de" + "reference": "162ca7d0ea597599967aa63b23418e747da0896b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/46270f1ca44f08ebc134ce120fd2c2baf5fd63de", - "reference": "46270f1ca44f08ebc134ce120fd2c2baf5fd63de", + "url": "https://api.github.com/repos/symfony/console/zipball/162ca7d0ea597599967aa63b23418e747da0896b", + "reference": "162ca7d0ea597599967aa63b23418e747da0896b", "shasum": "" }, "require": { @@ -839,20 +840,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-11-29 09:33:18" + "time": "2018-01-29 08:54:45" }, { "name": "symfony/debug", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "e72a0340dc2e273b3c4398d8eef9157ba51d8b95" + "reference": "35e36287fc0fdc8a08f70efcd4865ae6d8a6ee55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/e72a0340dc2e273b3c4398d8eef9157ba51d8b95", - "reference": "e72a0340dc2e273b3c4398d8eef9157ba51d8b95", + "url": "https://api.github.com/repos/symfony/debug/zipball/35e36287fc0fdc8a08f70efcd4865ae6d8a6ee55", + "reference": "35e36287fc0fdc8a08f70efcd4865ae6d8a6ee55", "shasum": "" }, "require": { @@ -896,20 +897,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-11-19 19:05:05" + "time": "2018-01-18 22:12:33" }, { "name": "symfony/dependency-injection", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "d3e81e5402c38500770eb5595d78a6d85ea9e412" + "reference": "91ad61e6f140b050eba4aa39bc52eece713f2a71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/d3e81e5402c38500770eb5595d78a6d85ea9e412", - "reference": "d3e81e5402c38500770eb5595d78a6d85ea9e412", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/91ad61e6f140b050eba4aa39bc52eece713f2a71", + "reference": "91ad61e6f140b050eba4aa39bc52eece713f2a71", "shasum": "" }, "require": { @@ -959,20 +960,20 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2017-11-23 11:13:33" + "time": "2018-01-29 08:55:23" }, { "name": "symfony/event-dispatcher", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b59aacf238fadda50d612c9de73b74751872a903" + "reference": "d64be24fc1eba62f9daace8a8918f797fc8e87cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b59aacf238fadda50d612c9de73b74751872a903", - "reference": "b59aacf238fadda50d612c9de73b74751872a903", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d64be24fc1eba62f9daace8a8918f797fc8e87cc", + "reference": "d64be24fc1eba62f9daace8a8918f797fc8e87cc", "shasum": "" }, "require": { @@ -1019,20 +1020,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-11-05 15:25:56" + "time": "2018-01-03 07:36:31" }, { "name": "symfony/filesystem", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "15ceb6736a9eebd0d99f9e05a62296ab6ce1cf2b" + "reference": "1f4e8351e0196562f5e8ec584baeceeb8e2e92f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/15ceb6736a9eebd0d99f9e05a62296ab6ce1cf2b", - "reference": "15ceb6736a9eebd0d99f9e05a62296ab6ce1cf2b", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/1f4e8351e0196562f5e8ec584baeceeb8e2e92f6", + "reference": "1f4e8351e0196562f5e8ec584baeceeb8e2e92f6", "shasum": "" }, "require": { @@ -1068,20 +1069,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2017-11-19 18:39:05" + "time": "2018-01-03 07:36:31" }, { "name": "symfony/finder", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "efeceae6a05a9b2fcb3391333f1d4a828ff44ab8" + "reference": "9786ccb6a1f94a89ae18fc6a1b68de1f070823ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/efeceae6a05a9b2fcb3391333f1d4a828ff44ab8", - "reference": "efeceae6a05a9b2fcb3391333f1d4a828ff44ab8", + "url": "https://api.github.com/repos/symfony/finder/zipball/9786ccb6a1f94a89ae18fc6a1b68de1f070823ed", + "reference": "9786ccb6a1f94a89ae18fc6a1b68de1f070823ed", "shasum": "" }, "require": { @@ -1117,20 +1118,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-11-05 15:25:56" + "time": "2018-01-29 08:54:45" }, { "name": "symfony/http-foundation", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "8eb1d3609a13ec6fdde68b1a5b908d6cefdbef54" + "reference": "686464910bbe58a2b38eb1f898aa45dc6c4de0cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8eb1d3609a13ec6fdde68b1a5b908d6cefdbef54", - "reference": "8eb1d3609a13ec6fdde68b1a5b908d6cefdbef54", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/686464910bbe58a2b38eb1f898aa45dc6c4de0cb", + "reference": "686464910bbe58a2b38eb1f898aa45dc6c4de0cb", "shasum": "" }, "require": { @@ -1172,20 +1173,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-11-29 09:33:18" + "time": "2018-01-29 08:54:45" }, { "name": "symfony/http-kernel", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "aedc53f4473ec9b66e901ac8611c33560357afcd" + "reference": "af74cd947d63ae1294aed71b9456f2a04f7f6d45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aedc53f4473ec9b66e901ac8611c33560357afcd", - "reference": "aedc53f4473ec9b66e901ac8611c33560357afcd", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/af74cd947d63ae1294aed71b9456f2a04f7f6d45", + "reference": "af74cd947d63ae1294aed71b9456f2a04f7f6d45", "shasum": "" }, "require": { @@ -1255,20 +1256,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-12-04 22:02:14" + "time": "2018-01-29 10:48:12" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.6.0", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", - "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", "shasum": "" }, "require": { @@ -1280,7 +1281,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -1314,20 +1315,20 @@ "portable", "shim" ], - "time": "2017-10-11 12:05:26" + "time": "2018-01-30 19:27:44" }, { "name": "symfony/polyfill-php54", - "version": "v1.6.0", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php54.git", - "reference": "d7810a14b2c6c1aff415e1bb755f611b3d5327bc" + "reference": "84e2b616c197ef400c6d0556a0606cee7c9e21d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/d7810a14b2c6c1aff415e1bb755f611b3d5327bc", - "reference": "d7810a14b2c6c1aff415e1bb755f611b3d5327bc", + "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/84e2b616c197ef400c6d0556a0606cee7c9e21d5", + "reference": "84e2b616c197ef400c6d0556a0606cee7c9e21d5", "shasum": "" }, "require": { @@ -1336,7 +1337,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -1372,20 +1373,20 @@ "portable", "shim" ], - "time": "2017-10-11 12:05:26" + "time": "2018-01-30 19:27:44" }, { "name": "symfony/polyfill-php55", - "version": "v1.6.0", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php55.git", - "reference": "b64e7f0c37ecf144ecc16668936eef94e628fbfd" + "reference": "168371cb3dfb10e0afde96e7c2688be02470d143" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/b64e7f0c37ecf144ecc16668936eef94e628fbfd", - "reference": "b64e7f0c37ecf144ecc16668936eef94e628fbfd", + "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/168371cb3dfb10e0afde96e7c2688be02470d143", + "reference": "168371cb3dfb10e0afde96e7c2688be02470d143", "shasum": "" }, "require": { @@ -1395,7 +1396,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -1428,20 +1429,20 @@ "portable", "shim" ], - "time": "2017-10-11 12:05:26" + "time": "2018-01-30 19:27:44" }, { "name": "symfony/proxy-manager-bridge", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/proxy-manager-bridge.git", - "reference": "06d007e6329675e96b42ab84780655ac3ed778ae" + "reference": "d73283cfe025d73c70551c45d22c54bd43c2c53b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/proxy-manager-bridge/zipball/06d007e6329675e96b42ab84780655ac3ed778ae", - "reference": "06d007e6329675e96b42ab84780655ac3ed778ae", + "url": "https://api.github.com/repos/symfony/proxy-manager-bridge/zipball/d73283cfe025d73c70551c45d22c54bd43c2c53b", + "reference": "d73283cfe025d73c70551c45d22c54bd43c2c53b", "shasum": "" }, "require": { @@ -1482,20 +1483,20 @@ ], "description": "Symfony ProxyManager Bridge", "homepage": "https://symfony.com", - "time": "2017-11-10 18:59:36" + "time": "2018-01-03 07:36:31" }, { "name": "symfony/routing", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "fa8f982682a3b65d87858be7dbf84f7f03feb616" + "reference": "627ea100720dac15d8165648caac57456dda84aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/fa8f982682a3b65d87858be7dbf84f7f03feb616", - "reference": "fa8f982682a3b65d87858be7dbf84f7f03feb616", + "url": "https://api.github.com/repos/symfony/routing/zipball/627ea100720dac15d8165648caac57456dda84aa", + "reference": "627ea100720dac15d8165648caac57456dda84aa", "shasum": "" }, "require": { @@ -1557,20 +1558,20 @@ "uri", "url" ], - "time": "2017-11-19 19:05:05" + "time": "2018-01-16 18:00:04" }, { "name": "symfony/twig-bridge", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/twig-bridge.git", - "reference": "611c7994abf119adec844fdbc28721c3e3629d4e" + "reference": "efdc8b39b5a05def32824e578ccf3fcdec8190cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/611c7994abf119adec844fdbc28721c3e3629d4e", - "reference": "611c7994abf119adec844fdbc28721c3e3629d4e", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/efdc8b39b5a05def32824e578ccf3fcdec8190cc", + "reference": "efdc8b39b5a05def32824e578ccf3fcdec8190cc", "shasum": "" }, "require": { @@ -1642,20 +1643,20 @@ ], "description": "Symfony Twig Bridge", "homepage": "https://symfony.com", - "time": "2017-12-04 19:58:03" + "time": "2018-01-03 17:12:09" }, { "name": "symfony/yaml", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "968ef42161e4bc04200119da473077f9e7015128" + "reference": "be720fcfae4614df204190d57795351059946a77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/968ef42161e4bc04200119da473077f9e7015128", - "reference": "968ef42161e4bc04200119da473077f9e7015128", + "url": "https://api.github.com/repos/symfony/yaml/zipball/be720fcfae4614df204190d57795351059946a77", + "reference": "be720fcfae4614df204190d57795351059946a77", "shasum": "" }, "require": { @@ -1691,7 +1692,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-11-29 09:33:18" + "time": "2018-01-03 07:36:31" }, { "name": "twig/twig", @@ -2106,30 +2107,25 @@ }, { "name": "michelf/php-markdown", - "version": "1.7.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/michelf/php-markdown.git", - "reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220" + "reference": "01ab082b355bf188d907b9929cd99b2923053495" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/1f51cc520948f66cd2af8cbc45a5ee175e774220", - "reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220", + "url": "https://api.github.com/repos/michelf/php-markdown/zipball/01ab082b355bf188d907b9929cd99b2923053495", + "reference": "01ab082b355bf188d907b9929cd99b2923053495", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-lib": "1.4.x-dev" - } - }, "autoload": { - "psr-0": { - "Michelf": "" + "psr-4": { + "Michelf\\": "Michelf/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2153,7 +2149,7 @@ "keywords": [ "markdown" ], - "time": "2016-10-29 18:58:20" + "time": "2018-01-15 00:49:33" }, { "name": "nikic/php-parser", @@ -2303,16 +2299,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.3", + "version": "1.7.5", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf" + "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf", - "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", "shasum": "" }, "require": { @@ -2324,7 +2320,7 @@ }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" }, "type": "library", "extra": { @@ -2362,7 +2358,7 @@ "spy", "stub" ], - "time": "2017-11-24 13:59:53" + "time": "2018-02-19 10:16:54" }, { "name": "phpunit/dbunit", @@ -2834,7 +2830,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" } ], "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", @@ -3354,16 +3352,16 @@ }, { "name": "symfony/browser-kit", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "f4801cce803ba76f8545190e455958f45935cd5d" + "reference": "e49a78bcf09ba2e6d03e63e80211f889c037add5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/f4801cce803ba76f8545190e455958f45935cd5d", - "reference": "f4801cce803ba76f8545190e455958f45935cd5d", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/e49a78bcf09ba2e6d03e63e80211f889c037add5", + "reference": "e49a78bcf09ba2e6d03e63e80211f889c037add5", "shasum": "" }, "require": { @@ -3407,20 +3405,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2017-11-07 14:08:47" + "time": "2018-01-03 07:36:31" }, { "name": "symfony/css-selector", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "b7b041487197fb6d803b7edbcaae7f00a793b1c4" + "reference": "c5b39674eacd34adedbef78227c57109caa9e318" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/b7b041487197fb6d803b7edbcaae7f00a793b1c4", - "reference": "b7b041487197fb6d803b7edbcaae7f00a793b1c4", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/c5b39674eacd34adedbef78227c57109caa9e318", + "reference": "c5b39674eacd34adedbef78227c57109caa9e318", "shasum": "" }, "require": { @@ -3460,20 +3458,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2017-11-05 15:25:56" + "time": "2018-01-03 07:36:31" }, { "name": "symfony/dom-crawler", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "eeb78092b5cc95b9e37017887da0e39f1530b8a8" + "reference": "31ff8f1d7a3de4b43b35ff821e6e223d81a8988b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/eeb78092b5cc95b9e37017887da0e39f1530b8a8", - "reference": "eeb78092b5cc95b9e37017887da0e39f1530b8a8", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/31ff8f1d7a3de4b43b35ff821e6e223d81a8988b", + "reference": "31ff8f1d7a3de4b43b35ff821e6e223d81a8988b", "shasum": "" }, "require": { @@ -3516,20 +3514,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2017-11-05 15:25:56" + "time": "2018-01-03 07:36:31" }, { "name": "symfony/process", - "version": "v2.8.32", + "version": "v2.8.34", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d25449e031f600807949aab7cadbf267712f4eee" + "reference": "905efe90024caa75a2fc93f54e14b26f2a099d96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d25449e031f600807949aab7cadbf267712f4eee", - "reference": "d25449e031f600807949aab7cadbf267712f4eee", + "url": "https://api.github.com/repos/symfony/process/zipball/905efe90024caa75a2fc93f54e14b26f2a099d96", + "reference": "905efe90024caa75a2fc93f54e14b26f2a099d96", "shasum": "" }, "require": { @@ -3565,7 +3563,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-11-05 15:25:56" + "time": "2018-01-29 08:54:45" } ], "aliases": [], diff --git a/phpBB/config/default/container/services_text_formatter.yml b/phpBB/config/default/container/services_text_formatter.yml index 74624ea4e4..07087cd4a9 100644 --- a/phpBB/config/default/container/services_text_formatter.yml +++ b/phpBB/config/default/container/services_text_formatter.yml @@ -39,6 +39,7 @@ services: - '@dispatcher' - '@config' - '@text_formatter.s9e.link_helper' + - '@log' - '%text_formatter.cache.dir%' - '%text_formatter.cache.parser.key%' - '%text_formatter.cache.renderer.key%' diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 13272e154c..eee4f3efcc 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -50,6 +50,7 @@ <ol> <li><a href="#changelog">Changelog</a> <ul> + <li><a href="#v322">Changes since 3.2.2</a></li> <li><a href="#v321">Changes since 3.2.1</a></li> <li><a href="#v320">Changes since 3.2.0</a></li> <li><a href="#v320rc1">Changes since 3.2.0-RC1</a></li> @@ -128,6 +129,62 @@ <div class="inner"> <div class="content"> + <a name="v322"></a><h3>Changes since 3.2.2</h3> + <h4>Bug</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14936">PHPBB3-14936</a>] - Missing language variable INST_ERR_DB</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15491">PHPBB3-15491</a>] - Outdated linkes in installer support page</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15492">PHPBB3-15492</a>] - Permissions role combobox does not work in RTL</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15500">PHPBB3-15500</a>] - Docs outdated for new PHP 5.4.7 requirement</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15502">PHPBB3-15502</a>] - Errors in migrations in 3.2.2 release</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15506">PHPBB3-15506</a>] - Previewing new post empties attachment list of all but first attachment</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15512">PHPBB3-15512</a>] - Avoid reparsing non-existent polls</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15513">PHPBB3-15513</a>] - Signature edit in acp gives error</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15520">PHPBB3-15520</a>] - DbDriver->sql_build_query cant cope with sub-selects</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15522">PHPBB3-15522</a>] - Allow multiple color palettes per page</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15523">PHPBB3-15523</a>] - AdBlocker may cause JS error when using CookieConsent</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15525">PHPBB3-15525</a>] - composer.json License is Invalid/Deprecated</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15526">PHPBB3-15526</a>] - Cast bbcode ID to integer</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15527">PHPBB3-15527</a>] - Cannot interpret the BBCode definition</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15532">PHPBB3-15532</a>] - Update pull request template</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15533">PHPBB3-15533</a>] - Typo in viewtopic_topic_tools.html</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15558">PHPBB3-15558</a>] - phpbb\report\report_handler_post.php</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15559">PHPBB3-15559</a>] - phpbb\report\report_handler_pm.php:56</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15595">PHPBB3-15595</a>] - Migration Module Exists Tool Broken</li> + </ul> + <h4>Improvement</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12579">PHPBB3-12579</a>] - Add BUTTON_ language strings for post & PM buttons</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15495">PHPBB3-15495</a>] - Use transactions for queries in move_forum</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15499">PHPBB3-15499</a>] - Drop HHVM support</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15510">PHPBB3-15510</a>] - Link Orphan attachments in ACP>General to Orphaned attachments page </li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15514">PHPBB3-15514</a>] - Improve accessibility by adding vital info from explanation to a title</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15518">PHPBB3-15518</a>] - Do not attempt to accurately determine whether posters can read private messages in viewtopic</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15528">PHPBB3-15528</a>] - Display the version of the installed styles in acp</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15529">PHPBB3-15529</a>] - Color groups in ACP</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15531">PHPBB3-15531</a>] - Log malformed BBCodes</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15534">PHPBB3-15534</a>] - Outdated ACP extensions database link for phpBB 3.2</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15535">PHPBB3-15535</a>] - Add S_FIRST_POST to postrow on viewtopic</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15537">PHPBB3-15537</a>] - Add events core.search_(native|mysql|postgres|sphinx)_index_before</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15547">PHPBB3-15547</a>] - Add file object to event core.avatar_driver_upload_move_file_before</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15561">PHPBB3-15561</a>] - Add core events for adding columns to MySQL and Postgres search backends</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15568">PHPBB3-15568</a>] - Update depencies to latest versions</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15569">PHPBB3-15569</a>] - Adjust update instructions to suggest file replacement method</li> + </ul> + <h4>New Feature</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15398">PHPBB3-15398</a>] - Add event to oauth login after ID check</li> + </ul> + <h4>Security Issue</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15570">PHPBB3-15570</a>] - Extension version check is restricted to TLS 1.0</li> + </ul> + <h4>Task</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15466">PHPBB3-15466</a>] - Move Nils in CREDITS.txt</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15516">PHPBB3-15516</a>] - Add instructions on running UI tests</li> + </ul> + <a name="v321"></a><h3>Changes since 3.2.1</h3> <h4>Security Issue</h4> <ul> diff --git a/phpBB/docs/CREDITS.txt b/phpBB/docs/CREDITS.txt index cb42779641..4c8974d7c9 100644 --- a/phpBB/docs/CREDITS.txt +++ b/phpBB/docs/CREDITS.txt @@ -20,8 +20,6 @@ phpBB Project Manager: Marshalrusty (Yuriy Rusko) -phpBB Product Manager: naderman (Nils Adermann) - phpBB Lead Developer: Marc (Marc Alexander) phpBB Developers: bantu (Andreas Fischer) @@ -43,7 +41,10 @@ https://github.com/phpbb/phpbb/graphs/contributors phpBB Project Manager: theFinn (James Atkinson) [Founder - 04/2007] SHS` (Jonathan Stanley) -phpBB Lead Developer: Acyd Burn (Meik Sievertsen) [09/2005 - 01/2010] +phpBB Product Manager: naderman (Nils Adermann) [02/2016 - 02/2017] + +phpBB Lead Developer: naderman (Nils Adermann) [01/2010 - 02/2016] + Acyd Burn (Meik Sievertsen) [09/2005 - 01/2010] psoTFX (Paul S. Owen) [2001 - 09/2005] phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010] diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index 956a384263..657e0c29fb 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -147,7 +147,7 @@ <li>Oracle</li> </ul> </li> - <li><strong>PHP 5.4.0+</strong> with support for the database you intend to use.</li> + <li><strong>PHP 5.4.7+</strong> with support for the database you intend to use.</li> <li>The following PHP modules are required: <ul> <li>json</li> @@ -269,11 +269,11 @@ <a name="update_full"></a><h3>4.i. Full package</h3> - <p>The full package is normally meant for new installations only, but if you want to replace all source files, this package comes in handy.</p> + <p>Updating using the full package is the recommended update method for boards without modifications to core phpBB files.</p> - <p>First, you should make a copy of your existing <code>config.php</code> file; keep it in a safe place! Next, delete all the existing phpBB files, you may want to leave your <code>files/</code>, <code>images/</code> and <code>ext/</code> directories in place, otherwise you will lose your file attachments, uploaded images and get error due to missing extension files. You can leave alternative styles in place too. With this complete, you can upload the new phpBB files (see <a href="#install">New installation</a> for details if necessary). Once complete, copy back your saved <code>config.php</code>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p> + <p>First, you should make a copy of your existing <code>config.php</code> file; keep it in a safe place! Next, delete all the existing phpBB files, you should leave your <code>files/</code>, <code>images/</code> and <code>ext/</code> directories in place, otherwise you will lose your file attachments, uploaded images and get errors due to missing extension files. You can leave alternative styles in place too. With this complete, you can upload the new phpBB files (see <a href="#install">New installation</a> for details if necessary). Once complete, copy back your saved <code>config.php</code>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p> - <p>You should now got to <code>/install/app.php/update</code> which will display a warning: <strong>No valid update directory was found, please make sure you uploaded the relevant files</strong>. Beneath that warning you will see a radion button <em>Update database only</em>, just click <strong>Submit</strong>. Depending on your previous version this will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker). If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p> + <p>You should now got to <code>/install/app.php/update</code> which will display a warning: <strong>No valid update directory was found, please make sure you uploaded the relevant files</strong>. Beneath that warning you will see a radio button <em>Update database only</em>, just click <strong>Submit</strong>. Depending on your previous version this will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker). If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p> <p>Once <code>/install/app.php/update</code> has completed, it displays the success message: <strong>The database update was successful</strong>. You may proceed to the Administration Control Panel and then remove the install directory as advised.</p> @@ -301,7 +301,7 @@ <a name="update_auto"></a><h3>4.iv. Automatic update package</h3> - <p>This update method is the recommended method for updating. This package detects changed files automatically and merges in changes if needed.</p> + <p>This update method is only recommended for installations with modifications to core phpBB files. This package detects changed files automatically and merges in changes if needed.</p> <p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.2.0</strong>, you need the <code>phpBB-3.2.0_to_3.2.1.zip/tar.bz2</code> file.</p> diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index 7fd80b3c2d..8fb9036ad8 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -323,11 +323,11 @@ <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 the latest stable version of PHP.</p> + <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.7 and the maximum supported version is the latest stable version of PHP.</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> - <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 5.4.x above 5.6.x to 7.0.x without problem.</p> + <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 5.4.7 above 5.6.x to 7.1.x and 7.2.x without problem.</p> <a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3> diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index c2a004c395..f89f5535eb 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -356,6 +356,7 @@ class acp_board 'load_user_activity_limit' => array('lang' => 'LOAD_USER_ACTIVITY_LIMIT', 'validate' => 'int:0:99999999', 'type' => 'number:0:99999999', 'explain' => true), 'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'allow_cdn' => array('lang' => 'ALLOW_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), + 'enable_accurate_pm_button' => array('lang' => 'YES_ACCURATE_PM_BUTTON', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'allow_live_searches' => array('lang' => 'ALLOW_LIVE_SEARCHES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'legend3' => 'CUSTOM_PROFILE_FIELDS', diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index 70ae9876f4..0e058213e0 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -926,7 +926,7 @@ class acp_groups ); // Get us all the groups - $sql = 'SELECT g.group_id, g.group_name, g.group_type + $sql = 'SELECT g.group_id, g.group_name, g.group_type, g.group_colour FROM ' . GROUPS_TABLE . ' g ORDER BY g.group_type ASC, g.group_name'; $result = $db->sql_query($sql); @@ -985,6 +985,7 @@ class acp_groups 'S_GROUP_SPECIAL' => ($row['group_type'] == GROUP_SPECIAL) ? true : false, 'GROUP_NAME' => $group_name, + 'GROUP_COLOR' => $row['group_colour'], 'TOTAL_MEMBERS' => $row['total_members'], 'PENDING_MEMBERS' => $row['pending_members'] )); diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php index 8c3fb66a70..f9bb35791c 100644 --- a/phpBB/includes/acp/acp_logs.php +++ b/phpBB/includes/acp/acp_logs.php @@ -151,7 +151,7 @@ class acp_logs { $data = array(); - $checks = array('viewtopic', 'viewlogs', 'viewforum'); + $checks = array('viewpost', 'viewtopic', 'viewlogs', 'viewforum'); foreach ($checks as $check) { if (isset($row[$check]) && $row[$check]) diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index 4efa8c70b3..8f169d15a7 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -585,6 +585,7 @@ class acp_main 'U_INACTIVE_USERS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=inactive&mode=list'), 'U_VERSIONCHECK' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=update&mode=version_check'), 'U_VERSIONCHECK_FORCE' => append_sid("{$phpbb_admin_path}index.$phpEx", 'versioncheck_force=1'), + 'U_ATTACH_ORPHAN' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=acp_attachments&mode=orphan'), 'S_VERSIONCHECK' => ($auth->acl_get('a_board')) ? true : false, 'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false, diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 4c390c5f0e..1bf5a3c6a8 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -952,6 +952,7 @@ class acp_styles // Style data 'STYLE_ID' => $style['style_id'], 'STYLE_NAME' => htmlspecialchars($style['style_name']), + 'STYLE_PHPBB_VERSION' => $this->read_style_cfg($style['style_path'])['phpbb_version'], 'STYLE_PATH' => htmlspecialchars($style['style_path']), 'STYLE_COPYRIGHT' => strip_tags($style['style_copyright']), 'STYLE_ACTIVE' => $style['style_active'], diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 7ef5cb9981..60afccdc22 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -2099,7 +2099,7 @@ class acp_users if ($request->is_set_post('preview')) { - $decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_bitfield); + $decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_flags); } /** @var \phpbb\controller\helper $controller_helper */ diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 7eeb36595d..29ca6959c8 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.3-dev'); +@define('PHPBB_VERSION', '3.2.4-dev'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4aae84705b..292036d5a8 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -66,23 +66,29 @@ function set_var(&$result, $var, $type, $multibyte = false) /** * Generates an alphanumeric random string of given length * +* @param int $num_chars Length of random string, defaults to 8. +* This number should be less or equal than 64. +* * @return string */ function gen_rand_string($num_chars = 8) { // [a, z] + [0, 9] = 36 - return substr(strtoupper(base_convert(unique_id(), 16, 36)), 0, $num_chars); + return substr(strtoupper(base_convert(bin2hex(random_bytes($num_chars + 1)), 16, 36)), 0, $num_chars); } /** * Generates a user-friendly alphanumeric random string of given length * We remove 0 and O so users cannot confuse those in passwords etc. * +* @param int $num_chars Length of random string, defaults to 8. +* This number should be less or equal than 64. +* * @return string */ function gen_rand_string_friendly($num_chars = 8) { - $rand_str = unique_id(); + $rand_str = bin2hex(random_bytes($num_chars + 1)); // Remove Z and Y from the base_convert(), replace 0 with Z and O with Y // [a, z] + [0, 9] - {z, y} = [a, z] + [0, 9] - {0, o} = 34 @@ -2463,7 +2469,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa $s_hidden_fields = build_hidden_fields($s_hidden_fields); - $template->assign_vars(array( + $login_box_template_data = array( 'LOGIN_ERROR' => $err, 'LOGIN_EXPLAIN' => $l_explain, @@ -2471,6 +2477,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'U_RESEND_ACTIVATION' => ($config['require_activation'] == USER_ACTIVATION_SELF && $config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '', 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'), 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'), + 'UA_PRIVACY' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy')), 'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false, 'S_HIDDEN_FIELDS' => $s_hidden_fields, @@ -2480,7 +2487,29 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'USERNAME_CREDENTIAL' => 'username', 'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password', - )); + ); + + /** + * Event to add/modify login box template data + * + * @event core.login_box_modify_template_data + * @var int admin Flag whether user is admin + * @var string username User name + * @var int autologin Flag whether autologin is enabled + * @var string redirect Redirect URL + * @var array login_box_template_data Array with the login box template data + * @since 3.2.3-RC2 + */ + $vars = array( + 'admin', + 'username', + 'autologin', + 'redirect', + 'login_box_template_data', + ); + extract($phpbb_dispatcher->trigger_event('core.login_box_modify_template_data', compact($vars))); + + $template->assign_vars($login_box_template_data); page_header($user->lang['LOGIN']); @@ -4404,6 +4433,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id = 'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'), 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'), 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'), + 'UA_PRIVACY' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy')), 'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '', 'U_FEED' => $controller_helper->route('phpbb_feed_index'), diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index b866e108c0..a85a3b67c5 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -24,8 +24,9 @@ if (!defined('IN_PHPBB')) */ class messenger { - var $msg, $extra_headers, $replyto, $from, $subject; + var $msg, $replyto, $from, $subject; var $addresses = array(); + var $extra_headers = array(); var $mail_priority = MAIL_NORMAL_PRIORITY; var $use_queue = true; diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 2e0a1cf9e6..4f1f9bb990 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -501,6 +501,29 @@ class mcp_queue AND t.topic_id = p.topic_id AND u.user_id = p.poster_id ORDER BY ' . $sort_order_sql; + + /** + * Alter sql query to get information on all posts in queue + * + * @event core.mcp_queue_get_posts_for_posts_query_before + * @var string sql String with the query to be executed + * @var array forum_list List of forums that contain the posts + * @var int visibility_const Integer with one of the possible ITEM_* constant values + * @var int topic_id topic_id in the page request + * @var string limit_time_sql String with the SQL code to limit the time interval of the post (Note: May be empty string) + * @var string sort_order_sql String with the ORDER BY SQL code used in this query + * @since 3.2.3-RC2 + */ + $vars = array( + 'sql', + 'forum_list', + 'visibility_const', + 'topic_id', + 'limit_time_sql', + 'sort_order_sql', + ); + extract($phpbb_dispatcher->trigger_event('core.mcp_queue_get_posts_for_posts_query_before', compact($vars))); + $result = $db->sql_query($sql); $post_data = $rowset = array(); @@ -588,7 +611,7 @@ class mcp_queue $row['post_username'] = $row['username'] ?: $user->lang['GUEST']; } - $template->assign_block_vars('postrow', array( + $post_row = array( 'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']), 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']), 'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''), @@ -606,7 +629,25 @@ class mcp_queue 'TOPIC_TITLE' => $row['topic_title'], 'POST_TIME' => $user->format_date($row['post_time']), 'S_HAS_ATTACHMENTS' => $auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment'], - )); + ); + + /** + * Alter sql query to get information on all topics in the list of forums provided. + * + * @event core.mcp_queue_get_posts_modify_post_row + * @var array post_row Template variables for current post + * @var array row Post data + * @var array forum_names Forum names + * @since 3.2.3-RC2 + */ + $vars = array( + 'post_row', + 'row', + 'forum_names', + ); + extract($phpbb_dispatcher->trigger_event('core.mcp_queue_get_posts_modify_post_row', compact($vars))); + + $template->assign_block_vars('postrow', $post_row); } unset($rowset, $forum_names); diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index a453e5f7ff..7dfb73be7e 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.2', + 'phpbb_version' => '3.2.3', '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 17b8444aa5..611e4ec53b 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.2-RC1'); +define('PHPBB_VERSION', '3.2.3-RC1'); $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 1f92439c70..21f26b5f08 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -106,6 +106,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_enable', '1' INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_force_sender', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_max_chunk_size', '50'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size', '20'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_accurate_pm_button', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_mod_rewrite', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_board_notifications', '1'); @@ -279,7 +280,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.3-dev'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.4-dev'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 25d70813f6..76982be098 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -348,7 +348,7 @@ $lang = array_merge($lang, array( // Cookie Settings $lang = array_merge($lang, array( - 'ACP_COOKIE_SETTINGS_EXPLAIN' => 'These details define the data used to send cookies to your users browsers. In most cases the default values for the cookie settings should be sufficient. If you do need to change any do so with care, incorrect settings can prevent users logging in. If you have problems with users staying logging in to your board, visit the <b><a href="https://www.phpbb.com/support/go/cookie-settings/">phpBB.com Knowledge Base - Fixing incorrect cookie settings</a></b>.', + 'ACP_COOKIE_SETTINGS_EXPLAIN' => 'These details define the data used to send cookies to your users browsers. In most cases the default values for the cookie settings should be sufficient. If you do need to change any do so with care, incorrect settings can prevent users logging in. If you have problems with users staying logging in to your board, visit the <strong><a href="https://www.phpbb.com/support/go/cookie-settings">phpBB.com Knowledge Base - Fixing incorrect cookie settings</a></strong>.', 'COOKIE_DOMAIN' => 'Cookie domain', 'COOKIE_DOMAIN_EXPLAIN' => 'In most cases the cookie domain is optional. Leave it blank if you are unsure.<br><br> In the case where you have a board integrated with other software or have multiple domains, then to determine the cookie domain you need to do the following. If you have something like <i>example.com</i> and <i>forums.example.com</i>, or perhaps <i>forums.example.com</i> and <i>blog.example.com</i>. Remove the subdomains until you find the common domain, <i>example.com</i>. Now add a dot in front of the common domain and you would enter .example.com (note the dot at the beginning).', @@ -404,6 +404,8 @@ $lang = array_merge($lang, array( 'READ_NOTIFICATION_EXPIRE_DAYS_EXPLAIN' => 'Number of days that will elapse before a read notification will automatically be deleted. Set this value to 0 to make notifications permanent.', 'RECOMPILE_STYLES' => 'Recompile stale style components', 'RECOMPILE_STYLES_EXPLAIN' => 'Check for updated style components on filesystem and recompile.', + 'YES_ACCURATE_PM_BUTTON' => 'Enable permission specific PM button in topic pages', + 'YES_ACCURATE_PM_BUTTON_EXPLAIN' => 'If this setting is enabled, only post profiles of users who are permitted to read private messages will have a private message button.', 'YES_ANON_READ_MARKING' => 'Enable topic marking for guests', 'YES_ANON_READ_MARKING_EXPLAIN' => 'Stores read/unread status information for guests. If disabled, posts are always marked read for guests.', 'YES_BIRTHDAYS' => 'Enable birthday listing', @@ -585,7 +587,7 @@ $lang = array_merge($lang, array( 'SMTP_POP_BEFORE_SMTP' => 'POP-BEFORE-SMTP', 'SMTP_PORT' => 'SMTP server port', 'SMTP_PORT_EXPLAIN' => 'Only change this if you know your SMTP server is on a different port.', - 'SMTP_SERVER' => 'SMTP server address', + 'SMTP_SERVER' => 'SMTP server address and protocol', 'SMTP_SERVER_EXPLAIN' => 'Note that you have to provide the protocol that your server uses. If you are using SSL, this has to be "ssl://your.mailserver.com"', 'SMTP_SETTINGS' => 'SMTP settings', 'SMTP_USERNAME' => 'SMTP username', diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index de5039f047..0d5f6fee25 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -552,6 +552,7 @@ $lang = array_merge($lang, array( 'LOG_BBCODE_ADD' => '<strong>Added new BBCode</strong><br />» %s', 'LOG_BBCODE_EDIT' => '<strong>Edited BBCode</strong><br />» %s', 'LOG_BBCODE_DELETE' => '<strong>Deleted BBCode</strong><br />» %s', + 'LOG_BBCODE_CONFIGURATION_ERROR' => '<strong>Error while configuring BBCode</strong>: %1$s<br />» %2$s', 'LOG_BOT_ADDED' => '<strong>New bot added</strong><br />» %s', 'LOG_BOT_DELETE' => '<strong>Deleted bot</strong><br />» %s', diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php index 9d0bb5f8b9..c3a5ae9e44 100644 --- a/phpBB/language/en/acp/groups.php +++ b/phpBB/language/en/acp/groups.php @@ -92,7 +92,7 @@ $lang = array_merge($lang, array( 'GROUP_OPEN' => 'Open', 'GROUP_PENDING' => 'Pending members', 'GROUP_MAX_RECIPIENTS' => 'Maximum number of allowed recipients per private message', - 'GROUP_MAX_RECIPIENTS_EXPLAIN' => 'The maximum number of allowed recipients in a private message. The maximum for all groups of the user is used to determine the actual value.<br />Set this value to 0 to overwrite the setting for all users of this group with the board-wide setting.', + 'GROUP_MAX_RECIPIENTS_EXPLAIN' => 'The maximum number of allowed recipients in a private message. The maximum for all groups of the user is used to determine the actual value.<br />Set this value to 0 to overwrite the setting for all users of this group with the board-wide setting.', 'GROUP_OPTIONS_SAVE' => 'Group wide options', 'GROUP_PROMOTE' => 'Promote to group leader', 'GROUP_RANK' => 'Group rank', diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index 9293d67ecc..ab85d9d2f5 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -80,6 +80,7 @@ $lang = array_merge($lang, array( 'STYLE_UNINSTALL' => 'Uninstall', 'STYLE_UNINSTALL_DEPENDENT' => 'Style "%s" cannot be uninstalled because it has one or more child styles.', 'STYLE_UNINSTALLED' => 'Style "%s" uninstalled successfully.', + 'STYLE_PHPBB_VERSION' => 'phpBB Version', 'STYLE_USED_BY' => 'Used by (including robots)', 'STYLE_VERSION' => 'Style version', diff --git a/phpBB/language/en/captcha_recaptcha.php b/phpBB/language/en/captcha_recaptcha.php index 0acf850043..dde2a4ba08 100644 --- a/phpBB/language/en/captcha_recaptcha.php +++ b/phpBB/language/en/captcha_recaptcha.php @@ -37,7 +37,7 @@ if (empty($lang) || !is_array($lang)) // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine $lang = array_merge($lang, array( - 'RECAPTCHA_LANG' => 'en', + 'RECAPTCHA_LANG' => 'en-GB', // Find the language/country code on https://developers.google.com/recaptcha/docs/language - If no code exists for your language you can use "en" or leave the string empty 'RECAPTCHA_NOT_AVAILABLE' => 'In order to use reCaptcha, you must create an account on <a href="http://www.google.com/recaptcha">www.google.com/recaptcha</a>.', 'CAPTCHA_RECAPTCHA' => 'reCaptcha', 'RECAPTCHA_INCORRECT' => 'The solution you provided was incorrect', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index d7a1ce8e71..213563aea0 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -138,8 +138,10 @@ $lang = array_merge($lang, array( 1 => 'Users browsing this forum: %2$s and %1$d guest', 2 => 'Users browsing this forum: %2$s and %1$d guests', ), + 'BUTTON_DELETE' => 'Delete', 'BUTTON_EDIT' => 'Edit', 'BUTTON_FORUM_LOCKED' => 'Locked', + 'BUTTON_INFORMATION' => 'Information', 'BUTTON_NEW_TOPIC' => 'New Topic', 'BUTTON_PM' => 'PM', 'BUTTON_PM_FORWARD' => 'Forward', @@ -148,7 +150,9 @@ $lang = array_merge($lang, array( 'BUTTON_PM_REPLY_ALL' => 'Reply All', 'BUTTON_POST_REPLY' => 'Post Reply', 'BUTTON_QUOTE' => 'Quote', + 'BUTTON_REPORT' => 'Report', 'BUTTON_TOPIC_LOCKED' => 'Locked', + 'BUTTON_WARN' => 'Warn', 'BYTES' => 'Bytes', 'BYTES_SHORT' => 'B', @@ -189,7 +193,7 @@ $lang = array_merge($lang, array( 'DAYS' => 'Days', 'DELETE' => 'Delete', 'DELETE_ALL' => 'Delete all', - 'DELETE_COOKIES' => 'Delete all board cookies', + 'DELETE_COOKIES' => 'Delete cookies', 'DELETE_MARKED' => 'Delete marked', 'DELETE_POST' => 'Delete post', 'DELIMITER' => 'Delimiter', @@ -604,6 +608,7 @@ $lang = array_merge($lang, array( 'PREVIOUS' => 'Previous', // Used in pagination 'PREVIOUS_STEP' => 'Previous', 'PRIVACY' => 'Privacy policy', + 'PRIVACY_LINK' => 'Privacy', 'PRIVATE_MESSAGE' => 'Private message', 'PRIVATE_MESSAGES' => 'Private messages', 'PRIVATE_MESSAGING' => 'Private messaging', @@ -728,6 +733,7 @@ $lang = array_merge($lang, array( 'SUBMIT' => 'Submit', 'TB' => 'TB', + 'TERMS_LINK' => 'Terms', 'TERMS_USE' => 'Terms of use', 'TEST_CONNECTION' => 'Test connection', 'THE_TEAM' => 'The team', diff --git a/phpBB/language/en/help/faq.php b/phpBB/language/en/help/faq.php index e59d950948..6b165da0f8 100644 --- a/phpBB/language/en/help/faq.php +++ b/phpBB/language/en/help/faq.php @@ -111,8 +111,8 @@ $lang = array_merge($lang, array( 'HELP_FAQ_LOGIN_CANNOT_REGISTER_QUESTION' => 'Why can’t I register?', 'HELP_FAQ_LOGIN_COPPA_ANSWER' => 'COPPA, or the Children’s Online Privacy Protection Act of 1998, is a law in the United States requiring websites which can potentially collect information from minors under the age of 13 to have written parental consent or some other method of legal guardian acknowledgment, allowing the collection of personally identifiable information from a minor under the age of 13. If you are unsure if this applies to you as someone trying to register or to the website you are trying to register on, contact legal counsel for assistance. Please note that phpBB Limited and the owners of this board cannot provide legal advice and is not a point of contact for legal concerns of any kind, except as outlined in question “Who do I contact about abusive and/or legal matters related to this board?”.', 'HELP_FAQ_LOGIN_COPPA_QUESTION' => 'What is COPPA?', - 'HELP_FAQ_LOGIN_DELETE_COOKIES_ANSWER' => '“Delete all board cookies” deletes the cookies created by phpBB which keep you authenticated and logged into the board. Cookies also provide functions such as read tracking if they have been enabled by a board administrator. If you are having login or logout problems, deleting board cookies may help.', - 'HELP_FAQ_LOGIN_DELETE_COOKIES_QUESTION' => 'What does the “Delete all board cookies” do?', + 'HELP_FAQ_LOGIN_DELETE_COOKIES_ANSWER' => '“Delete cookies” deletes the cookies created by phpBB which keep you authenticated and logged into the board. Cookies also provide functions such as read tracking if they have been enabled by a board administrator. If you are having login or logout problems, deleting board cookies may help.', + 'HELP_FAQ_LOGIN_DELETE_COOKIES_QUESTION' => 'What does the “Delete cookies” do?', 'HELP_FAQ_LOGIN_LOST_PASSWORD_ANSWER' => 'Don’t panic! While your password cannot be retrieved, it can easily be reset. Visit the login page and click <em>I forgot my password</em>. Follow the instructions and you should be able to log in again shortly.<br />However, if you are not able to reset your password, contact a board administrator.', 'HELP_FAQ_LOGIN_LOST_PASSWORD_QUESTION' => 'I’ve lost my password!', 'HELP_FAQ_LOGIN_REGISTER_ANSWER' => 'You may not have to, it is up to the administrator of the board as to whether you need to register in order to post messages. However; registration will give you access to additional features not available to guest users such as definable avatar images, private messaging, emailing of fellow users, usergroup subscription, etc. It only takes a few moments to register so it is recommended you do so.', diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index f7d9f58d43..9bceeccde7 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -49,7 +49,7 @@ $lang = array_merge($lang, array( // Support page 'SUPPORT_TITLE' => 'Support', - 'SUPPORT_BODY' => 'Full support will be provided for the current stable release of phpBB3, free of charge. This includes:</p><ul><li>installation</li><li>configuration</li><li>technical questions</li><li>problems relating to potential bugs in the software</li><li>updating from Release Candidate (RC) versions to the latest stable version</li><li>converting from phpBB 2.0.x to phpBB3</li><li>converting from other discussion board software to phpBB3 (please see the <a href="https://www.phpbb.com/community/viewforum.php?f=486">Convertors Forum</a>)</li></ul><p>We encourage users still running beta versions of phpBB3 to replace their installation with a fresh copy of the latest version.</p><h2>Extensions / Styles</h2><p>For issues relating to Extensions, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=451">Extensions Forum</a>.<br />For issues relating to styles, templates and themes, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=471">Styles Forum</a>.<br /><br />If your question relates to a specific package, please post directly in the topic dedicated to the package.</p><h2>Obtaining Support</h2><p><a href="https://www.phpbb.com/community/viewtopic.php?f=14&t=571070">The phpBB Welcome Package</a><br /><a href="https://www.phpbb.com/support/">Support Section</a><br /><a href="https://www.phpbb.com/support/docs/en/3.1/ug/quickstart/">Quick Start Guide</a><br /><br />To ensure you stay up to date with the latest news and releases, why not <a href="https://www.phpbb.com/support/">subscribe to our mailing list</a>?<br /><br />', + 'SUPPORT_BODY' => 'Full support will be provided for the current stable release of phpBB3, free of charge. This includes:</p><ul><li>installation</li><li>configuration</li><li>technical questions</li><li>problems relating to potential bugs in the software</li><li>updating from Release Candidate (RC) versions to the latest stable version</li><li>converting from phpBB 2.0.x to phpBB3</li><li>converting from other discussion board software to phpBB3 (please see the <a href="https://www.phpbb.com/community/viewforum.php?f=486">Convertors Forum</a>)</li></ul><p>We encourage users still running beta versions of phpBB3 to replace their installation with a fresh copy of the latest version.</p><h2>Extensions / Styles</h2><p>For issues relating to Extensions, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=451">Extensions Forum</a>.<br />For issues relating to styles, templates and themes, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=471">Styles Forum</a>.<br /><br />If your question relates to a specific package, please post directly in the topic dedicated to the package.</p><h2>Obtaining Support</h2><p><a href="https://www.phpbb.com/support/">Support Section</a><br /><a href="https://www.phpbb.com/support/docs/en/3.2/ug/quickstart/">Quick Start Guide</a><br /><br />To ensure you stay up to date with the latest news and releases, follow us on <a href="https://www.twitter.com/phpbb/">Twitter</a> and <a href="https://www.facebook.com/phpbb/">Facebook</a><br /><br />', // License 'LICENSE_TITLE' => 'General Public License', @@ -193,6 +193,7 @@ $lang = array_merge($lang, array( 'DB_OPTION_SQLITE3' => 'SQLite 3', // Errors + 'INST_ERR_DB' => 'Database installation error', 'INST_ERR_NO_DB' => 'Cannot load the PHP module for the selected database type.', 'INST_ERR_DB_INVALID_PREFIX' => 'The prefix you entered is invalid. It must start with a letter and must only contain letters, numbers and underscores.', 'INST_ERR_PREFIX_TOO_LONG' => 'The table prefix you have specified is too long. The maximum length is %d characters.', @@ -354,17 +355,40 @@ $lang = array_merge($lang, array( <br /> + <h1>How to update your installation with the Full Package</h1> + + <p>The recommended way of updating your installation is using the full package. If core phpBB files have been modified in your installation you may wish to use the automatic update package in order to not lose these changes. You are also able to update your installation using the other methods listed within the INSTALL.html document. The steps for updating phpBB3 using the full package are:</p> + + <ol style="margin-left: 20px; font-size: 1.1em;"> + <li><strong class="error">Backup all board files and the database.</strong></li> + <li>Go to the <a href="https://www.phpbb.com/downloads/" title="https://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the latest "Full Package" archive.</li> + <li>Unpack the archive.</li> + <li>Remove (delete) the <code class="inline">config.php</code> file, and the <code class="inline">/images</code>, <code class="inline">/store</code> and <code class="inline">/files</code> folders <em>from the package</em> (not your site).</li> + <li>Go to the ACP, Board settings, and make sure prosilver is set as the default style. If not, set it to prosilver.</li> + <li>Delete the <code class="inline">/vendor</code> and <code class="inline">/cache</code> folders from the board’s root folder on the host.</li> + <li>Via FTP or SSH upload the remaining files and folders (that is, the remaining CONTENTS of the phpBB3 folder) to the root folder of your board installation on the server, overwriting the existing files. (Note: take care not to delete any extensions in your <code class="inline">/ext</code> folder when uploading the new phpBB3 contents.)</li> + <li><strong><a href="%1$s" title="%1$s">Now start the update process by pointing your browser to the install folder</a>.</strong></li> + <li>Follow the steps to update the database and let that run to completion.</li> + <li>Via FTP or SSH delete the <code class="inline">/install</code> folder from the root of your board installation.<br><br></li> + </ol> + + <p>You now have a new up to date board containing all your users and posts. Follow up tasks:</p> + <ul style="margin-left: 20px; font-size: 1.1em;"> + <li>Update your language pack</li> + <li>Update your style<br><br></li> + </ul> + <h1>How to update your installation with the Automatic Update Package</h1> - <p>The recommended way of updating your installation listed here is only valid for the automatic update package. You are also able to update your installation using the methods listed within the INSTALL.html document. The steps for updating phpBB3 automatically are:</p> + <p>The automatic update package is only recommended in case core phpBB files have been modified in your installation. You are also able to update your installation using the methods listed within the INSTALL.html document. The steps for updating phpBB3 using the automatic update package are:</p> - <ul style="margin-left: 20px; font-size: 1.1em;"> - <li>Go to the <a href="https://www.phpbb.com/downloads/" title="https://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the "Automatic Update Package" archive.<br /><br /></li> - <li>Unpack the archive.<br /><br /></li> - <li>Upload the complete uncompressed "install" and "vendor" folders to your phpBB root directory (where your config.php file is).<br /><br /></li> - </ul> + <ol style="margin-left: 20px; font-size: 1.1em;"> + <li>Go to the <a href="https://www.phpbb.com/downloads/" title="https://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the "Automatic Update Package" archive.</li> + <li>Unpack the archive.</li> + <li>Upload the complete uncompressed "install" and "vendor" folders to your phpBB root directory (where your config.php file is).<br><br></li> + </ol> - <p>Once uploaded your board will be offline for normal users due to the install directory you uploaded now present.<br /><br /> + <p>Once uploaded your board will be offline for normal users due to the install directory you uploaded now being present.<br /><br /> <strong><a href="%1$s" title="%1$s">Now start the update process by pointing your browser to the install folder</a>.</strong><br /> <br /> You will then be guided through the update process. You will be notified once the update is complete. diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php index 5587e69d3c..8809a0c6b4 100644 --- a/phpBB/phpbb/auth/provider/oauth/oauth.php +++ b/phpBB/phpbb/auth/provider/oauth/oauth.php @@ -227,6 +227,22 @@ class oauth extends \phpbb\auth\provider\base $row = $this->db->sql_fetchrow($result); $this->db->sql_freeresult($result); + /** + * Event is triggered before check if provider is already associated with an account + * + * @event core.oauth_login_after_check_if_provider_id_has_match + * @var array row User row + * @var array data Provider data + * @var \OAuth\Common\Service\ServiceInterface service OAuth service + * @since 3.2.3-RC1 + */ + $vars = array( + 'row', + 'data', + 'service', + ); + extract($this->dispatcher->trigger_event('core.oauth_login_after_check_if_provider_id_has_match', compact($vars))); + if (!$row) { // The user does not yet exist, ask to link or create profile diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php index d765a27871..77b44754ac 100644 --- a/phpBB/phpbb/avatar/driver/upload.php +++ b/phpBB/phpbb/avatar/driver/upload.php @@ -203,15 +203,18 @@ class upload extends \phpbb\avatar\driver\driver * * @event core.avatar_driver_upload_move_file_before * @var array filedata Array containing uploaded file data + * @var \phpbb\files\filespec file Instance of filespec class * @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 + * @changed 3.2.3-RC1 Added file */ $vars = array( 'filedata', + 'file', 'destination', 'prefix', 'row', diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php index 5851469806..a36ce8c0d7 100644 --- a/phpBB/phpbb/db/driver/driver.php +++ b/phpBB/phpbb/db/driver/driver.php @@ -903,9 +903,10 @@ abstract class driver implements driver_interface // Subquery with {left hand} {operator} {compare kind} {SELECT Kind } {Sub Query} - $condition = $condition[self::LEFT_STMT] . ' ' . $condition[self::COMPARE_OP] . ' ' . $condition[self::SUBQUERY_OP] . ' ( '; - $condition .= $this->sql_build_query($condition[self::SUBQUERY_SELECT_TYPE], $condition[self::SUBQUERY_BUILD]); - $condition .= ' )'; + $result = $condition[self::LEFT_STMT] . ' ' . $condition[self::COMPARE_OP] . ' ' . $condition[self::SUBQUERY_OP] . ' ( '; + $result .= $this->sql_build_query($condition[self::SUBQUERY_SELECT_TYPE], $condition[self::SUBQUERY_BUILD]); + $result .= ' )'; + $condition = $result; break; diff --git a/phpBB/phpbb/db/migration/data/v32x/enable_accurate_pm_button.php b/phpBB/phpbb/db/migration/data/v32x/enable_accurate_pm_button.php new file mode 100644 index 0000000000..a7b99606f7 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v32x/enable_accurate_pm_button.php @@ -0,0 +1,36 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v32x; + +class enable_accurate_pm_button extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v32x\v322', + ); + } + + public function effectively_installed() + { + return isset($this->config['enable_accurate_pm_button']); + } + + public function update_data() + { + return array( + array('config.add', array('enable_accurate_pm_button', '1')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v32x/merge_duplicate_bbcodes.php b/phpBB/phpbb/db/migration/data/v32x/merge_duplicate_bbcodes.php index 08609b571b..71ee19e3dd 100644 --- a/phpBB/phpbb/db/migration/data/v32x/merge_duplicate_bbcodes.php +++ b/phpBB/phpbb/db/migration/data/v32x/merge_duplicate_bbcodes.php @@ -46,16 +46,25 @@ class merge_duplicate_bbcodes extends \phpbb\db\migration\container_aware_migrat protected function merge_bbcodes(array $without, array $with) { - $merged = $this->container->get('text_formatter.s9e.bbcode_merger')->merge_bbcodes( - [ - 'usage' => $without['bbcode_match'], - 'template' => $without['bbcode_tpl'] - ], - [ - 'usage' => $with['bbcode_match'], - 'template' => $with['bbcode_tpl'] - ] - ); + try + { + $merged = $this->container->get('text_formatter.s9e.bbcode_merger')->merge_bbcodes( + [ + 'usage' => $without['bbcode_match'], + 'template' => $without['bbcode_tpl'] + ], + [ + 'usage' => $with['bbcode_match'], + 'template' => $with['bbcode_tpl'] + ] + ); + } + catch (\Exception $e) + { + // Ignore the pair and move on. The BBCodes would have to be fixed manually + return; + } + $bbcode_data = [ 'bbcode_tag' => $without['bbcode_tag'], 'bbcode_helpline' => $without['bbcode_helpline'] . ' | ' . $with['bbcode_helpline'], @@ -65,11 +74,11 @@ class merge_duplicate_bbcodes extends \phpbb\db\migration\container_aware_migrat $sql = 'UPDATE ' . BBCODES_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $bbcode_data) . ' - WHERE bbcode_id = ' . $without['bbcode_id']; + WHERE bbcode_id = ' . (int) $without['bbcode_id']; $this->sql_query($sql); $sql = 'DELETE FROM ' . BBCODES_TABLE . ' - WHERE bbcode_id = ' . $with['bbcode_id']; + WHERE bbcode_id = ' . (int) $with['bbcode_id']; $this->sql_query($sql); } } diff --git a/phpBB/phpbb/db/migration/data/v32x/v323rc1.php b/phpBB/phpbb/db/migration/data/v32x/v323rc1.php new file mode 100644 index 0000000000..0ff20d5074 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v32x/v323rc1.php @@ -0,0 +1,36 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v32x; + +class v323rc1 extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return phpbb_version_compare($this->config['version'], '3.2.3-RC1', '>='); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v32x\enable_accurate_pm_button', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.2.3-RC1')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php index 7d2720c861..3893935723 100644 --- a/phpBB/phpbb/db/migration/tool/module.php +++ b/phpBB/phpbb/db/migration/tool/module.php @@ -86,7 +86,8 @@ class module implements \phpbb\db\migration\tool\tool_interface * check for to see if it exists * @param bool $lazy Checks lazily if the module exists. Returns true if it exists in at * least one given parent. - * @return bool true if module exists in *all* given parents, false if not + * @return bool true if module exists in *all* given parents, false if not in any given parent; + * true if ignoring parent check and module exists class wide, false if not found at all. */ public function exists($class, $parent, $module, $lazy = false) { @@ -110,6 +111,10 @@ class module implements \phpbb\db\migration\tool\tool_interface $parent_sqls[] = 'AND parent_id = ' . (int) $parent_id; } } + else + { + $parent_sqls[] = ''; + } foreach ($parent_sqls as $parent_sql) { @@ -126,7 +131,7 @@ class module implements \phpbb\db\migration\tool\tool_interface { return false; } - else if ($lazy && $module_id) + if ($lazy && $module_id) { return true; } @@ -514,12 +519,6 @@ class module implements \phpbb\db\migration\tool\tool_interface // Allow '' to be sent as 0 $parent_id = $parent_id ?: 0; - // If automatic adding is in action, convert array back to string to simplify things - if (is_array($data) && count($data) == 1) - { - $data = $data['module_langname']; - } - if (!is_numeric($parent_id)) { // Refresh the $module_categories array diff --git a/phpBB/phpbb/debug/error_handler.php b/phpBB/phpbb/debug/error_handler.php index 246e724f56..ebd828b97f 100644 --- a/phpBB/phpbb/debug/error_handler.php +++ b/phpBB/phpbb/debug/error_handler.php @@ -17,7 +17,7 @@ use Symfony\Component\Debug\ErrorHandler; class error_handler extends ErrorHandler { - public function handleError($type, $message, $file, $line, array $context, array $backtrace = null) + public function handleError($type, $message, $file, $line) { if ($type === E_USER_WARNING || $type === E_USER_NOTICE) { @@ -26,6 +26,6 @@ class error_handler extends ErrorHandler $handler($type, $message, $file, $line); } - return parent::handleError($type, $message, $file, $line, $context, $backtrace); + return parent::handleError($type, $message, $file, $line); } } diff --git a/phpBB/phpbb/file_downloader.php b/phpBB/phpbb/file_downloader.php index ab9505a14c..403ca5bc83 100644 --- a/phpBB/phpbb/file_downloader.php +++ b/phpBB/phpbb/file_downloader.php @@ -42,7 +42,7 @@ class file_downloader $this->error_number = 0; $this->error_string = ''; - if ($socket = @fsockopen(($port == 443 ? 'tls://' : '') . $host, $port, $this->error_number, $this->error_string, $timeout)) + if ($socket = @fsockopen(($port == 443 ? 'ssl://' : '') . $host, $port, $this->error_number, $this->error_string, $timeout)) { @fputs($socket, "GET $directory/$filename HTTP/1.0\r\n"); @fputs($socket, "HOST: $host\r\n"); diff --git a/phpBB/phpbb/filesystem/filesystem.php b/phpBB/phpbb/filesystem/filesystem.php index 3f39448f05..bfafdf5ddd 100644 --- a/phpBB/phpbb/filesystem/filesystem.php +++ b/phpBB/phpbb/filesystem/filesystem.php @@ -367,7 +367,7 @@ class filesystem implements filesystem_interface $common_php_group = @filegroup(__FILE__); // And the owner and the groups PHP is running under. - $php_uid = (function_exists('posic_getuid')) ? @posix_getuid() : false; + $php_uid = (function_exists('posix_getuid')) ? @posix_getuid() : false; $php_gids = (function_exists('posix_getgroups')) ? @posix_getgroups() : false; // If we are unable to get owner/group, then do not try to set them by guessing diff --git a/phpBB/phpbb/install/helper/database.php b/phpBB/phpbb/install/helper/database.php index ad0f3dd3cd..21af652f9d 100644 --- a/phpBB/phpbb/install/helper/database.php +++ b/phpBB/phpbb/install/helper/database.php @@ -338,7 +338,7 @@ class database // Check if SQLite database is writable if ($dbms_info['SCHEMA'] === 'sqlite' - && (!$this->filesystem->is_writable($dbhost) || !$this->filesystem->is_writable(pathinfo($dbhost, PATHINFO_DIRNAME)))) + && (($this->filesystem->exists($dbhost) && !$this->filesystem->is_writable($dbhost)) || !$this->filesystem->is_writable(pathinfo($dbhost, PATHINFO_DIRNAME)))) { $errors[] = array( 'title' =>'INST_ERR_DB_NO_WRITABLE', diff --git a/phpBB/phpbb/report/report_handler_pm.php b/phpBB/phpbb/report/report_handler_pm.php index 2f2a697efc..774ca329ad 100644 --- a/phpBB/phpbb/report/report_handler_pm.php +++ b/phpBB/phpbb/report/report_handler_pm.php @@ -53,8 +53,8 @@ class report_handler_pm extends report_handler 'user_notify' => $user_notify, 'report_text' => $report_text, 'reported_post_text' => $this->report_data['message_text'], - 'reported_post_uid' => $this->report_data['bbcode_bitfield'], - 'reported_post_bitfield' => $this->report_data['bbcode_uid'], + 'reported_post_uid' => $this->report_data['bbcode_uid'], + 'reported_post_bitfield' => $this->report_data['bbcode_bitfield'], 'reported_post_enable_bbcode' => $this->report_data['enable_bbcode'], 'reported_post_enable_smilies' => $this->report_data['enable_smilies'], 'reported_post_enable_magic_url' => $this->report_data['enable_magic_url'], diff --git a/phpBB/phpbb/report/report_handler_post.php b/phpBB/phpbb/report/report_handler_post.php index 5574a16dc0..52f09683ce 100644 --- a/phpBB/phpbb/report/report_handler_post.php +++ b/phpBB/phpbb/report/report_handler_post.php @@ -59,8 +59,8 @@ class report_handler_post extends report_handler 'user_notify' => $user_notify, 'report_text' => $report_text, 'reported_post_text' => $this->report_data['post_text'], - 'reported_post_uid' => $this->report_data['bbcode_bitfield'], - 'reported_post_bitfield' => $this->report_data['bbcode_uid'], + 'reported_post_uid' => $this->report_data['bbcode_uid'], + 'reported_post_bitfield' => $this->report_data['bbcode_bitfield'], 'reported_post_enable_bbcode' => $this->report_data['enable_bbcode'], 'reported_post_enable_smilies' => $this->report_data['enable_smilies'], 'reported_post_enable_magic_url' => $this->report_data['enable_magic_url'], diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php index 51c5fe8b76..137ed7433d 100644 --- a/phpBB/phpbb/search/fulltext_mysql.php +++ b/phpBB/phpbb/search/fulltext_mysql.php @@ -918,6 +918,34 @@ class fulltext_mysql extends \phpbb\search\base $words = array_unique(array_merge($split_text, $split_title)); + /** + * Event to modify method arguments and words before the MySQL search index is updated + * + * @event core.search_mysql_index_before + * @var string mode Contains the post mode: edit, post, reply, quote + * @var int post_id The id of the post which is modified/created + * @var string message New or updated post content + * @var string subject New or updated post subject + * @var int poster_id Post author's user id + * @var int forum_id The id of the forum in which the post is located + * @var array words List of words added to the index + * @var array split_text Array of words from the message + * @var array split_title Array of words from the title + * @since 3.2.3-RC1 + */ + $vars = array( + 'mode', + 'post_id', + 'message', + 'subject', + 'poster_id', + 'forum_id', + 'words', + 'split_text', + 'split_title', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_mysql_index_before', compact($vars))); + unset($split_text); unset($split_title); @@ -997,17 +1025,37 @@ class fulltext_mysql extends \phpbb\search\base $alter_list[] = $alter_entry; } - if (count($alter_list)) + $sql_queries = []; + + foreach ($alter_list as $alter) { - foreach ($alter_list as $alter) - { - $this->db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter)); - } + $sql_queries[] = 'ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter); } if (!isset($this->stats['post_text'])) { - $this->db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ADD FULLTEXT post_text (post_text)'); + $sql_queries[] = 'ALTER TABLE ' . POSTS_TABLE . ' ADD FULLTEXT post_text (post_text)'; + } + + $stats = $this->stats; + + /** + * Event to modify SQL queries before the MySQL search index is created + * + * @event core.search_mysql_create_index_before + * @var array sql_queries Array with queries for creating the search index + * @var array stats Array with statistics of the current index (read only) + * @since 3.2.3-RC1 + */ + $vars = array( + 'sql_queries', + 'stats', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_mysql_create_index_before', compact($vars))); + + foreach ($sql_queries as $sql_query) + { + $this->db->sql_query($sql_query); } $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE); @@ -1050,9 +1098,32 @@ class fulltext_mysql extends \phpbb\search\base $alter[] = 'DROP INDEX post_text'; } + $sql_queries = []; + if (count($alter)) { - $this->db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter)); + $sql_queries[] = 'ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter); + } + + $stats = $this->stats; + + /** + * Event to modify SQL queries before the MySQL search index is deleted + * + * @event core.search_mysql_delete_index_before + * @var array sql_queries Array with queries for deleting the search index + * @var array stats Array with statistics of the current index (read only) + * @since 3.2.3-RC1 + */ + $vars = array( + 'sql_queries', + 'stats', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_mysql_delete_index_before', compact($vars))); + + foreach ($sql_queries as $sql_query) + { + $this->db->sql_query($sql_query); } $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE); diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php index bd222488a0..4172e2cc4f 100644 --- a/phpBB/phpbb/search/fulltext_native.php +++ b/phpBB/phpbb/search/fulltext_native.php @@ -1433,6 +1433,38 @@ class fulltext_native extends \phpbb\search\base $words['del']['post'] = array(); $words['del']['title'] = array(); } + + /** + * Event to modify method arguments and words before the native search index is updated + * + * @event core.search_native_index_before + * @var string mode Contains the post mode: edit, post, reply, quote + * @var int post_id The id of the post which is modified/created + * @var string message New or updated post content + * @var string subject New or updated post subject + * @var int poster_id Post author's user id + * @var int forum_id The id of the forum in which the post is located + * @var array words Grouped lists of words added to or remove from the index + * @var array split_text Array of words from the message + * @var array split_title Array of words from the title + * @var array cur_words Array of words currently in the index for comparing to new words + * when mode is edit. Empty for other modes. + * @since 3.2.3-RC1 + */ + $vars = array( + 'mode', + 'post_id', + 'message', + 'subject', + 'poster_id', + 'forum_id', + 'words', + 'split_text', + 'split_title', + 'cur_words', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_native_index_before', compact($vars))); + unset($split_text); unset($split_title); @@ -1664,20 +1696,43 @@ class fulltext_native extends \phpbb\search\base */ public function delete_index($acp_module, $u_action) { + $sql_queries = []; + switch ($this->db->get_sql_layer()) { case 'sqlite3': - $this->db->sql_query('DELETE FROM ' . SEARCH_WORDLIST_TABLE); - $this->db->sql_query('DELETE FROM ' . SEARCH_WORDMATCH_TABLE); - $this->db->sql_query('DELETE FROM ' . SEARCH_RESULTS_TABLE); + $sql_queries[] = 'DELETE FROM ' . SEARCH_WORDLIST_TABLE; + $sql_queries[] = 'DELETE FROM ' . SEARCH_WORDMATCH_TABLE; + $sql_queries[] = 'DELETE FROM ' . SEARCH_RESULTS_TABLE; break; default: - $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_WORDLIST_TABLE); - $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_WORDMATCH_TABLE); - $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE); + $sql_queries[] = 'TRUNCATE TABLE ' . SEARCH_WORDLIST_TABLE; + $sql_queries[] = 'TRUNCATE TABLE ' . SEARCH_WORDMATCH_TABLE; + $sql_queries[] = 'TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE; break; } + + $stats = $this->stats; + + /** + * Event to modify SQL queries before the native search index is deleted + * + * @event core.search_native_delete_index_before + * @var array sql_queries Array with queries for deleting the search index + * @var array stats Array with statistics of the current index (read only) + * @since 3.2.3-RC1 + */ + $vars = array( + 'sql_queries', + 'stats', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_native_delete_index_before', compact($vars))); + + foreach ($sql_queries as $sql_query) + { + $this->db->sql_query($sql_query); + } } /** diff --git a/phpBB/phpbb/search/fulltext_postgres.php b/phpBB/phpbb/search/fulltext_postgres.php index 6443342057..2f387e791e 100644 --- a/phpBB/phpbb/search/fulltext_postgres.php +++ b/phpBB/phpbb/search/fulltext_postgres.php @@ -889,6 +889,34 @@ class fulltext_postgres extends \phpbb\search\base $words = array_unique(array_merge($split_text, $split_title)); + /** + * Event to modify method arguments and words before the PostgreSQL search index is updated + * + * @event core.search_postgres_index_before + * @var string mode Contains the post mode: edit, post, reply, quote + * @var int post_id The id of the post which is modified/created + * @var string message New or updated post content + * @var string subject New or updated post subject + * @var int poster_id Post author's user id + * @var int forum_id The id of the forum in which the post is located + * @var array words Array of words added to the index + * @var array split_text Array of words from the message + * @var array split_title Array of words from the title + * @since 3.2.3-RC1 + */ + $vars = array( + 'mode', + 'post_id', + 'message', + 'subject', + 'poster_id', + 'forum_id', + 'words', + 'split_text', + 'split_title', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_postgres_index_before', compact($vars))); + unset($split_text); unset($split_title); @@ -935,14 +963,37 @@ class fulltext_postgres extends \phpbb\search\base $this->get_stats(); } + $sql_queries = []; + if (!isset($this->stats['post_subject'])) { - $this->db->sql_query("CREATE INDEX " . POSTS_TABLE . "_" . $this->config['fulltext_postgres_ts_name'] . "_post_subject ON " . POSTS_TABLE . " USING gin (to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', post_subject))"); + $sql_queries[] = "CREATE INDEX " . POSTS_TABLE . "_" . $this->config['fulltext_postgres_ts_name'] . "_post_subject ON " . POSTS_TABLE . " USING gin (to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', post_subject))"; } if (!isset($this->stats['post_content'])) { - $this->db->sql_query("CREATE INDEX " . POSTS_TABLE . "_" . $this->config['fulltext_postgres_ts_name'] . "_post_content ON " . POSTS_TABLE . " USING gin (to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', post_text || ' ' || post_subject))"); + $sql_queries[] = "CREATE INDEX " . POSTS_TABLE . "_" . $this->config['fulltext_postgres_ts_name'] . "_post_content ON " . POSTS_TABLE . " USING gin (to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', post_text || ' ' || post_subject))"; + } + + $stats = $this->stats; + + /** + * Event to modify SQL queries before the Postgres search index is created + * + * @event core.search_postgres_create_index_before + * @var array sql_queries Array with queries for creating the search index + * @var array stats Array with statistics of the current index (read only) + * @since 3.2.3-RC1 + */ + $vars = array( + 'sql_queries', + 'stats', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_postgres_create_index_before', compact($vars))); + + foreach ($sql_queries as $sql_query) + { + $this->db->sql_query($sql_query); } $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE); @@ -968,14 +1019,37 @@ class fulltext_postgres extends \phpbb\search\base $this->get_stats(); } + $sql_queries = []; + if (isset($this->stats['post_subject'])) { - $this->db->sql_query('DROP INDEX ' . $this->stats['post_subject']['relname']); + $sql_queries[] = 'DROP INDEX ' . $this->stats['post_subject']['relname']; } if (isset($this->stats['post_content'])) { - $this->db->sql_query('DROP INDEX ' . $this->stats['post_content']['relname']); + $sql_queries[] = 'DROP INDEX ' . $this->stats['post_content']['relname']; + } + + $stats = $this->stats; + + /** + * Event to modify SQL queries before the Postgres search index is created + * + * @event core.search_postgres_delete_index_before + * @var array sql_queries Array with queries for deleting the search index + * @var array stats Array with statistics of the current index (read only) + * @since 3.2.3-RC1 + */ + $vars = array( + 'sql_queries', + 'stats', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_postgres_delete_index_before', compact($vars))); + + foreach ($sql_queries as $sql_query) + { + $this->db->sql_query($sql_query); } $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE); diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php index 54d32ca371..e2eeb5f7f3 100644 --- a/phpBB/phpbb/search/fulltext_sphinx.php +++ b/phpBB/phpbb/search/fulltext_sphinx.php @@ -758,6 +758,28 @@ class fulltext_sphinx */ public function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id) { + /** + * Event to modify method arguments before the Sphinx search index is updated + * + * @event core.search_sphinx_index_before + * @var string mode Contains the post mode: edit, post, reply, quote + * @var int post_id The id of the post which is modified/created + * @var string message New or updated post content + * @var string subject New or updated post subject + * @var int poster_id Post author's user id + * @var int forum_id The id of the forum in which the post is located + * @since 3.2.3-RC1 + */ + $vars = array( + 'mode', + 'post_id', + 'message', + 'subject', + 'poster_id', + 'forum_id', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_sphinx_index_before', compact($vars))); + if ($mode == 'edit') { $this->sphinx->UpdateAttributes($this->indexes, array('forum_id', 'poster_id'), array((int) $post_id => array((int) $forum_id, (int) $poster_id))); diff --git a/phpBB/phpbb/textformatter/s9e/bbcode_merger.php b/phpBB/phpbb/textformatter/s9e/bbcode_merger.php index 72b1473751..a05ca3c2b8 100644 --- a/phpBB/phpbb/textformatter/s9e/bbcode_merger.php +++ b/phpBB/phpbb/textformatter/s9e/bbcode_merger.php @@ -37,6 +37,9 @@ class bbcode_merger * * All of the arrays contain a "usage" element and a "template" element * + * @throws InvalidArgumentException if a definition cannot be interpreted + * @throws RuntimeException if something unexpected occurs + * * @param array $without BBCode definition without an attribute * @param array $with BBCode definition with an attribute * @return array Merged definition diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php index 1e85856898..c0bbc7b0e8 100644 --- a/phpBB/phpbb/textformatter/s9e/factory.php +++ b/phpBB/phpbb/textformatter/s9e/factory.php @@ -132,6 +132,11 @@ class factory implements \phpbb\textformatter\cache_interface protected $dispatcher; /** + * @var \phpbb\log\log_interface + */ + protected $log; + + /** * Constructor * * @param \phpbb\textformatter\data_access $data_access @@ -139,11 +144,12 @@ class factory implements \phpbb\textformatter\cache_interface * @param \phpbb\event\dispatcher_interface $dispatcher * @param \phpbb\config\config $config * @param \phpbb\textformatter\s9e\link_helper $link_helper + * @param \phpbb\log\log_interface $log * @param string $cache_dir Path to the cache dir * @param string $cache_key_parser Cache key used for the parser * @param string $cache_key_renderer Cache key used for the renderer */ - public function __construct(\phpbb\textformatter\data_access $data_access, \phpbb\cache\driver\driver_interface $cache, \phpbb\event\dispatcher_interface $dispatcher, \phpbb\config\config $config, \phpbb\textformatter\s9e\link_helper $link_helper, $cache_dir, $cache_key_parser, $cache_key_renderer) + public function __construct(\phpbb\textformatter\data_access $data_access, \phpbb\cache\driver\driver_interface $cache, \phpbb\event\dispatcher_interface $dispatcher, \phpbb\config\config $config, \phpbb\textformatter\s9e\link_helper $link_helper, \phpbb\log\log_interface $log, $cache_dir, $cache_key_parser, $cache_key_renderer) { $this->link_helper = $link_helper; $this->cache = $cache; @@ -153,6 +159,7 @@ class factory implements \phpbb\textformatter\cache_interface $this->config = $config; $this->data_access = $data_access; $this->dispatcher = $dispatcher; + $this->log = $log; } /** @@ -272,7 +279,7 @@ class factory implements \phpbb\textformatter\cache_interface // Add default BBCodes foreach ($this->get_default_bbcodes($configurator) as $bbcode) { - $configurator->BBCodes->addCustom($bbcode['usage'], new UnsafeTemplate($bbcode['template'])); + $this->add_bbcode($configurator, $bbcode['usage'], $bbcode['template']); } if (isset($configurator->tags['QUOTE'])) { @@ -299,17 +306,7 @@ class factory implements \phpbb\textformatter\cache_interface }, $row['bbcode_tpl'] ); - - try - { - $configurator->BBCodes->addCustom($row['bbcode_match'], new UnsafeTemplate($tpl)); - } - catch (\Exception $e) - { - /** - * @todo log an error? - */ - } + $this->add_bbcode($configurator, $row['bbcode_match'], $tpl); } // Load smilies @@ -419,6 +416,26 @@ class factory implements \phpbb\textformatter\cache_interface } /** + * Add a BBCode to given configurator + * + * @param Configurator $configurator + * @param string $usage + * @param string $template + * @return void + */ + protected function add_bbcode(Configurator $configurator, $usage, $template) + { + try + { + $configurator->BBCodes->addCustom($usage, new UnsafeTemplate($template)); + } + catch (\Exception $e) + { + $this->log->add('critical', null, null, 'LOG_BBCODE_CONFIGURATION_ERROR', false, [$usage, $e->getMessage()]); + } + } + + /** * Configure the Autolink / Autoemail plugins used to linkify text * * @param \s9e\TextFormatter\Configurator $configurator diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg index 00d07fee6c..ac2359dd99 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.2 -phpbb_version = 3.2.2 +style_version = 3.2.3 +phpbb_version = 3.2.3 # Defining a different template bitfield # template_bitfield = //g= diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index 97a21f9a6e..2c2094cba8 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -8,11 +8,34 @@ <div class="copyright"> <!-- EVENT overall_footer_copyright_prepend --> - {CREDIT_LINE} - <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF --> + <p class="footer-row"> + <span class="footer-copyright">{{ CREDIT_LINE }}</span> + </p> + <!-- IF TRANSLATION_INFO --> + <p class="footer-row"> + <span class="footer-copyright">{{ TRANSLATION_INFO }}</span> + </p> + <!-- ENDIF --> <!-- EVENT overall_footer_copyright_append --> - <!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF --> - <!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF --> + <p class="footer-row"> + <a class="footer-link" href="{{ U_PRIVACY }}" title="{{ lang('PRIVACY_LINK') }}" role="menuitem"> + <span class="footer-link-text">Privacy</span> + </a> + | + <a class="footer-link" href="{{ U_TERMS_USE }}" title="{{ lang('TERMS_LINK') }}" role="menuitem"> + <span class="footer-link-text">Terms</span> + </a> + </p> + <!-- IF DEBUG_OUTPUT --> + <p class="footer-row"> + <span class="footer-info">{{ DEBUG_OUTPUT }}</span> + </p> + <!-- ENDIF --> + <!-- IF U_ACP --> + <p class="footer-row"> + <a class="footer-link text-strong" href="{{ U_ACP }}">{{ lang('ACP') }}</a> + </p> + <!-- ENDIF --> </div> <div id="darkenwrapper" class="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}"> @@ -62,24 +85,27 @@ <!-- IF S_COOKIE_NOTICE --> <script src="{T_ASSETS_PATH}/cookieconsent/cookieconsent.min.js?assets_version={T_ASSETS_VERSION}"></script> <script> - window.addEventListener("load", function(){ - window.cookieconsent.initialise({ - "palette": { - "popup": { - "background": "#0F538A" + if (typeof window.cookieconsent === "object") { + window.addEventListener("load", function(){ + window.cookieconsent.initialise({ + "palette": { + "popup": { + "background": "#0F538A" + }, + "button": { + "background": "#E5E5E5" + } }, - "button": { - "background": "#E5E5E5" + "theme": "classic", + "content": { + "message": "{LA_COOKIE_CONSENT_MSG}", + "dismiss": "{LA_COOKIE_CONSENT_OK}", + "link": "{LA_COOKIE_CONSENT_INFO}", + "href": "{UA_PRIVACY}" } - }, - "theme": "classic", - "content": { - "message": "{LA_COOKIE_CONSENT_MSG}", - "dismiss": "{LA_COOKIE_CONSENT_OK}", - "link": "{LA_COOKIE_CONSENT_INFO}", - "href": "{LA_COOKIE_CONSENT_HREF}" - } - })}); + }); + }); + } </script> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index 4295867c05..2ed0189c21 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -91,28 +91,28 @@ <!-- IF U_EDIT --> <li> <a href="{U_EDIT}" title="{L_POST_EDIT_PM}" class="button button-icon-only"> - <i class="icon fa-pencil fa-fw" aria-hidden="true"></i><span class="sr-only">{L_POST_EDIT_PM}</span> + <i class="icon fa-pencil fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_EDIT}</span> </a> </li> <!-- ENDIF --> <!-- IF U_DELETE --> <li> <a href="{U_DELETE}" title="{L_DELETE_MESSAGE}" class="button button-icon-only"> - <i class="icon fa-times fa-fw" aria-hidden="true"></i><span class="sr-only">{L_DELETE_MESSAGE}</span> + <i class="icon fa-times fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_DELETE}</span> </a> </li> <!-- ENDIF --> <!-- IF U_REPORT --> <li> <a href="{U_REPORT}" title="{L_REPORT_PM}" class="button button-icon-only"> - <i class="icon fa-exclamation fa-fw" aria-hidden="true"></i><span class="sr-only">{L_REPORT_PM}</span> + <i class="icon fa-exclamation fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_REPORT}</span> </a> </li> <!-- ENDIF --> <!-- IF U_QUOTE --> <li> <a href="{U_QUOTE}" title="{L_POST_QUOTE_PM}" class="button button-icon-only"> - <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">{L_POST_QUOTE_PM}</span> + <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_QUOTE}</span> </a> </li> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 40249f24eb..a9136e1810 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -242,35 +242,35 @@ <!-- IF postrow.U_DELETE --> <li> <a href="{postrow.U_DELETE}" title="{L_DELETE_POST}" class="button button-icon-only"> - <i class="icon fa-times fa-fw" aria-hidden="true"></i><span class="sr-only">{L_DELETE_POST}</span> + <i class="icon fa-times fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_DELETE}</span> </a> </li> <!-- ENDIF --> <!-- IF postrow.U_REPORT --> <li> <a href="{postrow.U_REPORT}" title="{L_REPORT_POST}" class="button button-icon-only"> - <i class="icon fa-exclamation fa-fw" aria-hidden="true"></i><span class="sr-only">{L_REPORT_POST}</span> + <i class="icon fa-exclamation fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_REPORT}</span> </a> </li> <!-- ENDIF --> <!-- IF postrow.U_WARN --> <li> <a href="{postrow.U_WARN}" title="{L_WARN_USER}" class="button button-icon-only"> - <i class="icon fa-exclamation-triangle fa-fw" aria-hidden="true"></i><span class="sr-only">{L_WARN_USER}</span> + <i class="icon fa-exclamation-triangle fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_WARN}</span> </a> </li> <!-- ENDIF --> <!-- IF postrow.U_INFO --> <li> <a href="{postrow.U_INFO}" title="{L_INFORMATION}" class="button button-icon-only"> - <i class="icon fa-info fa-fw" aria-hidden="true"></i><span class="sr-only">{L_INFORMATION}</span> + <i class="icon fa-info fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_INFORMATION}</span> </a> </li> <!-- ENDIF --> <!-- IF postrow.U_QUOTE --> <li> <a href="{postrow.U_QUOTE}" title="{L_REPLY_WITH_QUOTE}" class="button button-icon-only"> - <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">{L_QUOTE}</span> + <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_QUOTE}</span> </a> </li> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/viewtopic_topic_tools.html b/phpBB/styles/prosilver/template/viewtopic_topic_tools.html index 397c807bb3..272a434f6a 100644 --- a/phpBB/styles/prosilver/template/viewtopic_topic_tools.html +++ b/phpBB/styles/prosilver/template/viewtopic_topic_tools.html @@ -11,7 +11,7 @@ <!-- IF U_WATCH_TOPIC --> <li> <a href="{U_WATCH_TOPIC}" class="watch-topic-link" title="{S_WATCH_TOPIC_TITLE}" data-ajax="toggle_link" data-toggle-class="icon <!-- IF S_WATCHING_TOPIC -->fa-check-square-o<!-- ELSE -->fa-square-o<!-- ENDIF --> fa-fw" data-toggle-text="{S_WATCH_TOPIC_TOGGLE}" data-toggle-url="{U_WATCH_TOPIC_TOGGLE}" data-update-all=".watch-topic-link"> - <i class="icon <!-- IF S_WATCHING_FORUM -->fa-square-o<!-- ELSE -->fa-check-square-o<!-- ENDIF --> fa-fw" aria-hidden="true"></i><span>{S_WATCH_TOPIC_TITLE}</span> + <i class="icon <!-- IF S_WATCHING_TOPIC -->fa-square-o<!-- ELSE -->fa-check-square-o<!-- ENDIF --> fa-fw" aria-hidden="true"></i><span>{S_WATCH_TOPIC_TITLE}</span> </a> </li> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 348355e8c4..6223b22173 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -981,8 +981,15 @@ fieldset.fields1 dl.pmlist dd.recipients { /* Miscellaneous styles ---------------------------------------- */ .copyright { - padding: 5px; + font-size: 10px; text-align: center; + padding: 10px; +} + +.footer-row { + font-size: 10px; + line-height: 1.8; + margin: 0; } .small { diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index fcc11f1fc2..ca4054c27f 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -421,6 +421,7 @@ .column1, .column2, .left-box.profile-details { float: none; width: auto; + clear: both; } /* Polls diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 38eba32374..3c25c3b037 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1576,12 +1576,20 @@ if (count($attach_list)) } } -// Get the list of users who can receive private messages -$can_receive_pm_list = $auth->acl_get_list(array_keys($user_cache), 'u_readpm'); -$can_receive_pm_list = (empty($can_receive_pm_list) || !isset($can_receive_pm_list[0]['u_readpm'])) ? array() : $can_receive_pm_list[0]['u_readpm']; +if ($config['enable_accurate_pm_button']) +{ + // Get the list of users who can receive private messages + $can_receive_pm_list = $auth->acl_get_list(array_keys($user_cache), 'u_readpm'); + $can_receive_pm_list = (empty($can_receive_pm_list) || !isset($can_receive_pm_list[0]['u_readpm'])) ? array() : $can_receive_pm_list[0]['u_readpm']; -// Get the list of permanently banned users -$permanently_banned_users = phpbb_get_banned_user_ids(array_keys($user_cache), false); + // Get the list of permanently banned users + $permanently_banned_users = phpbb_get_banned_user_ids(array_keys($user_cache), false); +} +else +{ + $can_receive_pm_list = array_keys($user_cache); + $permanently_banned_users = []; +} $i_total = count($rowset) - 1; $prev_post_id = ''; @@ -1994,6 +2002,7 @@ for ($i = 0, $end = count($post_list); $i < $end; ++$i) 'S_FIRST_UNREAD' => $s_first_unread, 'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && count($cp_row['row'])) ? true : false, 'S_TOPIC_POSTER' => ($topic_data['topic_poster'] == $poster_id) ? true : false, + 'S_FIRST_POST' => ($topic_data['topic_first_post_id'] == $row['post_id']) ? true : false, 'S_IGNORE_POST' => ($row['foe']) ? true : false, 'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '', diff --git a/tests/RUNNING_TESTS.md b/tests/RUNNING_TESTS.md index c9941d61e5..12ae7fa687 100644 --- a/tests/RUNNING_TESTS.md +++ b/tests/RUNNING_TESTS.md @@ -143,14 +143,14 @@ If you want all tests, run: Functional tests ------------------ +================ Functional tests test software the way a user would. They simulate a user browsing the website, but they do these steps in an automated way. phpBB allows you to write such tests. Running -======= +------- Running the tests requires your phpBB3 repository to be accessible through a local web server. You will need to supply the URL to the webserver in @@ -170,6 +170,27 @@ If you only want the functional tests, run: This will change your board's config.php file, but it makes a backup at config_dev.php, so you can restore it after the test run is complete. +UI tests +======== + +UI tests are functional tests that also support running JavaScript in a +headless browser. These should be used when functionality that is only +executed using JS needs to be tested. They require a running +[PhantomJS WebDriver instance](http://phantomjs.org/). The executable can +either be downloaded from [PhantomJS](http://phantomjs.org/download.html) +or alternatively be installed with npm: + + $ npm install -g phantomjs-prebuilt + +You might have to run the command as superuser / administrator on some +systems. Afterwards, a new WebDriver instance can be started via command +line: + + $ phantomjs --webdriver=127.0.0.1:8910 + +Port 8910 is the default port that will be used by UI tests to connect +to the WebDriver instance. + More Information ================ diff --git a/tests/dbal/ext/foo/bar/acp/acp_test_info.php b/tests/dbal/ext/foo/bar/acp/acp_test_info.php new file mode 100644 index 0000000000..ac92623c3a --- /dev/null +++ b/tests/dbal/ext/foo/bar/acp/acp_test_info.php @@ -0,0 +1,37 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace foo\bar\acp; + +class acp_test_info +{ + public function module() + { + return array( + 'filename' => '\foo\bar\acp\acp_test_module', + 'title' => 'ACP_NEW_MODULE', + 'modes' => array( + 'mode_1' => array( + 'title' => 'ACP_NEW_MODULE_MODE_1', + 'auth' => '', + 'cat' => array('ACP_NEW_MODULE'), + ), + 'mode_2' => array( + 'title' => 'ACP_NEW_MODULE_MODE_2', + 'auth' => '', + 'cat' => array('ACP_NEW_MODULE'), + ), + ), + ); + } +} diff --git a/tests/dbal/ext/foo/bar/acp/acp_test_module.php b/tests/dbal/ext/foo/bar/acp/acp_test_module.php new file mode 100644 index 0000000000..01ce5c17dc --- /dev/null +++ b/tests/dbal/ext/foo/bar/acp/acp_test_module.php @@ -0,0 +1,25 @@ +<?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 foo\bar\acp; + +class acp_test_module +{ + var $u_action; + + function main($id, $mode) + { + $this->tpl_name = 'foobar'; + $this->page_title = 'Bertie'; + } +} diff --git a/tests/dbal/ext/foo/bar/composer.json b/tests/dbal/ext/foo/bar/composer.json new file mode 100644 index 0000000000..2edfd43d84 --- /dev/null +++ b/tests/dbal/ext/foo/bar/composer.json @@ -0,0 +1,24 @@ +{ + "name": "foo/bar", + "type": "phpbb-extension", + "description": "An example/sample extension to be used for testing purposes in phpBB Development.", + "version": "1.0.0", + "time": "2012-02-15 01:01:01", + "license": "GNU GPL v2", + "authors": [{ + "name": "John Smith", + "username": "JohnSmith27", + "email": "email@phpbb.com", + "homepage": "http://phpbb.com", + "role": "N/A" + }], + "require": { + "php": ">=5.4.7" + }, + "extra": { + "display-name": "phpBB BarFoo Extension", + "soft-require": { + "phpbb/phpbb": "3.2.*@dev" + } + } +} diff --git a/tests/dbal/ext/foo/bar/ucp/ucp_test_info.php b/tests/dbal/ext/foo/bar/ucp/ucp_test_info.php new file mode 100644 index 0000000000..d3489af832 --- /dev/null +++ b/tests/dbal/ext/foo/bar/ucp/ucp_test_info.php @@ -0,0 +1,37 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace foo\bar\ucp; + +class ucp_test_info +{ + public function module() + { + return array( + 'filename' => '\foo\bar\ucp\ucp_test_module', + 'title' => 'UCP_NEW_MODULE', + 'modes' => array( + 'mode_1' => array( + 'title' => 'UCP_NEW_MODULE_MODE_1', + 'auth' => '', + 'cat' => array('UCP_NEW_MODULE'), + ), + 'mode_2' => array( + 'title' => 'UCP_NEW_MODULE_MODE_2', + 'auth' => '', + 'cat' => array('UCP_NEW_MODULE'), + ), + ), + ); + } +} diff --git a/tests/dbal/ext/foo/bar/ucp/ucp_test_module.php b/tests/dbal/ext/foo/bar/ucp/ucp_test_module.php new file mode 100644 index 0000000000..b06b3238b6 --- /dev/null +++ b/tests/dbal/ext/foo/bar/ucp/ucp_test_module.php @@ -0,0 +1,25 @@ +<?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 foo\bar\ucp; + +class ucp_test_module +{ + var $u_action; + + function main($id, $mode) + { + $this->tpl_name = 'foobar'; + $this->page_title = 'Bertie'; + } +} diff --git a/tests/dbal/migrator_tool_module_test.php b/tests/dbal/migrator_tool_module_test.php index c625b93ded..e34ee7b59c 100644 --- a/tests/dbal/migrator_tool_module_test.php +++ b/tests/dbal/migrator_tool_module_test.php @@ -11,6 +11,9 @@ * */ +require_once dirname(__FILE__) . '/ext/foo/bar/acp/acp_test_info.php'; +require_once dirname(__FILE__) . '/ext/foo/bar/ucp/ucp_test_info.php'; + class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case { public function getDataSet() @@ -39,6 +42,9 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case $auth = $this->getMock('\phpbb\auth\auth'); $phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE); + // Correctly set the root path for this test to this directory, so the classes can be found + $phpbb_root_path = dirname(__FILE__) . '/'; + $phpbb_extension_manager = new phpbb_mock_extension_manager($phpbb_root_path); $module_manager = new \phpbb\module\module_manager($cache, $this->db, $phpbb_extension_manager, MODULES_TABLE, $phpbb_root_path, $phpEx); @@ -52,12 +58,40 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case array( '', 'ACP_CAT', + false, + true, + ), + array( + 0, + 'ACP_CAT', + false, + true, + ), + array( + false, + 'ACP_CAT', + false, + true, + ), + + // Test the existing category lazily + array( + '', + 'ACP_CAT', + true, true, ), array( 0, 'ACP_CAT', true, + true, + ), + array( + false, + 'ACP_CAT', + true, + true, ), // Test the existing module @@ -65,16 +99,39 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case '', 'ACP_MODULE', false, + false, + ), + array( + false, + 'ACP_MODULE', + false, + true, + ), + array( + 'ACP_CAT', + 'ACP_MODULE', + false, + true, + ), + + // Test the existing module lazily + array( + '', + 'ACP_MODULE', + true, + false, ), array( false, 'ACP_MODULE', true, + true, ), array( 'ACP_CAT', 'ACP_MODULE', true, + true, ), // Test for non-existant modules @@ -82,10 +139,38 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case '', 'ACP_NON_EXISTANT_CAT', false, + false, + ), + array( + false, + 'ACP_NON_EXISTANT_CAT', + false, + false, + ), + array( + 'ACP_CAT', + 'ACP_NON_EXISTANT_MODULE', + false, + false, + ), + + // Test for non-existant modules lazily + array( + '', + 'ACP_NON_EXISTANT_CAT', + true, + false, + ), + array( + false, + 'ACP_NON_EXISTANT_CAT', + true, + false, ), array( 'ACP_CAT', 'ACP_NON_EXISTANT_MODULE', + true, false, ), ); @@ -94,9 +179,9 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case /** * @dataProvider exists_data_acp */ - public function test_exists_acp($parent, $module, $expected) + public function test_exists_acp($parent, $module, $lazy, $expected) { - $this->assertEquals($expected, $this->tool->exists('acp', $parent, $module)); + $this->assertEquals($expected, $this->tool->exists('acp', $parent, $module, $lazy)); } public function exists_data_ucp() @@ -106,12 +191,40 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case array( '', 'UCP_MAIN_CAT', + false, + true, + ), + array( + 0, + 'UCP_MAIN_CAT', + false, + true, + ), + array( + false, + 'UCP_MAIN_CAT', + false, + true, + ), + + // Test the existing category lazily + array( + '', + 'UCP_MAIN_CAT', + true, true, ), array( 0, 'UCP_MAIN_CAT', true, + true, + ), + array( + false, + 'UCP_MAIN_CAT', + true, + true, ), // Test the existing module @@ -119,21 +232,51 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case '', 'UCP_SUBCATEGORY', false, + false, + ), + array( + false, + 'UCP_SUBCATEGORY', + false, + true, + ), + array( + 'UCP_MAIN_CAT', + 'UCP_SUBCATEGORY', + false, + true, + ), + array( + 'UCP_SUBCATEGORY', + 'UCP_MODULE', + false, + true, + ), + + // Test the existing module lazily + array( + '', + 'UCP_SUBCATEGORY', + true, + false, ), array( false, 'UCP_SUBCATEGORY', true, + true, ), array( 'UCP_MAIN_CAT', 'UCP_SUBCATEGORY', true, + true, ), array( 'UCP_SUBCATEGORY', 'UCP_MODULE', true, + true, ), // Test for non-existant modules @@ -141,10 +284,26 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case '', 'UCP_NON_EXISTANT_CAT', false, + false, + ), + array( + 'UCP_MAIN_CAT', + 'UCP_NON_EXISTANT_MODULE', + false, + false, + ), + + // Test for non-existant modules lazily + array( + '', + 'UCP_NON_EXISTANT_CAT', + true, + false, ), array( 'UCP_MAIN_CAT', 'UCP_NON_EXISTANT_MODULE', + true, false, ), ); @@ -153,9 +312,9 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case /** * @dataProvider exists_data_ucp */ - public function test_exists_ucp($parent, $module, $expected) + public function test_exists_ucp($parent, $module, $lazy, $expected) { - $this->assertEquals($expected, $this->tool->exists('ucp', $parent, $module)); + $this->assertEquals($expected, $this->tool->exists('ucp', $parent, $module, $lazy)); } public function test_add() @@ -250,6 +409,35 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case $this->fail($e); } $this->assertEquals(true, $this->tool->exists('ucp', 'UCP_NEW_SUBCAT', 'UCP_NEW_MODULE')); + + // Test adding new UCP module the automatic way, single mode + try + { + $this->tool->add('ucp', 'UCP_NEW_CAT', array( + 'module_basename' => '\foo\bar\ucp\ucp_test_module', + 'modes' => array('mode_1'), + )); + } + catch (Exception $e) + { + $this->fail($e); + } + $this->assertEquals(true, $this->tool->exists('ucp', 'UCP_NEW_CAT', 'UCP_NEW_MODULE_MODE_1')); + $this->assertEquals(false, $this->tool->exists('ucp', 'UCP_NEW_CAT', 'UCP_NEW_MODULE_MODE_2')); + + // Test adding new ACP module the automatic way, all modes + try + { + $this->tool->add('acp', 'ACP_NEW_CAT', array( + 'module_basename' => '\foo\bar\acp\acp_test_module', + )); + } + catch (Exception $e) + { + $this->fail($e); + } + $this->assertEquals(true, $this->tool->exists('acp', 'ACP_NEW_CAT', 'ACP_NEW_MODULE_MODE_1')); + $this->assertEquals(true, $this->tool->exists('acp', 'ACP_NEW_CAT', 'ACP_NEW_MODULE_MODE_2')); } public function test_remove() diff --git a/tests/random/gen_rand_string_test.php b/tests/random/gen_rand_string_test.php index a9d1ea20de..428db6ac98 100644 --- a/tests/random/gen_rand_string_test.php +++ b/tests/random/gen_rand_string_test.php @@ -40,7 +40,10 @@ class phpbb_random_gen_rand_string_test extends phpbb_test_case $random_string_length = strlen($random_string); $this->assertTrue($random_string_length >= self::MIN_STRING_LENGTH); - $this->assertTrue($random_string_length <= $num_chars); + $this->assertTrue( + $random_string_length == $num_chars, + sprintf('Failed asserting that random string length matches expected length. Expected %1$u, Actual %2$u', $num_chars, $random_string_length) + ); $this->assertRegExp('#^[A-Z0-9]+$#', $random_string); } } @@ -56,7 +59,10 @@ class phpbb_random_gen_rand_string_test extends phpbb_test_case $random_string_length = strlen($random_string); $this->assertTrue($random_string_length >= self::MIN_STRING_LENGTH); - $this->assertTrue($random_string_length <= $num_chars); + $this->assertTrue( + $random_string_length == $num_chars, + sprintf('Failed asserting that random string length matches expected length. Expected %1$u, Actual %2$u', $num_chars, $random_string_length) + ); $this->assertRegExp('#^[A-NP-Z1-9]+$#', $random_string); } } diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php index 7fb9a740b8..c792976b1e 100644 --- a/tests/test_framework/phpbb_test_case_helpers.php +++ b/tests/test_framework/phpbb_test_case_helpers.php @@ -385,7 +385,7 @@ class phpbb_test_case_helpers $mb = $this->test_case->getMockBuilder('phpbb\\textformatter\\data_access'); $mb->setMethods(array('get_bbcodes', 'get_censored_words', 'get_smilies', 'get_styles')); $mb->setConstructorArgs(array( - $this->test_case->getMock('phpbb\\db\\driver\\driver'), + $this->test_case->getMockBuilder('phpbb\\db\\driver\\driver')->getMock(), 'phpbb_bbcodes', 'phpbb_smilies', 'phpbb_styles', @@ -489,8 +489,11 @@ class phpbb_test_case_helpers $request = new phpbb_mock_request; } + // Get a log interface + $log = ($container->has('log')) ? $container->get('log') : $this->test_case->getMockBuilder('phpbb\\log\\log_interface')->getMock(); + // Create and register the text_formatter.s9e.factory service - $factory = new \phpbb\textformatter\s9e\factory($dal, $cache, $dispatcher, $config, new \phpbb\textformatter\s9e\link_helper, $cache_dir, $cache_key_parser, $cache_key_renderer); + $factory = new \phpbb\textformatter\s9e\factory($dal, $cache, $dispatcher, $config, new \phpbb\textformatter\s9e\link_helper, $log, $cache_dir, $cache_key_parser, $cache_key_renderer); $container->set('text_formatter.s9e.factory', $factory); // Create a user if none was provided, and add the common lang strings diff --git a/tests/text_formatter/s9e/factory_test.php b/tests/text_formatter/s9e/factory_test.php index d35330a975..0d780a19a9 100644 --- a/tests/text_formatter/s9e/factory_test.php +++ b/tests/text_formatter/s9e/factory_test.php @@ -56,6 +56,7 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case $this->dispatcher, new \phpbb\config\config(array('allowed_schemes_links' => 'http,https,ftp')), new \phpbb\textformatter\s9e\link_helper, + $this->getMockBuilder('phpbb\\log\\log_interface')->getMock(), $this->get_cache_dir(), '_foo_parser', '_foo_renderer' @@ -264,6 +265,23 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case } /** + * @testdox Logs malformed BBCodes + */ + public function test_malformed_bbcodes() + { + $log = $this->getMockBuilder('phpbb\\log\\log_interface')->getMock(); + $log->expects($this->once()) + ->method('add') + ->with('critical', null, null, 'LOG_BBCODE_CONFIGURATION_ERROR', false, ['[x !x]{TEXT}[/x]', 'Cannot interpret the BBCode definition']); + + $container = new phpbb_mock_container_builder; + $container->set('log', $log); + + $fixture = __DIR__ . '/fixtures/malformed_bbcode.xml'; + $this->get_test_case_helpers()->set_s9e_services($container, $fixture); + } + + /** * @testdox get_configurator() triggers events before and after configuration */ public function test_configure_events() diff --git a/tests/text_formatter/s9e/fixtures/malformed_bbcode.xml b/tests/text_formatter/s9e/fixtures/malformed_bbcode.xml new file mode 100644 index 0000000000..7e7aa1a39c --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/malformed_bbcode.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_bbcodes"> + <column>bbcode_id</column> + <column>bbcode_tag</column> + <column>bbcode_helpline</column> + <column>display_on_posting</column> + <column>bbcode_match</column> + <column>bbcode_tpl</column> + <column>first_pass_match</column> + <column>first_pass_replace</column> + <column>second_pass_match</column> + <column>second_pass_replace</column> + + <row> + <value>13</value> + <value>x</value> + <value></value> + <value>1</value> + <value>[x !x]{TEXT}[/x]</value> + <value>...</value> + <value/> + <value/> + <value/> + <value/> + </row> + </table> +</dataset> |