diff options
76 files changed, 961 insertions, 294 deletions
diff --git a/build/build.xml b/build/build.xml index 5e7c672195..b4fab62c29 100644 --- a/build/build.xml +++ b/build/build.xml @@ -3,8 +3,8 @@ <project name="phpBB" description="The phpBB forum software" default="all" basedir="../"> <!-- a few settings for the build --> <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" /> + <property name="prevversion" value="3.2.3" /> + <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, 3.2.2" /> <!-- no configuration should be needed beyond this point --> <property name="oldversions" value="${olderversions}, ${prevversion}" /> diff --git a/git-tools/hooks/commit-msg b/git-tools/hooks/commit-msg index 136606252c..b73005b34d 100755 --- a/git-tools/hooks/commit-msg +++ b/git-tools/hooks/commit-msg @@ -147,6 +147,15 @@ then quit $ERR_LENGTH; fi +# Check for CR/LF line breaks +if grep -q $'\r$' "$1" +then + complain "The commit message uses CR/LF line breaks, which are not permitted." >&2 + complain >&2 + + quit $ERR_EOF; +fi + lines=$(wc -l "$1" | awk '{ print $1; }'); expecting=header; in_description=0; diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index efdd6f1e22..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; } diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 60021f1ecf..02d7323dfb 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -935,9 +935,9 @@ phpbb.addAjaxCallback('alt_text', function() { $anchor.each(function() { var $this = $(this); altText = $this.attr('data-alt-text'); - $this.attr('data-alt-text', $this.text()); - $this.attr('title', $.trim(altText)); - $this.text(altText); + $this.attr('data-alt-text', $.trim($this.text())); + $this.attr('title', altText); + $this.children('span').text(altText); }); }); @@ -1332,7 +1332,6 @@ phpbb.toggleDropdown = function() { marginLeft: 0, left: 0, marginRight: 0, - right: 0, maxWidth: (windowWidth - 4) + 'px' }); diff --git a/phpBB/assets/javascript/plupload.js b/phpBB/assets/javascript/plupload.js index 8b3543880f..495d756c79 100644 --- a/phpBB/assets/javascript/plupload.js +++ b/phpBB/assets/javascript/plupload.js @@ -211,7 +211,7 @@ phpbb.plupload.updateHiddenData = function(row, attach, index) { .attr('type', 'hidden') .attr('name', 'attachment_data[' + index + '][' + key + ']') .attr('value', attach[key]); - $('textarea', row).after(input); + $(row).append(input); } }; diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 3061fee817..5ae18334d9 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -71,9 +71,12 @@ require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); register_compatibility_globals(); +/** @var \phpbb\config\config $config */ +$config = $phpbb_container->get('config'); + /** @var \phpbb\language\language $language */ $language = $phpbb_container->get('language'); -$language->set_default_language($phpbb_container->get('config')['default_lang']); +$language->set_default_language($config['default_lang']); $language->add_lang(array('common', 'acp/common', 'cli')); /* @var $user \phpbb\user */ diff --git a/phpBB/composer.lock b/phpBB/composer.lock index 5b948eddc1..c83ff7aa51 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -84,16 +84,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "5.3.2", + "version": "5.3.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "f9acb4761844317e626a32259205bec1f1bc60d2" + "reference": "93bbdb30d59be6cd9839495306c65f2907370eb9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f9acb4761844317e626a32259205bec1f1bc60d2", - "reference": "f9acb4761844317e626a32259205bec1f1bc60d2", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/93bbdb30d59be6cd9839495306c65f2907370eb9", + "reference": "93bbdb30d59be6cd9839495306c65f2907370eb9", "shasum": "" }, "require": { @@ -133,20 +133,20 @@ "rest", "web service" ], - "time": "2018-01-15 07:18:01" + "time": "2018-07-31 13:33:10" }, { "name": "guzzlehttp/ringphp", - "version": "1.1.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/guzzle/RingPHP.git", - "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b" + "reference": "5e2a174052995663dd68e6b5ad838afd47dd615b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", - "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/5e2a174052995663dd68e6b5ad838afd47dd615b", + "reference": "5e2a174052995663dd68e6b5ad838afd47dd615b", "shasum": "" }, "require": { @@ -184,7 +184,7 @@ } ], "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", - "time": "2015-05-20 03:37:09" + "time": "2018-07-31 13:22:33" }, { "name": "guzzlehttp/streams", @@ -280,16 +280,16 @@ }, { "name": "lusitanian/oauth", - "version": "v0.8.10", + "version": "v0.8.11", "source": { "type": "git", "url": "https://github.com/Lusitanian/PHPoAuthLib.git", - "reference": "09f4af38f17db6938253f4d1b171d537913ac1ed" + "reference": "fc11a53db4b66da555a6a11fce294f574a8374f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Lusitanian/PHPoAuthLib/zipball/09f4af38f17db6938253f4d1b171d537913ac1ed", - "reference": "09f4af38f17db6938253f4d1b171d537913ac1ed", + "url": "https://api.github.com/repos/Lusitanian/PHPoAuthLib/zipball/fc11a53db4b66da555a6a11fce294f574a8374f9", + "reference": "fc11a53db4b66da555a6a11fce294f574a8374f9", "shasum": "" }, "require": { @@ -462,16 +462,16 @@ }, { "name": "paragonie/random_compat", - "version": "v1.4.2", + "version": "v1.4.3", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "965cdeb01fdcab7653253aa81d40441d261f1e66" + "reference": "9b3899e3c3ddde89016f576edb8c489708ad64cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/965cdeb01fdcab7653253aa81d40441d261f1e66", - "reference": "965cdeb01fdcab7653253aa81d40441d261f1e66", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/9b3899e3c3ddde89016f576edb8c489708ad64cd", + "reference": "9b3899e3c3ddde89016f576edb8c489708ad64cd", "shasum": "" }, "require": { @@ -616,16 +616,16 @@ }, { "name": "react/promise", - "version": "v2.5.1", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "62785ae604c8d69725d693eb370e1d67e94c4053" + "reference": "f4edc2581617431aea50430749db55cc3fc031b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/62785ae604c8d69725d693eb370e1d67e94c4053", - "reference": "62785ae604c8d69725d693eb370e1d67e94c4053", + "url": "https://api.github.com/repos/reactphp/promise/zipball/f4edc2581617431aea50430749db55cc3fc031b3", + "reference": "f4edc2581617431aea50430749db55cc3fc031b3", "shasum": "" }, "require": { @@ -658,7 +658,7 @@ "promise", "promises" ], - "time": "2017-03-25 12:08:31" + "time": "2018-06-13 15:59:06" }, { "name": "s9e/text-formatter", @@ -727,21 +727,22 @@ }, { "name": "symfony/config", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "17605ff58313d9fe94e507620a399721fc347b6d" + "reference": "06c0be4cdd8363f3ec8d592c9a4d1b981d5052af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/17605ff58313d9fe94e507620a399721fc347b6d", - "reference": "17605ff58313d9fe94e507620a399721fc347b6d", + "url": "https://api.github.com/repos/symfony/config/zipball/06c0be4cdd8363f3ec8d592c9a4d1b981d5052af", + "reference": "06c0be4cdd8363f3ec8d592c9a4d1b981d5052af", "shasum": "" }, "require": { "php": ">=5.3.9", - "symfony/filesystem": "~2.3|~3.0.0" + "symfony/filesystem": "~2.3|~3.0.0", + "symfony/polyfill-ctype": "~1.8" }, "require-dev": { "symfony/yaml": "~2.7|~3.0.0" @@ -779,20 +780,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-01-21 19:03:25" + "time": "2018-07-26 11:13:39" }, { "name": "symfony/console", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "162ca7d0ea597599967aa63b23418e747da0896b" + "reference": "0c1fcbb9afb5cff992c982ff99c0434f0146dcfc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/162ca7d0ea597599967aa63b23418e747da0896b", - "reference": "162ca7d0ea597599967aa63b23418e747da0896b", + "url": "https://api.github.com/repos/symfony/console/zipball/0c1fcbb9afb5cff992c982ff99c0434f0146dcfc", + "reference": "0c1fcbb9afb5cff992c982ff99c0434f0146dcfc", "shasum": "" }, "require": { @@ -806,7 +807,7 @@ "symfony/process": "~2.1|~3.0.0" }, "suggest": { - "psr/log": "For using the console logger", + "psr/log-implementation": "For using the console logger", "symfony/event-dispatcher": "", "symfony/process": "" }, @@ -840,20 +841,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-01-29 08:54:45" + "time": "2018-07-26 11:13:39" }, { "name": "symfony/debug", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "35e36287fc0fdc8a08f70efcd4865ae6d8a6ee55" + "reference": "cbb8a5f212148964efbc414838c527229f9951b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/35e36287fc0fdc8a08f70efcd4865ae6d8a6ee55", - "reference": "35e36287fc0fdc8a08f70efcd4865ae6d8a6ee55", + "url": "https://api.github.com/repos/symfony/debug/zipball/cbb8a5f212148964efbc414838c527229f9951b7", + "reference": "cbb8a5f212148964efbc414838c527229f9951b7", "shasum": "" }, "require": { @@ -897,20 +898,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-01-18 22:12:33" + "time": "2018-08-03 09:45:57" }, { "name": "symfony/dependency-injection", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "91ad61e6f140b050eba4aa39bc52eece713f2a71" + "reference": "ad2446d39d11c3daaa7f147d957941a187e47357" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/91ad61e6f140b050eba4aa39bc52eece713f2a71", - "reference": "91ad61e6f140b050eba4aa39bc52eece713f2a71", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ad2446d39d11c3daaa7f147d957941a187e47357", + "reference": "ad2446d39d11c3daaa7f147d957941a187e47357", "shasum": "" }, "require": { @@ -960,20 +961,20 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2018-01-29 08:55:23" + "time": "2018-07-26 11:13:39" }, { "name": "symfony/event-dispatcher", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "d64be24fc1eba62f9daace8a8918f797fc8e87cc" + "reference": "84ae343f39947aa084426ed1138bb96bf94d1f12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d64be24fc1eba62f9daace8a8918f797fc8e87cc", - "reference": "d64be24fc1eba62f9daace8a8918f797fc8e87cc", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/84ae343f39947aa084426ed1138bb96bf94d1f12", + "reference": "84ae343f39947aa084426ed1138bb96bf94d1f12", "shasum": "" }, "require": { @@ -1020,24 +1021,25 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-01-03 07:36:31" + "time": "2018-07-26 09:03:18" }, { "name": "symfony/filesystem", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "1f4e8351e0196562f5e8ec584baeceeb8e2e92f6" + "reference": "0b252f4e25b7da17abb5a98eb60755b71d082c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/1f4e8351e0196562f5e8ec584baeceeb8e2e92f6", - "reference": "1f4e8351e0196562f5e8ec584baeceeb8e2e92f6", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0b252f4e25b7da17abb5a98eb60755b71d082c9c", + "reference": "0b252f4e25b7da17abb5a98eb60755b71d082c9c", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.3.9", + "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { @@ -1069,20 +1071,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-01-03 07:36:31" + "time": "2018-08-07 09:12:42" }, { "name": "symfony/finder", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9786ccb6a1f94a89ae18fc6a1b68de1f070823ed" + "reference": "f0de0b51913eb2caab7dfed6413b87e14fca780e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9786ccb6a1f94a89ae18fc6a1b68de1f070823ed", - "reference": "9786ccb6a1f94a89ae18fc6a1b68de1f070823ed", + "url": "https://api.github.com/repos/symfony/finder/zipball/f0de0b51913eb2caab7dfed6413b87e14fca780e", + "reference": "f0de0b51913eb2caab7dfed6413b87e14fca780e", "shasum": "" }, "require": { @@ -1118,20 +1120,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-01-29 08:54:45" + "time": "2018-07-26 11:13:39" }, { "name": "symfony/http-foundation", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "686464910bbe58a2b38eb1f898aa45dc6c4de0cb" + "reference": "dc02e684171d0696edb6d4266e9d93af5e3f44d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/686464910bbe58a2b38eb1f898aa45dc6c4de0cb", - "reference": "686464910bbe58a2b38eb1f898aa45dc6c4de0cb", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/dc02e684171d0696edb6d4266e9d93af5e3f44d3", + "reference": "dc02e684171d0696edb6d4266e9d93af5e3f44d3", "shasum": "" }, "require": { @@ -1173,20 +1175,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2018-01-29 08:54:45" + "time": "2018-08-27 15:52:41" }, { "name": "symfony/http-kernel", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "af74cd947d63ae1294aed71b9456f2a04f7f6d45" + "reference": "5424d38f10dc62752e655740224681a478d9f5bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/af74cd947d63ae1294aed71b9456f2a04f7f6d45", - "reference": "af74cd947d63ae1294aed71b9456f2a04f7f6d45", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/5424d38f10dc62752e655740224681a478d9f5bb", + "reference": "5424d38f10dc62752e655740224681a478d9f5bb", "shasum": "" }, "require": { @@ -1194,7 +1196,8 @@ "psr/log": "~1.0", "symfony/debug": "^2.6.2", "symfony/event-dispatcher": "^2.6.7|~3.0.0", - "symfony/http-foundation": "~2.7.36|~2.8.29|~3.1.6" + "symfony/http-foundation": "~2.7.36|~2.8.29|~3.1.6", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { "symfony/config": "<2.7", @@ -1256,20 +1259,78 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2018-01-29 10:48:12" + "time": "2018-08-27 17:33:38" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06 14:22:27" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.7.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", "shasum": "" }, "require": { @@ -1281,7 +1342,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1315,20 +1376,20 @@ "portable", "shim" ], - "time": "2018-01-30 19:27:44" + "time": "2018-08-06 14:22:27" }, { "name": "symfony/polyfill-php54", - "version": "v1.7.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php54.git", - "reference": "84e2b616c197ef400c6d0556a0606cee7c9e21d5" + "reference": "412977e090c6a8472dc39d50d1beb7d59495a965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/84e2b616c197ef400c6d0556a0606cee7c9e21d5", - "reference": "84e2b616c197ef400c6d0556a0606cee7c9e21d5", + "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/412977e090c6a8472dc39d50d1beb7d59495a965", + "reference": "412977e090c6a8472dc39d50d1beb7d59495a965", "shasum": "" }, "require": { @@ -1337,7 +1398,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1373,20 +1434,20 @@ "portable", "shim" ], - "time": "2018-01-30 19:27:44" + "time": "2018-08-06 14:22:27" }, { "name": "symfony/polyfill-php55", - "version": "v1.7.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php55.git", - "reference": "168371cb3dfb10e0afde96e7c2688be02470d143" + "reference": "578b8528da843de0fc65ec395900fa3181f2ead7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/168371cb3dfb10e0afde96e7c2688be02470d143", - "reference": "168371cb3dfb10e0afde96e7c2688be02470d143", + "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/578b8528da843de0fc65ec395900fa3181f2ead7", + "reference": "578b8528da843de0fc65ec395900fa3181f2ead7", "shasum": "" }, "require": { @@ -1396,7 +1457,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1429,20 +1490,20 @@ "portable", "shim" ], - "time": "2018-01-30 19:27:44" + "time": "2018-08-06 14:22:27" }, { "name": "symfony/proxy-manager-bridge", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/proxy-manager-bridge.git", - "reference": "d73283cfe025d73c70551c45d22c54bd43c2c53b" + "reference": "0fd7ab039e26a33c5e3d1e00642bc83412c0896a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/proxy-manager-bridge/zipball/d73283cfe025d73c70551c45d22c54bd43c2c53b", - "reference": "d73283cfe025d73c70551c45d22c54bd43c2c53b", + "url": "https://api.github.com/repos/symfony/proxy-manager-bridge/zipball/0fd7ab039e26a33c5e3d1e00642bc83412c0896a", + "reference": "0fd7ab039e26a33c5e3d1e00642bc83412c0896a", "shasum": "" }, "require": { @@ -1483,20 +1544,20 @@ ], "description": "Symfony ProxyManager Bridge", "homepage": "https://symfony.com", - "time": "2018-01-03 07:36:31" + "time": "2018-07-26 09:03:18" }, { "name": "symfony/routing", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "627ea100720dac15d8165648caac57456dda84aa" + "reference": "e26f791e8669603e9dc0a601e75a50f914eaa144" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/627ea100720dac15d8165648caac57456dda84aa", - "reference": "627ea100720dac15d8165648caac57456dda84aa", + "url": "https://api.github.com/repos/symfony/routing/zipball/e26f791e8669603e9dc0a601e75a50f914eaa144", + "reference": "e26f791e8669603e9dc0a601e75a50f914eaa144", "shasum": "" }, "require": { @@ -1507,7 +1568,6 @@ }, "require-dev": { "doctrine/annotations": "~1.0", - "doctrine/common": "~2.2", "psr/log": "~1.0", "symfony/config": "~2.7|~3.0.0", "symfony/expression-language": "~2.4|~3.0.0", @@ -1558,20 +1618,20 @@ "uri", "url" ], - "time": "2018-01-16 18:00:04" + "time": "2018-07-26 11:13:39" }, { "name": "symfony/twig-bridge", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/twig-bridge.git", - "reference": "efdc8b39b5a05def32824e578ccf3fcdec8190cc" + "reference": "2bb814a4554a7188275be36503dc27c0dd12cd2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/efdc8b39b5a05def32824e578ccf3fcdec8190cc", - "reference": "efdc8b39b5a05def32824e578ccf3fcdec8190cc", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/2bb814a4554a7188275be36503dc27c0dd12cd2f", + "reference": "2bb814a4554a7188275be36503dc27c0dd12cd2f", "shasum": "" }, "require": { @@ -1591,7 +1651,7 @@ "symfony/http-kernel": "~2.8|~3.0.0", "symfony/polyfill-intl-icu": "~1.0", "symfony/routing": "~2.2|~3.0.0", - "symfony/security": "~2.6|~3.0.0", + "symfony/security": "^2.8.31|^3.3.13", "symfony/security-acl": "~2.6|~3.0.0", "symfony/stopwatch": "~2.2|~3.0.0", "symfony/templating": "~2.1|~3.0.0", @@ -1643,24 +1703,25 @@ ], "description": "Symfony Twig Bridge", "homepage": "https://symfony.com", - "time": "2018-01-03 17:12:09" + "time": "2018-07-26 11:13:39" }, { "name": "symfony/yaml", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "be720fcfae4614df204190d57795351059946a77" + "reference": "fbf876678e29dc634430dcf0096e216eb0004467" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/be720fcfae4614df204190d57795351059946a77", - "reference": "be720fcfae4614df204190d57795351059946a77", + "url": "https://api.github.com/repos/symfony/yaml/zipball/fbf876678e29dc634430dcf0096e216eb0004467", + "reference": "fbf876678e29dc634430dcf0096e216eb0004467", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.3.9", + "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { @@ -1692,29 +1753,30 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-01-03 07:36:31" + "time": "2018-07-26 09:03:18" }, { "name": "twig/twig", - "version": "v1.35.0", + "version": "v1.35.4", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "daa657073e55b0a78cce8fdd22682fddecc6385f" + "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/daa657073e55b0a78cce8fdd22682fddecc6385f", - "reference": "daa657073e55b0a78cce8fdd22682fddecc6385f", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e081e98378a1e78c29cc9eba4aefa5d78a05d2a", + "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "psr/container": "^1.0", - "symfony/debug": "~2.7", - "symfony/phpunit-bridge": "~3.3@dev" + "symfony/debug": "^2.7", + "symfony/phpunit-bridge": "^3.3" }, "type": "library", "extra": { @@ -1748,16 +1810,16 @@ }, { "name": "Twig Team", - "homepage": "http://twig.sensiolabs.org/contributors", + "homepage": "https://twig.symfony.com/contributors", "role": "Contributors" } ], "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", + "homepage": "https://twig.symfony.com", "keywords": [ "templating" ], - "time": "2017-09-27 18:06:46" + "time": "2018-07-13 07:12:17" }, { "name": "zendframework/zend-code", @@ -2299,33 +2361,33 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.5", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -2358,7 +2420,7 @@ "spy", "stub" ], - "time": "2018-02-19 10:16:54" + "time": "2018-08-05 17:53:17" }, { "name": "phpunit/dbunit", @@ -3352,16 +3414,16 @@ }, { "name": "symfony/browser-kit", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "e49a78bcf09ba2e6d03e63e80211f889c037add5" + "reference": "fe44362c97307e7935996cb09d320fcc22619656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/e49a78bcf09ba2e6d03e63e80211f889c037add5", - "reference": "e49a78bcf09ba2e6d03e63e80211f889c037add5", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/fe44362c97307e7935996cb09d320fcc22619656", + "reference": "fe44362c97307e7935996cb09d320fcc22619656", "shasum": "" }, "require": { @@ -3405,20 +3467,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2018-01-03 07:36:31" + "time": "2018-07-26 09:03:18" }, { "name": "symfony/css-selector", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "c5b39674eacd34adedbef78227c57109caa9e318" + "reference": "294611f3a0d265bcf049e2da62cb4f712e3ed927" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/c5b39674eacd34adedbef78227c57109caa9e318", - "reference": "c5b39674eacd34adedbef78227c57109caa9e318", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/294611f3a0d265bcf049e2da62cb4f712e3ed927", + "reference": "294611f3a0d265bcf049e2da62cb4f712e3ed927", "shasum": "" }, "require": { @@ -3458,24 +3520,25 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2018-01-03 07:36:31" + "time": "2018-07-26 09:03:18" }, { "name": "symfony/dom-crawler", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "31ff8f1d7a3de4b43b35ff821e6e223d81a8988b" + "reference": "2fd6513f2dd3b08446da420070084db376c0134c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/31ff8f1d7a3de4b43b35ff821e6e223d81a8988b", - "reference": "31ff8f1d7a3de4b43b35ff821e6e223d81a8988b", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/2fd6513f2dd3b08446da420070084db376c0134c", + "reference": "2fd6513f2dd3b08446da420070084db376c0134c", "shasum": "" }, "require": { "php": ">=5.3.9", + "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { @@ -3514,20 +3577,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2018-01-03 07:36:31" + "time": "2018-07-24 10:05:38" }, { "name": "symfony/process", - "version": "v2.8.34", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "905efe90024caa75a2fc93f54e14b26f2a099d96" + "reference": "4be278e19064c3492095de50c9e375caae569ae1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/905efe90024caa75a2fc93f54e14b26f2a099d96", - "reference": "905efe90024caa75a2fc93f54e14b26f2a099d96", + "url": "https://api.github.com/repos/symfony/process/zipball/4be278e19064c3492095de50c9e375caae569ae1", + "reference": "4be278e19064c3492095de50c9e375caae569ae1", "shasum": "" }, "require": { @@ -3563,7 +3626,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-01-29 08:54:45" + "time": "2018-08-03 09:45:57" } ], "aliases": [], diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index eee4f3efcc..b5c9790a45 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -50,6 +50,8 @@ <ol> <li><a href="#changelog">Changelog</a> <ul> + <li><a href="#v323rc2">Changes since 3.2.3-RC2</a></li> + <li><a href="#v323rc1">Changes since 3.2.3-RC1</a></li> <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> @@ -129,6 +131,39 @@ <div class="inner"> <div class="content"> + <a name="v323rc2"></a><h3>Changes since 3.2.3-RC2</h3> + <h4>Bug</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15504">PHPBB3-15504</a>] - phpBB Debug warning in 3.2.2</li> + </ul> + <h4>Improvement</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15740">PHPBB3-15740</a>] - Terms & Privavy hardcoded</li> + </ul> + + <a name="v323rc1"></a><h3>Changes since 3.2.3-RC1</h3> + <h4>Bug</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11847">PHPBB3-11847</a>] - auth_provider_oauth migration must depend on at least one migration that ensures the module tables exist as expected</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15548">PHPBB3-15548</a>] - Dead link in ACP_COOKIE_SETTINGS_EXPLAIN language entry</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15586">PHPBB3-15586</a>] - When creating a module without the modes array a missing 'module_langname' index is accessed</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15613">PHPBB3-15613</a>] - Notification dropdown said to be not RTL compliant</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15627">PHPBB3-15627</a>] - Improve wording of YES_ACCURATE_PM_BUTTON + EXPLAIN</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15678">PHPBB3-15678</a>] - PHP warning in filesystem.php</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15731">PHPBB3-15731</a>] - Fix acp_search language parameters when deleting index</li> + </ul> + <h4>Improvement</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15630">PHPBB3-15630</a>] - Change <b> to <strong> </li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15633">PHPBB3-15633</a>] - Remove extra space in GROUP_MAX_RECIPIENTS_EXPLAIN</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15657">PHPBB3-15657</a>] - Add core.mcp_queue_get_posts_for_posts_query_before and core.mcp_queue_get_posts_modify_post_row</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15676">PHPBB3-15676</a>] - Display privacy policy & terms of use more prominently</li> + </ul> + <h4>Task</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15677">PHPBB3-15677</a>] - Updated dependencies for 3.2.3-RC2</li> + </ul> + <a name="v322"></a><h3>Changes since 3.2.2</h3> <h4>Bug</h4> <ul> diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index 657e0c29fb..9c2671e085 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -44,7 +44,7 @@ <p> A basic overview of running phpBB can be found in the accompanying <a href="README.html">README</a> file. Please ensure you read that document in addition to this! For more detailed information on using, installing, - updating and converting phpBB you should read <a href="https://www.phpbb.com/support/docs/en/3.1/ug/">the documentation</a> + updating and converting phpBB you should read <a href="https://www.phpbb.com/support/docs/en/3.2/ug/">the documentation</a> available online. </p> </div> diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index f2b87ce7f1..6672353296 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -1707,6 +1707,13 @@ posting_poll_body_options_after * Since: 3.1.4-RC1 * Purpose: Add content after the poll options on creating a poll +posting_preview_content_after +=== +* Locations: + + styles/prosilver/template/posting_preview.html +* Since: 3.2.4-RC1 +* Purpose: Add content after the message content preview + posting_preview_poll_after === * Locations: @@ -1714,6 +1721,13 @@ posting_preview_poll_after * Since: 3.1.7-RC1 * Purpose: Add content after the poll preview block +posting_topic_review_row_content_after +=== +* Locations: + + styles/prosilver/template/posting_topic_review.html +* Since: 3.2.4-RC1 +* Purpose: Add content after the message content in topic review + posting_topic_review_row_post_details_after === * Locations: @@ -1875,6 +1889,13 @@ search_body_search_query_prepend * Since: 3.1.7-RC1 * Purpose: Put content at the top of the search query fields set +search_results_content_after +=== +* Locations: + + styles/prosilver/template/search_results.html +* Since: 3.2.4-RC1 +* Purpose: Add content after the message content in search results + search_results_header_after === * Locations: @@ -2653,6 +2674,13 @@ viewtopic_body_postrow_back2top_prepend * Since: 3.1.8-RC1 * Purpose: Add content to the post's bottom directly before the back to top link +viewtopic_body_postrow_content_after +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html +* Since: 3.2.4-RC1 +* Purpose: Add content after the message content in topics views + viewtopic_body_postrow_custom_fields_after === * Locations: diff --git a/phpBB/docs/sphinx.sample.conf b/phpBB/docs/sphinx.sample.conf index 0a210ecd1a..85cba190d7 100644 --- a/phpBB/docs/sphinx.sample.conf +++ b/phpBB/docs/sphinx.sample.conf @@ -29,7 +29,6 @@ source source_phpbb_{SPHINX_ID}_main AND p.post_id >= $start AND p.post_id <= $end sql_query_post = sql_query_post_index = UPDATE phpbb_sphinx SET max_doc_id = $maxid WHERE counter_id = 1 - sql_query_info = SELECT * FROM phpbb_posts WHERE post_id = $id sql_attr_uint = forum_id sql_attr_uint = topic_id sql_attr_uint = poster_id @@ -72,7 +71,6 @@ index index_phpbb_{SPHINX_ID}_main morphology = none stopwords = min_word_len = 2 - charset_type = utf-8 charset_table = U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF min_prefix_len = 0 min_infix_len = 0 @@ -88,13 +86,11 @@ indexer } searchd { - compat_sphinxql_magics = 0 listen = localhost:9312 log = {DATA_PATH}/log/searchd.log query_log = {DATA_PATH}/log/sphinx-query.log read_timeout = 5 max_children = 30 pid_file = {DATA_PATH}/searchd.pid - max_matches = 20000 binlog_path = {DATA_PATH} } diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index dc4eb66cf8..6c2df8d999 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1270,7 +1270,7 @@ class acp_attachments $row['extension'] = strtolower(trim((string) $row['extension'])); $comment = ($row['attach_comment'] && !$row['in_message']) ? str_replace(array("\n", "\r"), array('<br />', "\n"), $row['attach_comment']) : ''; - $display_cat = $extensions[$row['extension']]['display_cat']; + $display_cat = isset($extensions[$row['extension']]['display_cat']) ? $extensions[$row['extension']]['display_cat'] : ATTACHMENT_CATEGORY_NONE; $l_downloaded_viewed = ($display_cat == ATTACHMENT_CATEGORY_NONE) ? 'DOWNLOAD_COUNTS' : 'VIEWED_COUNTS'; $template->assign_block_vars('attachments', array( diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index 2634ae1874..1f7374a07f 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -295,6 +295,22 @@ class acp_bbcodes $phpbb_log->add('admin', $user->data['user_id'], $user->ip, $log_action, false, array($data['bbcode_tag'])); + /** + * Event after a BBCode has been added or updated + * + * @event core.acp_bbcodes_modify_create_after + * @var string action Type of the action: modify|create + * @var int bbcode_id The id of the added or updated bbcode + * @var array sql_ary Array with bbcode data (read only) + * @since 3.2.4-RC1 + */ + $vars = array( + 'action', + 'bbcode_id', + 'sql_ary', + ); + extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_modify_create_after', compact($vars))); + trigger_error($user->lang[$lang] . adm_back_link($this->u_action)); } else @@ -325,10 +341,28 @@ class acp_bbcodes { if (confirm_box(true)) { + $bbcode_tag = $row['bbcode_tag']; + $db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id"); $cache->destroy('sql', BBCODES_TABLE); $phpbb_container->get('text_formatter.cache')->invalidate(); - $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_BBCODE_DELETE', false, array($row['bbcode_tag'])); + $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_BBCODE_DELETE', false, array($bbcode_tag)); + + /** + * Event after a BBCode has been deleted + * + * @event core.acp_bbcodes_delete_after + * @var string action Type of the action: delete + * @var int bbcode_id The id of the deleted bbcode + * @var string bbcode_tag The tag of the deleted bbcode + * @since 3.2.4-RC1 + */ + $vars = array( + 'action', + 'bbcode_id', + 'bbcode_tag', + ); + extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_delete_after', compact($vars))); if ($request->is_ajax()) { 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_search.php b/phpBB/includes/acp/acp_search.php index 8cad7c927c..538a28a926 100644 --- a/phpBB/includes/acp/acp_search.php +++ b/phpBB/includes/acp/acp_search.php @@ -349,7 +349,7 @@ class acp_search $totaltime = microtime(true) - $starttime; $rows_per_second = $row_count / $totaltime; meta_refresh(1, append_sid($this->u_action . '&action=delete&skip_rows=' . $post_counter . '&hash=' . generate_link_hash('acp_search'))); - trigger_error($user->lang('SEARCH_INDEX_DELETE_REDIRECT', (int) $row_count, $post_counter, $rows_per_second)); + trigger_error($user->lang('SEARCH_INDEX_DELETE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_DELETE_REDIRECT_RATE', $rows_per_second)); } } diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 270d513a26..1457888c9f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -66,33 +66,48 @@ 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 +* @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(bin2hex(random_bytes($num_chars)), 16, 36)), 0, $num_chars); + $range = array_merge(range('A', 'Z'), range(0, 9)); + $size = count($range); + + $output = ''; + for ($i = 0; $i < $num_chars; $i++) + { + $rand = random_int(0, $size-1); + $output .= $range[$rand]; + } + + return $output; } /** * 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 +* @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 = bin2hex(random_bytes($num_chars)); + $range = array_merge(range('A', 'N'), range('P', 'Z'), range(1, 9)); + $size = count($range); - // 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 - $rand_str = str_replace(array('0', 'O'), array('Z', 'Y'), strtoupper(base_convert($rand_str, 16, 34))); + $output = ''; + for ($i = 0; $i < $num_chars; $i++) + { + $rand = random_int(0, $size-1); + $output .= $range[$rand]; + } - return substr($rand_str, 0, $num_chars); + return $output; } /** @@ -100,7 +115,7 @@ function gen_rand_string_friendly($num_chars = 8) */ function unique_id() { - return bin2hex(random_bytes(8)); + return gen_rand_string(32); } /** @@ -2467,7 +2482,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, @@ -2475,6 +2490,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, @@ -2484,7 +2500,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']); @@ -4405,9 +4443,10 @@ function page_header($page_title = '', $display_online_list = false, $item_id = 'U_SEARCH_ACTIVE_TOPICS'=> append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=active_topics'), 'U_DELETE_COOKIES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=delete_cookies'), 'U_CONTACT_US' => ($config['contact_admin_form_enable'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin') : '', - 'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'), + 'U_TEAM' => (!$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 a85a3b67c5..fdd1dc6e32 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -327,6 +327,7 @@ class messenger $subject = $this->subject; $message = $this->msg; + $template = $this->template; /** * Event to modify notification message text before parsing * @@ -336,13 +337,16 @@ class messenger * and the message without sending it * @var string subject The message subject * @var string message The message text + * @var \phpbb\template\template template Template object * @since 3.1.11-RC1 + * @changed 3.2.4-RC1 Added template */ $vars = array( 'method', 'break', 'subject', 'message', + 'template', ); extract($phpbb_dispatcher->trigger_event('core.modify_notification_message', compact($vars))); $this->subject = $subject; diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 245d263720..f7be2d2760 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -461,9 +461,11 @@ function user_delete($mode, $user_ids, $retain_username = true) * @var array user_ids IDs of the deleted user * @var mixed retain_username True if username should be retained * or false if not + * @var array user_rows Array containing data of the deleted users * @since 3.1.0-a1 + * @changed 3.2.4-RC1 Added user_rows */ - $vars = array('mode', 'user_ids', 'retain_username'); + $vars = array('mode', 'user_ids', 'retain_username', 'user_rows'); extract($phpbb_dispatcher->trigger_event('core.delete_user_before', compact($vars))); // Before we begin, we will remove the reports the user issued. diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 71a615e75c..92aa90dec5 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -77,6 +77,22 @@ class ucp_main // If the user can't see any forums, he can't read any posts because fid of 0 is invalid if (!empty($forum_ary)) { + /** + * Modify sql variables before query is processed + * + * @event core.ucp_main_front_modify_sql + * @var string sql_select SQL select + * @var string sql_from SQL from + * @var array forum_ary Forum array + * @since 3.2.4-RC1 + */ + $vars = array( + 'sql_select', + 'sql_from', + 'forum_ary', + ); + extract($phpbb_dispatcher->trigger_event('core.ucp_main_front_modify_sql', compact($vars))); + $sql = "SELECT t.* $sql_select FROM $sql_from WHERE t.topic_type = " . POST_GLOBAL . ' @@ -144,7 +160,7 @@ class ucp_main $folder_img .= '_mine'; } - $template->assign_block_vars('topicrow', array( + $topicrow = array( 'FORUM_ID' => $forum_id, 'TOPIC_ID' => $topic_id, 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), @@ -171,8 +187,30 @@ class ucp_main 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'], 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread', - 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id")) + 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"), ); + + /** + * Add template variables to a front topics row. + * + * @event core.ucp_main_front_modify_template_vars + * @var array topicrow Array containing the template variables for the row + * @var array row Array containing the subscribed forum row data + * @var int forum_id Forum ID + * @var string folder_img Folder image + * @var string folder_alt Alt text for the folder image + * @since 3.2.4-RC1 + */ + $vars = array( + 'topicrow', + 'row', + 'forum_id', + 'folder_img', + 'folder_alt', + ); + extract($phpbb_dispatcher->trigger_event('core.ucp_main_front_modify_template_vars', compact($vars))); + + $template->assign_block_vars('topicrow', $topicrow); } if ($config['load_user_activity']) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index bf18e76568..f35812b90a 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -48,7 +48,6 @@ function compose_pm($id, $mode, $action, $user_folders = array()) $to_group_id = $request->variable('g', 0); $msg_id = $request->variable('p', 0); $draft_id = $request->variable('d', 0); - $lastclick = $request->variable('lastclick', 0); // Reply to all triggered (quote/reply) $reply_to_all = $request->variable('reply_to_all', 0); @@ -80,7 +79,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) $group_helper = $phpbb_container->get('group_helper'); // Was cancel pressed? If so then redirect to the appropriate page - if ($cancel || ($current_time - $lastclick < 2 && $submit)) + if ($cancel) { if ($msg_id) { @@ -1174,8 +1173,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) break; } - $s_hidden_fields = '<input type="hidden" name="lastclick" value="' . $current_time . '" />'; - $s_hidden_fields .= (isset($check_value)) ? '<input type="hidden" name="status_switch" value="' . $check_value . '" />' : ''; + $s_hidden_fields = (isset($check_value)) ? '<input type="hidden" name="status_switch" value="' . $check_value . '" />' : ''; $s_hidden_fields .= ($draft_id || isset($_REQUEST['draft_loaded'])) ? '<input type="hidden" name="draft_loaded" value="' . ((isset($_REQUEST['draft_loaded'])) ? $request->variable('draft_loaded', 0) : $draft_id) . '" />' : ''; $form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !$config['allow_pm_attach'] || !$auth->acl_get('u_pm_attach')) ? '' : ' enctype="multipart/form-data"'; diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index beb440ce76..a36bf619f8 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -159,7 +159,7 @@ class ucp_profile $phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_UPDATE_EMAIL', false, array( 'reportee_id' => $user->data['user_id'], $user->data['username'], - $data['user_email'], + $user->data['user_email'], $data['email'] )); } diff --git a/phpBB/install/phpbbcli.php b/phpBB/install/phpbbcli.php index 611e4ec53b..7d8311ca0b 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.3-RC1'); +define('PHPBB_VERSION', '3.2.3'); $phpbb_root_path = __DIR__ . '/../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php index d365aeb183..41cbd9cb93 100644 --- a/phpBB/language/en/acp/profile.php +++ b/phpBB/language/en/acp/profile.php @@ -161,8 +161,8 @@ $lang = array_merge($lang, array( 'STEP_2_EXPLAIN_EDIT' => 'Here you are able to change some common options.<br /><strong>Please note that changes to profile fields will not affect existing profile fields entered by your users.</strong>', 'STEP_2_TITLE_CREATE' => 'Profile type specific options', 'STEP_2_TITLE_EDIT' => 'Profile type specific options', - 'STEP_3_EXPLAIN_CREATE' => 'Since you have more than one board language installed, you have to fill out the remaining language items too. The profile field will work with the default language enabled, you are able to fill out the remaining language items later too.', - 'STEP_3_EXPLAIN_EDIT' => 'Since you have more than one board language installed, you now can change or add the remaining language items too. The profile field will work with the default language enabled.', + 'STEP_3_EXPLAIN_CREATE' => 'Since you have more than one board language installed, you have to fill out the remaining language items too. If you don’t, then default language setting for this custom profile field will be used, you are able to fill out the remaining language items later too.', + 'STEP_3_EXPLAIN_EDIT' => 'Since you have more than one board language installed, you now can change or add the remaining language items too. If you don’t, then default language setting for this custom profile field will be used.', 'STEP_3_TITLE_CREATE' => 'Remaining language definitions', 'STEP_3_TITLE_EDIT' => 'Language definitions', 'STRING_DEFAULT_VALUE_EXPLAIN' => 'Enter a default phrase to be displayed, a default value. Leave empty if you want to show it empty at the first place.', diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php index c52b71c121..443dbb7fb7 100644 --- a/phpBB/language/en/acp/search.php +++ b/phpBB/language/en/acp/search.php @@ -116,7 +116,10 @@ $lang = array_merge($lang, array( 2 => 'The current rate of indexing is approximately %1$.1f posts per second.<br />Indexing in progress…', ), 'SEARCH_INDEX_DELETE_REDIRECT' => array( - 2 => 'All posts up to post id %2$d have been removed from the search index.<br />Deleting in progress…', + 2 => 'All posts up to post id %2$d have been removed from the search index, of which %1$d posts were within this step.<br />', + ), + 'SEARCH_INDEX_DELETE_REDIRECT_RATE' => array( + 2 => 'The current rate of deleting is approximately %1$.1f posts per second.<br />Deleting in progress…', ), 'SEARCH_INDEX_CREATED' => 'Successfully indexed all posts in the board database.', 'SEARCH_INDEX_REMOVED' => 'Successfully deleted the search index for this backend.', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 5140919dad..213563aea0 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -193,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', @@ -608,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', @@ -732,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/email/newtopic_notify.txt b/phpBB/language/en/email/newtopic_notify.txt index b9416d8e40..12e0bb8393 100644 --- a/phpBB/language/en/email/newtopic_notify.txt +++ b/phpBB/language/en/email/newtopic_notify.txt @@ -6,6 +6,10 @@ You are receiving this notification because you are watching the forum "{FORUM_N {U_FORUM} +To see new topic directly, visit the following link: + +{U_TOPIC} + If you no longer wish to watch this forum you can either click the "Unsubscribe forum" link found in the forum above, or by clicking the following link: {U_STOP_WATCHING_FORUM} 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/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php index 8b773017c5..4b84e4201c 100644 --- a/phpBB/phpbb/avatar/driver/local.php +++ b/phpBB/phpbb/avatar/driver/local.php @@ -158,7 +158,7 @@ class local extends \phpbb\avatar\driver\driver */ protected function get_avatar_list($user) { - $avatar_list = ($this->cache == null) ? false : $this->cache->get('_avatar_local_list'); + $avatar_list = ($this->cache == null) ? false : $this->cache->get('_avatar_local_list_' . $user->data['user_lang']); if ($avatar_list === false) { @@ -198,7 +198,7 @@ class local extends \phpbb\avatar\driver\driver if ($this->cache != null) { - $this->cache->put('_avatar_local_list', $avatar_list, 86400); + $this->cache->put('_avatar_local_list_' . $user->data['user_lang'], $avatar_list, 86400); } } diff --git a/phpBB/phpbb/cache/driver/apcu.php b/phpBB/phpbb/cache/driver/apcu.php index 40192e4026..c96cf0de57 100644 --- a/phpBB/phpbb/cache/driver/apcu.php +++ b/phpBB/phpbb/cache/driver/apcu.php @@ -25,7 +25,11 @@ class apcu extends \phpbb\cache\driver\memory */ function purge() { - apcu_clear_cache(); + /* + * Use an iterator to selectively delete our cache entries without disturbing + * any other cache users (e.g. other phpBB boards hosted on this server) + */ + apcu_delete(new \APCUIterator('#^' . $this->key_prefix . '#')); parent::purge(); } diff --git a/phpBB/phpbb/cache/driver/memory.php b/phpBB/phpbb/cache/driver/memory.php index 052f40c243..eba9549877 100644 --- a/phpBB/phpbb/cache/driver/memory.php +++ b/phpBB/phpbb/cache/driver/memory.php @@ -51,10 +51,11 @@ abstract class memory extends \phpbb\cache\driver\base function load() { // grab the global cache - $this->vars = $this->_read('global'); + $data = $this->_read('global'); - if ($this->vars !== false) + if ($data !== false) { + $this->vars = $data; return true; } diff --git a/phpBB/phpbb/db/driver/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php index de81a6a0c8..a4dcac5966 100644 --- a/phpBB/phpbb/db/driver/mssqlnative.php +++ b/phpBB/phpbb/db/driver/mssqlnative.php @@ -268,7 +268,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base unset($row['line2'], $row['line3']); } } - return (count($row)) ? $row : false; + return ($row !== null) ? $row : false; } /** diff --git a/phpBB/phpbb/db/migration/data/v310/auth_provider_oauth.php b/phpBB/phpbb/db/migration/data/v310/auth_provider_oauth.php index 508a31fba9..1e2024a071 100644 --- a/phpBB/phpbb/db/migration/data/v310/auth_provider_oauth.php +++ b/phpBB/phpbb/db/migration/data/v310/auth_provider_oauth.php @@ -17,7 +17,12 @@ class auth_provider_oauth extends \phpbb\db\migration\migration { public function effectively_installed() { - return $this->db_tools->sql_table_exists($this->table_prefix . 'auth_provider_oauth'); + return $this->db_tools->sql_table_exists($this->table_prefix . 'oauth_tokens'); + } + + static public function depends_on() + { + return array('\phpbb\db\migration\data\v30x\release_3_0_0'); } public function update_schema() diff --git a/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php b/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php index a52067f484..804adc4490 100644 --- a/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php +++ b/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php @@ -32,10 +32,7 @@ class add_help_phpbb extends \phpbb\db\migration\migration return array( array('config.add', array('help_send_statistics', true)), array('config.add', array('help_send_statistics_time', 0)), - array('if', array( - array('module.exists', array('acp', false, 'ACP_SEND_STATISTICS')), - array('module.remove', array('acp', false, 'ACP_SEND_STATISTICS')), - )), + array('module.remove', array('acp', false, 'ACP_SEND_STATISTICS')), array('module.add', array( 'acp', 'ACP_SERVER_CONFIGURATION', diff --git a/phpBB/phpbb/db/migration/data/v320/remove_outdated_media.php b/phpBB/phpbb/db/migration/data/v320/remove_outdated_media.php index 98b1c2d039..88fe59ccc9 100644 --- a/phpBB/phpbb/db/migration/data/v320/remove_outdated_media.php +++ b/phpBB/phpbb/db/migration/data/v320/remove_outdated_media.php @@ -85,13 +85,11 @@ class remove_outdated_media extends \phpbb\db\migration\migration WHERE ' . $this->db->sql_in_set('group_id', $group_ids); } - $result = $this->db->sql_query($sql); - $this->db->sql_freeresult($result); + $this->db->sql_query($sql); // delete the now empty, outdated media extension groups $sql = 'DELETE FROM ' . EXTENSION_GROUPS_TABLE . ' WHERE ' . $this->db->sql_in_set('group_id', $group_ids); - $result = $this->db->sql_query($sql); - $this->db->sql_freeresult($result); + $this->db->sql_query($sql); } } diff --git a/phpBB/phpbb/db/migration/data/v32x/v323.php b/phpBB/phpbb/db/migration/data/v32x/v323.php new file mode 100644 index 0000000000..1ec28ceb37 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v32x/v323.php @@ -0,0 +1,37 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v32x; + +class v323 extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return phpbb_version_compare($this->config['version'], '3.2.3', '>='); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v32x\v323rc2', + ); + + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.2.3')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v32x/v323rc2.php b/phpBB/phpbb/db/migration/data/v32x/v323rc2.php new file mode 100644 index 0000000000..32235ee067 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v32x/v323rc2.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 v323rc2 extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return phpbb_version_compare($this->config['version'], '3.2.3-RC2', '>='); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v32x\v323rc1', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.2.3-RC2')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php index 3893935723..e5133c8152 100644 --- a/phpBB/phpbb/db/migration/tool/module.php +++ b/phpBB/phpbb/db/migration/tool/module.php @@ -341,7 +341,7 @@ class module implements \phpbb\db\migration\tool\tool_interface } // Clear the Modules Cache - $this->cache->destroy("_modules_$class"); + $this->module_manager->remove_cache_file($class); } /** @@ -425,7 +425,7 @@ class module implements \phpbb\db\migration\tool\tool_interface $this->module_manager->delete_module($module_id, $class); } - $this->cache->destroy("_modules_$class"); + $this->module_manager->remove_cache_file($class); } } diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index a425df56e8..2b0c66fc58 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -760,7 +760,7 @@ class migrator $condition = $parameters[0]; - if (!$condition) + if (!$condition || (is_array($condition) && !$this->run_step($condition, $last_result, $reverse))) { return false; } diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php index ac1a1a1733..8c1ce8bde2 100644 --- a/phpBB/phpbb/di/container_builder.php +++ b/phpBB/phpbb/di/container_builder.php @@ -143,6 +143,13 @@ class container_builder { if ($this->use_extensions) { + $autoload_cache = new ConfigCache($this->get_autoload_filename(), defined('DEBUG')); + if (!$autoload_cache->isFresh()) + { + // autoload cache should be refreshed + $this->load_extensions(); + } + require($this->get_autoload_filename()); } diff --git a/phpBB/phpbb/event/php_exporter.php b/phpBB/phpbb/event/php_exporter.php index 64d1e429b7..71c94a681d 100644 --- a/phpBB/phpbb/event/php_exporter.php +++ b/phpBB/phpbb/event/php_exporter.php @@ -264,7 +264,30 @@ class php_exporter // Find event description line $description_line_num = $this->find_description(); - $description = substr(trim($this->file_lines[$description_line_num]), strlen('* ')); + $description_lines = array(); + + while (true) + { + $description_line = substr(trim($this->file_lines[$description_line_num]), strlen('*')); + $description_line = trim(str_replace("\t", " ", $description_line)); + + // Reached end of description if line is a tag + if (strlen($description_line) && $description_line[0] == '@') + { + break; + } + + $description_lines[] = $description_line; + $description_line_num++; + } + + // If there is an empty line between description and first tag, remove it + if (!strlen(end($description_lines))) + { + array_pop($description_lines); + } + + $description = trim(implode('<br/>', $description_lines)); if (isset($this->events[$this->current_event])) { 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/module/requirements/task/check_update.php b/phpBB/phpbb/install/module/requirements/task/check_update.php index cd66ffc8f9..4eb2c6d75e 100644 --- a/phpBB/phpbb/install/module/requirements/task/check_update.php +++ b/phpBB/phpbb/install/module/requirements/task/check_update.php @@ -122,8 +122,11 @@ class check_update extends task_base // Check for a valid update directory if (!$this->filesystem->exists($update_files) || !$this->filesystem->is_readable($update_files)) { - $this->iohandler->add_warning_message('UPDATE_FILES_NOT_FOUND'); - $this->set_test_passed(false); + if ($this->iohandler->get_input('update_type', 'all') === 'all') + { + $this->iohandler->add_warning_message('UPDATE_FILES_NOT_FOUND'); + $this->set_test_passed(false); + } // If there are no update files, we can't check the version etc // However, we can let the users run migrations if they really want to... diff --git a/phpBB/phpbb/notification/method/messenger_base.php b/phpBB/phpbb/notification/method/messenger_base.php index 32e79aa936..f82017b70e 100644 --- a/phpBB/phpbb/notification/method/messenger_base.php +++ b/phpBB/phpbb/notification/method/messenger_base.php @@ -87,7 +87,7 @@ abstract class messenger_base extends \phpbb\notification\method\base $banned_users = phpbb_get_banned_user_ids($user_ids); // Load all the users we need - $this->user_loader->load_users($user_ids); + $this->user_loader->load_users(array_diff($user_ids, $banned_users), array(USER_IGNORE)); // Load the messenger if (!class_exists('messenger')) @@ -107,7 +107,7 @@ abstract class messenger_base extends \phpbb\notification\method\base $user = $this->user_loader->get_user($notification->user_id); - if ($user['user_type'] == USER_IGNORE || ($user['user_type'] == USER_INACTIVE && $user['user_inactive_reason'] == INACTIVE_MANUAL) || in_array($notification->user_id, $banned_users)) + if ($user['user_type'] == USER_INACTIVE && $user['user_inactive_reason'] == INACTIVE_MANUAL) { continue; } diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php index e2eeb5f7f3..d780442f89 100644 --- a/phpBB/phpbb/search/fulltext_sphinx.php +++ b/phpBB/phpbb/search/fulltext_sphinx.php @@ -292,7 +292,6 @@ class fulltext_sphinx AND p.post_id >= $start AND p.post_id <= $end'), array('sql_query_post', ''), array('sql_query_post_index', 'UPDATE ' . SPHINX_TABLE . ' SET max_doc_id = $maxid WHERE counter_id = 1'), - array('sql_query_info', 'SELECT * FROM ' . POSTS_TABLE . ' WHERE post_id = $id'), array('sql_attr_uint', 'forum_id'), array('sql_attr_uint', 'topic_id'), array('sql_attr_uint', 'poster_id'), @@ -333,7 +332,6 @@ class fulltext_sphinx array('morphology', 'none'), array('stopwords', ''), array('min_word_len', '2'), - array('charset_type', 'utf-8'), array('charset_table', 'U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF'), array('min_prefix_len', '0'), array('min_infix_len', '0'), @@ -346,14 +344,12 @@ class fulltext_sphinx array('mem_limit', $this->config['fulltext_sphinx_indexer_mem_limit'] . 'M'), ), 'searchd' => array( - array('compat_sphinxql_magics' , '0'), array('listen' , ($this->config['fulltext_sphinx_host'] ? $this->config['fulltext_sphinx_host'] : 'localhost') . ':' . ($this->config['fulltext_sphinx_port'] ? $this->config['fulltext_sphinx_port'] : '9312')), array('log', $this->config['fulltext_sphinx_data_path'] . 'log/searchd.log'), array('query_log', $this->config['fulltext_sphinx_data_path'] . 'log/sphinx-query.log'), array('read_timeout', '5'), array('max_children', '30'), array('pid_file', $this->config['fulltext_sphinx_data_path'] . 'searchd.pid'), - array('max_matches', (string) SPHINX_MAX_MATCHES), array('binlog_path', $this->config['fulltext_sphinx_data_path']), ), ); diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index de9345ca85..80934dc411 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -1614,13 +1614,15 @@ class session return; } + // Do not update the session page for ajax requests, so the view online still works as intended + $page_changed = $this->update_session_page && $this->data['session_page'] != $this->page['page'] && !$request->is_ajax(); + // Only update session DB a minute or so after last update or if page changes - if ($this->time_now - ((isset($this->data['session_time'])) ? $this->data['session_time'] : 0) > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page'])) + if ($this->time_now - (isset($this->data['session_time']) ? $this->data['session_time'] : 0) > 60 || $page_changed) { $sql_ary = array('session_time' => $this->time_now); - // Do not update the session page for ajax requests, so the view online still works as intended - if ($this->update_session_page && !$request->is_ajax()) + if ($page_changed) { $sql_ary['session_page'] = substr($this->page['page'], 0, 199); $sql_ary['session_forum_id'] = $this->page['forum']; diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php index de583d3224..2ba6d185ad 100644 --- a/phpBB/phpbb/template/context.php +++ b/phpBB/phpbb/template/context.php @@ -274,6 +274,11 @@ class context { $name = substr($blocks[$i], 0, $pos); + if (empty($block[$name])) + { + return array(); + } + if (strpos($blocks[$i], '[]') === $pos) { $index = count($block[$name]) - 1; @@ -286,6 +291,11 @@ class context else { $name = $blocks[$i]; + if (empty($block[$name])) + { + return array(); + } + $index = count($block[$name]) - 1; } $block = $block[$name]; diff --git a/phpBB/phpbb/template/twig/extension.php b/phpBB/phpbb/template/twig/extension.php index 1aa7717470..f6f8e03ca2 100644 --- a/phpBB/phpbb/template/twig/extension.php +++ b/phpBB/phpbb/template/twig/extension.php @@ -172,7 +172,7 @@ class extension extends \Twig_Extension $context_vars = $this->context->get_root_ref(); - if (isset($context_vars['L_' . $key])) + if (is_string($key) && isset($context_vars['L_' . $key])) { return $context_vars['L_' . $key]; } diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php index 5899dff2f5..ca0e5872e4 100644 --- a/phpBB/phpbb/user.php +++ b/phpBB/phpbb/user.php @@ -189,6 +189,9 @@ class user extends \phpbb\session /** * Event to load language files and modify user data on every page * + * Note: To load language file with this event, see description + * of lang_set_ext variable. + * * @event core.user_setup * @var array user_data Array with user's data row * @var string user_lang_name Basename of the user's langauge diff --git a/phpBB/phpbb/user_loader.php b/phpBB/phpbb/user_loader.php index 294f5208d5..9297450f3e 100644 --- a/phpBB/phpbb/user_loader.php +++ b/phpBB/phpbb/user_loader.php @@ -64,8 +64,9 @@ class user_loader * Load user helper * * @param array $user_ids + * @param array $ignore_types user types to ignore */ - public function load_users(array $user_ids) + public function load_users(array $user_ids, array $ignore_types = array()) { $user_ids[] = ANONYMOUS; @@ -79,7 +80,8 @@ class user_loader { $sql = 'SELECT * FROM ' . $this->users_table . ' - WHERE ' . $this->db->sql_in_set('user_id', $user_ids); + WHERE ' . $this->db->sql_in_set('user_id', $user_ids) . ' + AND ' . $this->db->sql_in_set('user_type', $ignore_types, true, true); $result = $this->db->sql_query($sql); while ($row = $this->db->sql_fetchrow($result)) diff --git a/phpBB/posting.php b/phpBB/posting.php index 3530bb5048..d97a22209f 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -33,7 +33,6 @@ $post_id = $request->variable('p', 0); $topic_id = $request->variable('t', 0); $forum_id = $request->variable('f', 0); $draft_id = $request->variable('d', 0); -$lastclick = $request->variable('lastclick', 0); $preview = (isset($_POST['preview'])) ? true : false; $save = (isset($_POST['save'])) ? true : false; @@ -68,7 +67,6 @@ $current_time = time(); * @var int topic_id ID of the topic * @var int forum_id ID of the forum * @var int draft_id ID of the draft -* @var int lastclick Timestamp of when the form was last loaded * @var bool submit Whether or not the form has been submitted * @var bool preview Whether or not the post is being previewed * @var bool save Whether or not a draft is being saved @@ -85,13 +83,13 @@ $current_time = time(); * language keys. * @since 3.1.0-a1 * @changed 3.1.2-RC1 Removed 'delete' var as it does not exist +* @changed 3.2.4-RC1 Remove unused 'lastclick' var */ $vars = array( 'post_id', 'topic_id', 'forum_id', 'draft_id', - 'lastclick', 'submit', 'preview', 'save', @@ -354,7 +352,6 @@ switch ($mode) * @var int topic_id ID of the topic * @var int forum_id ID of the forum * @var int draft_id ID of the draft -* @var int lastclick Timestamp of when the form was last loaded * @var bool submit Whether or not the form has been submitted * @var bool preview Whether or not the post is being previewed * @var bool save Whether or not a draft is being saved @@ -370,13 +367,13 @@ switch ($mode) * @var array post_data All post data from database * @since 3.1.3-RC1 * @changed 3.1.10-RC1 Added post_data +* @changed 3.2.4-RC1 Remove unused 'lastclick' var */ $vars = array( 'post_id', 'topic_id', 'forum_id', 'draft_id', - 'lastclick', 'submit', 'preview', 'save', @@ -1762,7 +1759,6 @@ if ($config['enable_post_confirm'] && !$user->data['is_registered'] && (isset($c } $s_hidden_fields = ($mode == 'reply' || $mode == 'quote') ? '<input type="hidden" name="topic_cur_post_id" value="' . $post_data['topic_last_post_id'] . '" />' : ''; -$s_hidden_fields .= '<input type="hidden" name="lastclick" value="' . $current_time . '" />'; $s_hidden_fields .= ($draft_id || isset($_REQUEST['draft_loaded'])) ? '<input type="hidden" name="draft_loaded" value="' . $request->variable('draft_loaded', $draft_id) . '" />' : ''; if ($mode == 'edit') diff --git a/phpBB/styles/prosilver/template/mcp_ban.html b/phpBB/styles/prosilver/template/mcp_ban.html index 5b798d9b6c..f6e4620ad8 100644 --- a/phpBB/styles/prosilver/template/mcp_ban.html +++ b/phpBB/styles/prosilver/template/mcp_ban.html @@ -1,8 +1,6 @@ <!-- INCLUDE mcp_header.html --> -<script type="text/javascript"> -// <![CDATA[ - +<script> var ban_length = new Array(); ban_length[-1] = ''; var ban_reason = new Array(); @@ -34,8 +32,6 @@ document.getElementById('unbangivereason').innerHTML = ''; } } - -// ]]> </script> <form id="mcp_ban" method="post" action="{U_ACTION}"> diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html index b8080a6be3..2d33849cf0 100644 --- a/phpBB/styles/prosilver/template/navbar_header.html +++ b/phpBB/styles/prosilver/template/navbar_header.html @@ -123,11 +123,13 @@ <i class="icon fa-sliders fa-fw" aria-hidden="true"></i><span>{L_PROFILE}</span> </a> </li> - <li> - <a href="{U_USER_PROFILE}" title="{L_READ_PROFILE}" role="menuitem"> - <i class="icon fa-user fa-fw" aria-hidden="true"></i><span>{L_READ_PROFILE}</span> - </a> - </li> + <!-- IF U_USER_PROFILE --> + <li> + <a href="{U_USER_PROFILE}" title="{L_READ_PROFILE}" role="menuitem"> + <i class="icon fa-user fa-fw" aria-hidden="true"></i><span>{L_READ_PROFILE}</span> + </a> + </li> + <!-- ENDIF --> <!-- EVENT navbar_header_profile_list_after --> diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index b01b0bb213..bdff1a0c05 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">{{ lang('PRIVACY_LINK') }}</span> + </a> + | + <a class="footer-link" href="{{ U_TERMS_USE }}" title="{{ lang('TERMS_LINK') }}" role="menuitem"> + <span class="footer-link-text">{{ lang('TERMS_LINK') }}</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}"> @@ -40,13 +63,13 @@ <!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF --> </div> -<script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF --> -<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> +<script src="{T_JQUERY_LINK}"></script> +<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF --> +<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> <!-- INCLUDEJS forum_fn.js --> <!-- INCLUDEJS ajax.js --> <!-- IF S_ALLOW_CDN --> - <script type="text/javascript"> + <script> (function($){ var $fa_cdn = $('head').find('link[rel="stylesheet"]').first(), $span = $('<span class="fa" style="display:none"></span>').appendTo('body'); @@ -78,7 +101,7 @@ "message": "{LA_COOKIE_CONSENT_MSG}", "dismiss": "{LA_COOKIE_CONSENT_OK}", "link": "{LA_COOKIE_CONSENT_INFO}", - "href": "{LA_COOKIE_CONSENT_HREF}" + "href": "{UA_PRIVACY}" } }); }); diff --git a/phpBB/styles/prosilver/template/plupload.html b/phpBB/styles/prosilver/template/plupload.html index fc663118c1..1eb84372e8 100644 --- a/phpBB/styles/prosilver/template/plupload.html +++ b/phpBB/styles/prosilver/template/plupload.html @@ -1,5 +1,4 @@ -<script type="text/javascript"> -//<![CDATA[ +<script> phpbb.plupload = { i18n: { 'b': '{LA_BYTES_SHORT}', @@ -63,7 +62,6 @@ phpbb.plupload = { maxFiles: {MAX_ATTACHMENTS}, data: {S_ATTACH_DATA}, } -//]]> </script> <!-- INCLUDEJS {T_ASSETS_PATH}/plupload/plupload.full.min.js --> <!-- INCLUDEJS {T_ASSETS_PATH}/javascript/plupload.js --> diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html index 14185ed66b..122afdf978 100644 --- a/phpBB/styles/prosilver/template/posting_buttons.html +++ b/phpBB/styles/prosilver/template/posting_buttons.html @@ -1,6 +1,5 @@ -<script type="text/javascript"> -// <![CDATA[ +<script> var form_name = 'postform'; var text_name = <!-- IF $SIG_EDIT -->'signature'<!-- ELSE -->'message'<!-- ENDIF -->; var load_draft = false; @@ -46,8 +45,6 @@ document.getElementById('bbpalette').value = '{LA_FONT_COLOR}'; } } - -// ]]> </script> <!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js --> diff --git a/phpBB/styles/prosilver/template/posting_preview.html b/phpBB/styles/prosilver/template/posting_preview.html index aac117c090..781d0de06b 100644 --- a/phpBB/styles/prosilver/template/posting_preview.html +++ b/phpBB/styles/prosilver/template/posting_preview.html @@ -31,6 +31,8 @@ <div class="content">{PREVIEW_MESSAGE}</div> + <!-- EVENT posting_preview_content_after --> + <!-- IF .attachment --> <dl class="attachbox"> <dt>{L_ATTACHMENTS}</dt> diff --git a/phpBB/styles/prosilver/template/posting_smilies.html b/phpBB/styles/prosilver/template/posting_smilies.html index 54e82a58bc..b5794d5aff 100644 --- a/phpBB/styles/prosilver/template/posting_smilies.html +++ b/phpBB/styles/prosilver/template/posting_smilies.html @@ -1,10 +1,8 @@ <!-- INCLUDE simple_header.html --> -<script type="text/javascript"> -// <![CDATA[ +<script> var form_name = opener.form_name; var text_name = opener.text_name; -// ]]> </script> <!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js --> diff --git a/phpBB/styles/prosilver/template/posting_topic_review.html b/phpBB/styles/prosilver/template/posting_topic_review.html index 857c686774..93c4484ff8 100644 --- a/phpBB/styles/prosilver/template/posting_topic_review.html +++ b/phpBB/styles/prosilver/template/posting_topic_review.html @@ -5,10 +5,8 @@ </h3> <div id="topicreview" class="topicreview"> -<script type="text/javascript"> -// <![CDATA[ +<script> bbcodeEnabled = {S_BBCODE_ALLOWED}; -// ]]> </script> <!-- BEGIN topic_review_row --> @@ -62,6 +60,8 @@ <div class="content">{topic_review_row.MESSAGE}</div> + <!-- EVENT posting_topic_review_row_content_after --> + <!-- IF topic_review_row.S_HAS_ATTACHMENTS --> <dl class="attachbox"> <dt>{L_ATTACHMENTS}</dt> diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html index 6bc5c72a87..b6755e3d4a 100644 --- a/phpBB/styles/prosilver/template/search_results.html +++ b/phpBB/styles/prosilver/template/search_results.html @@ -194,6 +194,7 @@ <div class="postbody"> <h3><a href="{searchresults.U_VIEW_POST}">{searchresults.POST_SUBJECT}</a></h3> <div class="content">{searchresults.MESSAGE}</div> + <!-- EVENT search_results_content_after --> </div> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html index 614c137835..907ddd97ba 100644 --- a/phpBB/styles/prosilver/template/simple_footer.html +++ b/phpBB/styles/prosilver/template/simple_footer.html @@ -24,9 +24,9 @@ </div> </div> -<script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF --> -<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> +<script src="{T_JQUERY_LINK}"></script> +<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF --> +<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> <!-- INCLUDEJS forum_fn.js --> <!-- INCLUDEJS ajax.js --> diff --git a/phpBB/styles/prosilver/template/ucp_agreement.html b/phpBB/styles/prosilver/template/ucp_agreement.html index 943774c6ec..ace65254d7 100644 --- a/phpBB/styles/prosilver/template/ucp_agreement.html +++ b/phpBB/styles/prosilver/template/ucp_agreement.html @@ -3,8 +3,7 @@ <!-- IF S_SHOW_COPPA or S_REGISTRATION --> <!-- IF S_LANG_OPTIONS --> -<script type="text/javascript"> -// <![CDATA[ +<script> /** * Change language */ @@ -14,8 +13,6 @@ document.forms['register'].change_lang.value = lang_iso; document.forms['register'].submit(); } - -// ]]> </script> <form method="post" action="{S_UCP_ACTION}" id="register"> diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html index e97befc552..6362a0b824 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_history.html +++ b/phpBB/styles/prosilver/template/ucp_pm_history.html @@ -6,10 +6,8 @@ <!-- EVENT ucp_pm_history_review_before --> <div id="topicreview" class="topicreview"> - <script type="text/javascript"> - // <![CDATA[ + <script> bbcodeEnabled = {S_BBCODE_ALLOWED}; - // ]]> </script> <!-- BEGIN history_row --> <div class="post <!-- IF history_row.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->"> diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html index 4cd9f6655b..1650705d4b 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_personal.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html @@ -85,8 +85,7 @@ </fieldset> </form> -<script type="text/javascript"> -// <![CDATA[ +<script> var date_format = '{A_DATE_FORMAT}'; var default_dateformat = '{A_DEFAULT_DATEFORMAT}'; @@ -118,7 +117,6 @@ } window.onload = customDates; -// ]]> </script> <!-- INCLUDE ucp_footer.html --> diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html index 38413addba..bf39990c35 100644 --- a/phpBB/styles/prosilver/template/ucp_register.html +++ b/phpBB/styles/prosilver/template/ucp_register.html @@ -1,7 +1,6 @@ <!-- INCLUDE overall_header.html --> -<script type="text/javascript"> -// <![CDATA[ +<script> /** * Change language */ @@ -11,7 +10,6 @@ document.forms['register'].change_lang.value = lang_iso; document.forms['register'].submit.click(); } -// ]]> </script> <form id="register" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}> diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index a9136e1810..8d7e26f099 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -326,6 +326,8 @@ <div class="content">{postrow.MESSAGE}</div> + <!-- EVENT viewtopic_body_postrow_content_after --> + <!-- IF postrow.S_HAS_ATTACHMENTS --> <dl class="attachbox"> <dt> diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 348355e8c4..a0dc5e043b 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 { @@ -1267,6 +1274,10 @@ ul.linklist:after, width: 50px; } +.dropdown .clone.hidden { + display: none; +} + .dropdown .clone.hidden + li.separator { display: none; } 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/viewforum.php b/phpBB/viewforum.php index 04a39e83d5..416ffe3d90 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -506,7 +506,7 @@ if ($forum_data['forum_type'] == FORUM_POST) 'WHERE' => '(t.forum_id = ' . $forum_id . ' AND t.topic_type = ' . POST_ANNOUNCE . ') OR - (' . $db->sql_in_set('t.forum_id', $g_forum_ary) . ' + (' . $db->sql_in_set('t.forum_id', $g_forum_ary, false, true) . ' AND t.topic_type = ' . POST_GLOBAL . ')', 'ORDER_BY' => 't.topic_time DESC', diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 3c25c3b037..c1746e0676 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -998,6 +998,29 @@ if (!empty($topic_data['poll_start'])) 'total_votes' => array_sum($vote_counts), 'can_vote' => !count($valid_user_votes) || ($auth->acl_get('f_votechg', $forum_id) && $topic_data['poll_vote_change']), ); + + /** + * Event to manipulate the poll data sent by AJAX response + * + * @event core.viewtopic_modify_poll_ajax_data + * @var array data JSON response data + * @var array valid_user_votes Valid user votes + * @var array vote_counts Vote counts + * @var int forum_id Forum ID + * @var array topic_data Topic data + * @var array poll_info Array with the poll information + * @since 3.2.4-RC1 + */ + $vars = array( + 'data', + 'valid_user_votes', + 'vote_counts', + 'forum_id', + 'topic_data', + 'poll_info', + ); + extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_poll_ajax_data', compact($vars))); + $json_response = new \phpbb\json_response(); $json_response->send($data); } @@ -2249,7 +2272,6 @@ if ($s_can_vote || $s_quick_reply) $qr_hidden_fields = array( 'topic_cur_post_id' => (int) $topic_data['topic_last_post_id'], - 'lastclick' => (int) time(), 'topic_id' => (int) $topic_data['topic_id'], 'forum_id' => (int) $forum_id, ); diff --git a/tests/cache/apcu_driver_test.php b/tests/cache/apcu_driver_test.php index 9de1d82a15..57f640c313 100644 --- a/tests/cache/apcu_driver_test.php +++ b/tests/cache/apcu_driver_test.php @@ -49,10 +49,27 @@ class phpbb_cache_apcu_driver_test extends phpbb_cache_common_test_case protected function setUp() { + global $phpbb_container, $phpbb_root_path; + parent::setUp(); + $phpbb_container = new phpbb_mock_container_builder(); + $phpbb_container->setParameter('core.cache_dir', $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/'); + $this->driver = new \phpbb\cache\driver\apcu; $this->driver->purge(); } + + public function test_purge() + { + /* add a cache entry which does not match our key */ + $foreign_key = 'test_' . $this->driver->key_prefix . 'test'; + $this->assertSame(true, apcu_store($foreign_key, 0, 600)); + $this->assertSame(true, apcu_exists($foreign_key)); + + parent::test_purge(); + + $this->assertSame(true, apcu_exists($foreign_key)); + } } diff --git a/tests/event/fixtures/extra_description.test b/tests/event/fixtures/extra_description.test index ce8f97ce89..e93a1044ac 100644 --- a/tests/event/fixtures/extra_description.test +++ b/tests/event/fixtures/extra_description.test @@ -3,7 +3,7 @@ /** * Description * -* NOTE: This will not be exported +* NOTE: This will also be exported * * @event extra_description.dispatch * @since 3.1.0-b2 diff --git a/tests/event/php_exporter_test.php b/tests/event/php_exporter_test.php index 21dbb1e1d4..c6670e1340 100644 --- a/tests/event/php_exporter_test.php +++ b/tests/event/php_exporter_test.php @@ -57,7 +57,7 @@ class phpbb_event_php_exporter_test extends phpbb_test_case 'file' => 'extra_description.test', 'arguments' => array(), 'since' => '3.1.0-b2', - 'description' => 'Description', + 'description' => 'Description<br/><br/>NOTE: This will also be exported', ), ), ), diff --git a/tests/migrator/get_callable_from_step_test.php b/tests/migrator/get_callable_from_step_test.php new file mode 100644 index 0000000000..af636f5d21 --- /dev/null +++ b/tests/migrator/get_callable_from_step_test.php @@ -0,0 +1,136 @@ +<?php +/** + * + * This file is part of the phpBB Forum Software package. + * + * @copyright (c) phpBB Limited <https://www.phpbb.com> + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +class get_callable_from_step_test extends phpbb_database_test_case +{ + public function setUp() + { + global $phpbb_root_path, $php_ext, $table_prefix, $phpbb_log; + + parent::setUp(); + + $phpbb_log = $this->getMockBuilder('\phpbb\log\log')->disableOriginalConstructor()->getMock(); + $db = $this->new_dbal(); + $factory = new \phpbb\db\tools\factory(); + $cache_service = $this->getMockBuilder('\phpbb\cache\service')->disableOriginalConstructor()->getMock(); + $user = $this->getMockBuilder('\phpbb\user')->disableOriginalConstructor()->getMock(); + $module_manager = new \phpbb\module\module_manager( + $this->getMockBuilder('\phpbb\cache\driver\dummy')->disableOriginalConstructor()->getMock(), + $db, + new phpbb_mock_extension_manager($phpbb_root_path), + 'phpbb_modules', + $phpbb_root_path, + $php_ext + ); + $module_tools = new \phpbb\db\migration\tool\module($db, $cache_service, $user, $module_manager, $phpbb_root_path, $php_ext, 'phpbb_modules'); + $this->migrator = new \phpbb\db\migrator( + new phpbb_mock_container_builder(), + new \phpbb\config\config(array()), + $db, + $factory->get($db), + 'phpbb_migrations', + $phpbb_root_path, + $php_ext, + $table_prefix, + array($module_tools), + new \phpbb\db\migration\helper() + ); + + if (!$module_tools->exists('acp', 0, 'new_module_langname')) + { + $module_tools->add('acp', 0, array( + 'module_basename' => 'new_module_basename', + 'module_langname' => 'new_module_langname', + 'module_mode' => 'settings', + 'module_auth' => '', + 'module_display' => true, + 'before' => false, + 'after' => false, + )); + $this->module_added = true; + } + } + + public function getDataSet() + { + return $this->createXMLDataSet(dirname(__FILE__).'/../dbal/fixtures/migrator.xml'); + } + + public function get_callable_from_step_provider() + { + return array( + array( + array('if', array( + false, + array('permission.add', array('some_data')), + )), + true, // expects false + ), + array( + array('if', array( + array('module.exists', array( + 'mcp', + 'RANDOM_PARENT', + 'RANDOM_MODULE' + )), + array('permission.add', array('some_data')), + )), + true, // expects false + ), + array( + array('if', array( + array('module.exists', array( + 'acp', + 0, + 'new_module_langname' + )), + array('module.add', array( + 'acp', + 0, + 'module_basename' => 'new_module_basename2', + 'module_langname' => 'new_module_langname2', + 'module_mode' => 'settings', + 'module_auth' => '', + 'module_display' => true, + 'before' => false, + 'after' => false, + )), + )), + false, // expects false + ), + ); + } + + /** + * @dataProvider get_callable_from_step_provider + */ + public function test_get_callable_from_step($step, $expects_false) + { + if ($expects_false) + { + $this->assertFalse($this->call_get_callable_from_step($step)); + } + else + { + $this->assertNotFalse($this->call_get_callable_from_step($step)); + } + } + + protected function call_get_callable_from_step($step) + { + $class = new ReflectionClass($this->migrator); + $method = $class->getMethod('get_callable_from_step'); + $method->setAccessible(true); + return $method->invokeArgs($this->migrator, array($step)); + } +} diff --git a/tests/template/context_test.php b/tests/template/context_test.php new file mode 100644 index 0000000000..52ce6c8fde --- /dev/null +++ b/tests/template/context_test.php @@ -0,0 +1,96 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +class context_test extends phpbb_test_case +{ + protected $context; + protected function setUp() + { + $this->context = new \phpbb\template\context(); + + for ($i = 0; $i < 10; $i++) + { + $this->context->assign_block_vars('block' . $i, array( + 'FOO' . $i => 'foo' . $i, + 'BAR' . $i => 'bar' . $i, + )); + + for ($j = 0; $j < 10; $j++) + { + $this->context->assign_block_vars('block' . $i . '.subblock', array( + 'SUBFOO' => 'subfoo' . $j, + 'SUBBAR' => 'subbar' . $j, + )); + + for ($k = 0; $k < 10; $k++) + { + $this->context->assign_block_vars('block' . $i . '.subblock.subsubblock', array( + 'SUBSUBFOO' => 'subsubfoo' . $k, + 'SUBSUBBAR' => 'subsubbar' . $k, + )); + } + } + } + } + + public function retrieve_block_vars_data() + { + return array( + array('foo', array(), array()), // non-existent top-level block + array('block1.foo', array(), array()), // non-existent sub-level block + array('block1', array(), array( // top-level block, all vars + 'FOO1' => 'foo1', + 'BAR1' => 'bar1', + )), + array('block1', array('FOO1'), array( // top-level block, one var + 'FOO1' => 'foo1', + )), + array('block2.subblock', array(), array( // sub-level block, all vars + 'SUBFOO' => 'subfoo9', + 'SUBBAR' => 'subbar9', + )), + array('block2.subblock', array('SUBBAR'), array( // sub-level block, one var + 'SUBBAR' => 'subbar9', + )), + array('block2.subblock.subsubblock', array(), array( // sub-sub-level block, all vars + 'SUBSUBFOO' => 'subsubfoo9', + 'SUBSUBBAR' => 'subsubbar9', + )), + array('block2.subblock.subsubblock', array('SUBSUBBAR'), array( // sub-sub-level block, one var + 'SUBSUBBAR' => 'subsubbar9', + )), + array('block3.subblock[2]', array(), array( // sub-level, exact index, all vars + 'SUBFOO' => 'subfoo2', + 'SUBBAR' => 'subbar2', + )), + array('block3.subblock[2]', array('SUBBAR'), array( // sub-level, exact index, one var + 'SUBBAR' => 'subbar2', + )), + array('block3.subblock[3].subsubblock[5]', array(), array( // sub-sub-level, exact index, all vars + 'SUBSUBFOO' => 'subsubfoo5', + 'SUBSUBBAR' => 'subsubbar5', + )), + array('block3.subblock[4].subsubblock[6]', array('SUBSUBFOO'), array( // sub-sub-level, exact index, one var + 'SUBSUBFOO' => 'subsubfoo6', + )), + ); + } + + /** + * @dataProvider retrieve_block_vars_data + */ + public function test_retrieve_block_vars($blockname, $vararray, $result) + { + $this->assertEquals($result, $this->context->retrieve_block_vars($blockname, $vararray)); + } +} diff --git a/tests/template/template_test.php b/tests/template/template_test.php index 0f761abc76..727f35e9d2 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -364,7 +364,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case array(), array(), array(), - "Value'\n1 O'Clock\nValue\\x27\n1\\x20O\\x27Clock", + "Value'\n1 O'Clock\nValue\\u0027\n1\\u0020O\\u0027Clock", array('VARIABLE' => "Value'", '1_VARIABLE' => "1 O'Clock"), ), array( diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index e1daa4558a..12a296a4bf 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -1176,10 +1176,6 @@ class phpbb_functional_test_case extends phpbb_test_case } } - // Bypass time restriction that said that if the lastclick time (i.e. time when the form was opened) - // is not at least 2 seconds before submission, cancel the form - $form_data['lastclick'] = 0; - // I use a request because the form submission method does not allow you to send data that is not // contained in one of the actual form fields that the browser sees (i.e. it ignores "hidden" inputs) // Instead, I send it as a request with the submit button "post" set to true. |