diff options
21 files changed, 448 insertions, 192 deletions
diff --git a/build/build.xml b/build/build.xml index 84ff43415f..9cf222ae9e 100644 --- a/build/build.xml +++ b/build/build.xml @@ -4,7 +4,7 @@ <!-- a few settings for the build --> <property name="newversion" value="3.2.0-RC2-dev" /> <property name="prevversion" value="3.2.0-b2" /> - <property name="olderversions" value="3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.2.0-a1, 3.2.0-a2, 3.2.0-b1" /> + <property name="olderversions" value="3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.2.0-a1, 3.2.0-a2, 3.2.0-b1" /> <!-- no configuration should be needed beyond this point --> <property name="oldversions" value="${olderversions}, ${prevversion}" /> diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 804a7e09a0..2bca6e7b89 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -42,6 +42,7 @@ require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); +require($phpbb_root_path . 'includes/functions_compatibility.' . $phpEx); $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx); $phpbb_container = $phpbb_container_builder->with_config($phpbb_config_php_file); diff --git a/phpBB/composer.json b/phpBB/composer.json index e6de5eab2e..ca6eb449bb 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -30,24 +30,24 @@ "google/recaptcha": "~1.1", "guzzlehttp/guzzle": "~5.3", "lusitanian/oauth": "^0.8.1", - "marc1706/fast-image-size": "~1.1", - "paragonie/random_compat": "^1.2", - "patchwork/utf8": "1.1.*", - "s9e/text-formatter": "~0.6", - "symfony/config": "2.8.*", - "symfony/console": "2.8.*", - "symfony/debug": "2.8.*", - "symfony/dependency-injection": "2.8.*", - "symfony/event-dispatcher": "2.8.*", - "symfony/filesystem": "2.8.*", - "symfony/finder": "2.8.*", - "symfony/http-foundation": "2.8.*", - "symfony/http-kernel": "2.8.*", - "symfony/proxy-manager-bridge": "2.8.*", - "symfony/routing": "2.8.*", - "symfony/twig-bridge": "2.8.*", - "symfony/yaml": "2.8.*", - "twig/twig": "1.*" + "marc1706/fast-image-size": "^1.1", + "paragonie/random_compat": "^2.0", + "patchwork/utf8": "^1.1", + "s9e/text-formatter": "~0.8.0", + "symfony/config": "^2.8", + "symfony/console": "^2.8", + "symfony/debug": "^2.8", + "symfony/dependency-injection": "^2.8", + "symfony/event-dispatcher": "^2.8", + "symfony/filesystem": "^2.8", + "symfony/finder": "^2.8", + "symfony/http-foundation": "^2.8", + "symfony/http-kernel": "^2.8", + "symfony/proxy-manager-bridge": "^2.8", + "symfony/routing": "^2.8", + "symfony/twig-bridge": "^2.8", + "symfony/yaml": "^2.8", + "twig/twig": "^1.0" }, "require-dev": { "fabpot/goutte": "~2.0", @@ -58,9 +58,9 @@ "phpunit/phpunit": "4.1.*", "sami/sami": "1.*", "squizlabs/php_codesniffer": "2.*", - "symfony/browser-kit": "2.8.*", - "symfony/css-selector": "2.8.*", - "symfony/dom-crawler": "2.8.*" + "symfony/browser-kit": "^2.8", + "symfony/css-selector": "^2.8", + "symfony/dom-crawler": "^2.8" }, "extra": { "branch-alias": { diff --git a/phpBB/composer.lock b/phpBB/composer.lock index f5d025a04b..175aa6f7d3 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "5426763a1b0cea586211be11218ec457", - "content-hash": "b6de2d81609b99acc0d3aaf0ee4cc886", + "hash": "f8c36b90de055ba0b43285a066e66805", + "content-hash": "1968761eb0667a7c4745caaf65992fe3", "packages": [ { "name": "bantu/ini-get-wrapper", @@ -460,16 +460,16 @@ }, { "name": "paragonie/random_compat", - "version": "v1.4.1", + "version": "v2.0.2", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "c7e26a21ba357863de030f0b9e701c7d04593774" + "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c7e26a21ba357863de030f0b9e701c7d04593774", - "reference": "c7e26a21ba357863de030f0b9e701c7d04593774", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/088c04e2f261c33bed6ca5245491cfca69195ccf", + "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf", "shasum": "" }, "require": { @@ -504,20 +504,20 @@ "pseudorandom", "random" ], - "time": "2016-03-18 20:34:03" + "time": "2016-04-03 06:00:07" }, { "name": "patchwork/utf8", - "version": "v1.1.31", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/tchwork/utf8.git", - "reference": "84da29ef77c422d83126534cb5bb03ba6e20f319" + "reference": "30ec6451aec7d2536f0af8fe535f70c764f2c47a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tchwork/utf8/zipball/84da29ef77c422d83126534cb5bb03ba6e20f319", - "reference": "84da29ef77c422d83126534cb5bb03ba6e20f319", + "url": "https://api.github.com/repos/tchwork/utf8/zipball/30ec6451aec7d2536f0af8fe535f70c764f2c47a", + "reference": "30ec6451aec7d2536f0af8fe535f70c764f2c47a", "shasum": "" }, "require": { @@ -527,15 +527,23 @@ "suggest": { "ext-iconv": "Use iconv for best performance", "ext-intl": "Use Intl for best performance", - "ext-mbstring": "Use Mbstring for best performance" + "ext-mbstring": "Use Mbstring for best performance", + "ext-wfio": "Use WFIO for UTF-8 filesystem access on Windows" }, "type": "library", - "autoload": { - "psr-0": { - "Patchwork": "class/", - "Normalizer": "class/" + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" } }, + "autoload": { + "psr-4": { + "Patchwork\\": "src/Patchwork/" + }, + "classmap": [ + "src/Normalizer.php" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "(Apache-2.0 or GPL-2.0)" @@ -555,7 +563,7 @@ "utf-8", "utf8" ], - "time": "2015-12-15 15:29:47" + "time": "2016-05-18 13:57:10" }, { "name": "psr/log", @@ -641,16 +649,16 @@ }, { "name": "s9e/text-formatter", - "version": "0.6.2", + "version": "0.8.3", "source": { "type": "git", "url": "https://github.com/s9e/TextFormatter.git", - "reference": "99d6b5799387dddfdd00b5a76bb83a15dda586e3" + "reference": "34668fccbe259fbca0331e7a34409c4502ee71bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/99d6b5799387dddfdd00b5a76bb83a15dda586e3", - "reference": "99d6b5799387dddfdd00b5a76bb83a15dda586e3", + "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/34668fccbe259fbca0331e7a34409c4502ee71bd", + "reference": "34668fccbe259fbca0331e7a34409c4502ee71bd", "shasum": "" }, "require": { @@ -697,20 +705,20 @@ "parser", "shortcodes" ], - "time": "2016-08-09 14:16:45" + "time": "2016-11-02 08:14:58" }, { "name": "symfony/config", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "4275ef5b59f18959df0eee3991e9ca0cc208ffd4" + "reference": "005bf10c156335ede2e89fb9a9ee10a0b742bc84" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/4275ef5b59f18959df0eee3991e9ca0cc208ffd4", - "reference": "4275ef5b59f18959df0eee3991e9ca0cc208ffd4", + "url": "https://api.github.com/repos/symfony/config/zipball/005bf10c156335ede2e89fb9a9ee10a0b742bc84", + "reference": "005bf10c156335ede2e89fb9a9ee10a0b742bc84", "shasum": "" }, "require": { @@ -750,20 +758,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2016-07-26 08:02:44" + "time": "2016-08-16 14:56:08" }, { "name": "symfony/console", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "36e62335caca8a6e909c5c5bac4a8128149911c9" + "reference": "3d3e4fa5f0614c8e45220e5de80332322e33bd90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/36e62335caca8a6e909c5c5bac4a8128149911c9", - "reference": "36e62335caca8a6e909c5c5bac4a8128149911c9", + "url": "https://api.github.com/repos/symfony/console/zipball/3d3e4fa5f0614c8e45220e5de80332322e33bd90", + "reference": "3d3e4fa5f0614c8e45220e5de80332322e33bd90", "shasum": "" }, "require": { @@ -810,20 +818,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-07-30 07:20:35" + "time": "2016-09-06 10:55:00" }, { "name": "symfony/debug", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "f7c5256f43debdabec79146a5db226fd15aedbea" + "reference": "8c29235936a47473af16fb91c7c4b7b193c5693c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/f7c5256f43debdabec79146a5db226fd15aedbea", - "reference": "f7c5256f43debdabec79146a5db226fd15aedbea", + "url": "https://api.github.com/repos/symfony/debug/zipball/8c29235936a47473af16fb91c7c4b7b193c5693c", + "reference": "8c29235936a47473af16fb91c7c4b7b193c5693c", "shasum": "" }, "require": { @@ -867,20 +875,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2016-07-30 07:20:35" + "time": "2016-09-06 10:55:00" }, { "name": "symfony/dependency-injection", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "f2b5a00d176f6a201dc430375c0ef37706ea3d12" + "reference": "0a732a9cafc30e54077967da4d019e1d618a8cb9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f2b5a00d176f6a201dc430375c0ef37706ea3d12", - "reference": "f2b5a00d176f6a201dc430375c0ef37706ea3d12", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/0a732a9cafc30e54077967da4d019e1d618a8cb9", + "reference": "0a732a9cafc30e54077967da4d019e1d618a8cb9", "shasum": "" }, "require": { @@ -930,11 +938,11 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2016-07-30 07:20:35" + "time": "2016-09-06 23:19:39" }, { "name": "symfony/event-dispatcher", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -994,16 +1002,16 @@ }, { "name": "symfony/filesystem", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "ab4c3f085c8f5a56536845bf985c4cef30bf75fd" + "reference": "44b499521defddf2eae17a18c811bbdae4f98bdf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/ab4c3f085c8f5a56536845bf985c4cef30bf75fd", - "reference": "ab4c3f085c8f5a56536845bf985c4cef30bf75fd", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/44b499521defddf2eae17a18c811bbdae4f98bdf", + "reference": "44b499521defddf2eae17a18c811bbdae4f98bdf", "shasum": "" }, "require": { @@ -1039,20 +1047,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2016-07-20 05:41:28" + "time": "2016-09-06 10:55:00" }, { "name": "symfony/finder", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "60804d88691e4a73bbbb3035eb1d9f075c5c2c10" + "reference": "bec5533e6ed650547d6ec8de4b541dc9929066f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/60804d88691e4a73bbbb3035eb1d9f075c5c2c10", - "reference": "60804d88691e4a73bbbb3035eb1d9f075c5c2c10", + "url": "https://api.github.com/repos/symfony/finder/zipball/bec5533e6ed650547d6ec8de4b541dc9929066f7", + "reference": "bec5533e6ed650547d6ec8de4b541dc9929066f7", "shasum": "" }, "require": { @@ -1088,20 +1096,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-07-26 08:02:44" + "time": "2016-08-26 11:57:43" }, { "name": "symfony/http-foundation", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "f20bea598906c990eebe3c70a63ca5ed18cdbc11" + "reference": "1d4ab8de2215e44e57fddc1e6b5d122546769e7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f20bea598906c990eebe3c70a63ca5ed18cdbc11", - "reference": "f20bea598906c990eebe3c70a63ca5ed18cdbc11", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/1d4ab8de2215e44e57fddc1e6b5d122546769e7d", + "reference": "1d4ab8de2215e44e57fddc1e6b5d122546769e7d", "shasum": "" }, "require": { @@ -1143,20 +1151,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2016-07-30 07:20:35" + "time": "2016-09-06 10:55:00" }, { "name": "symfony/http-kernel", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "c4bcdce4fc1f4ec1a20264fc45802a2814b42c5f" + "reference": "a47004349e9216ab98a8019616a66e2d5c32b0ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/c4bcdce4fc1f4ec1a20264fc45802a2814b42c5f", - "reference": "c4bcdce4fc1f4ec1a20264fc45802a2814b42c5f", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a47004349e9216ab98a8019616a66e2d5c32b0ca", + "reference": "a47004349e9216ab98a8019616a66e2d5c32b0ca", "shasum": "" }, "require": { @@ -1225,7 +1233,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2016-07-30 08:48:39" + "time": "2016-09-07 02:02:58" }, { "name": "symfony/polyfill-mbstring", @@ -1402,7 +1410,7 @@ }, { "name": "symfony/proxy-manager-bridge", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/proxy-manager-bridge.git", @@ -1456,16 +1464,16 @@ }, { "name": "symfony/routing", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "cdd298b1d45b9882de0905856e89171bf487c6d5" + "reference": "6cee3ed22c778a7410119a3d51a20f60252a156c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/cdd298b1d45b9882de0905856e89171bf487c6d5", - "reference": "cdd298b1d45b9882de0905856e89171bf487c6d5", + "url": "https://api.github.com/repos/symfony/routing/zipball/6cee3ed22c778a7410119a3d51a20f60252a156c", + "reference": "6cee3ed22c778a7410119a3d51a20f60252a156c", "shasum": "" }, "require": { @@ -1527,20 +1535,20 @@ "uri", "url" ], - "time": "2016-06-29 05:29:29" + "time": "2016-08-16 14:56:08" }, { "name": "symfony/twig-bridge", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/twig-bridge.git", - "reference": "8e7aafdd037e0a12be436e863bc9695f6d65518b" + "reference": "5e9679f7085e99adb5248e07b4677494b8f884b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/8e7aafdd037e0a12be436e863bc9695f6d65518b", - "reference": "8e7aafdd037e0a12be436e863bc9695f6d65518b", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/5e9679f7085e99adb5248e07b4677494b8f884b5", + "reference": "5e9679f7085e99adb5248e07b4677494b8f884b5", "shasum": "" }, "require": { @@ -1608,20 +1616,20 @@ ], "description": "Symfony Twig Bridge", "homepage": "https://symfony.com", - "time": "2016-07-30 07:20:35" + "time": "2016-09-06 10:55:00" }, { "name": "symfony/yaml", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "0ceab136f43ed9d3e97b3eea32a7855dc50c121d" + "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/0ceab136f43ed9d3e97b3eea32a7855dc50c121d", - "reference": "0ceab136f43ed9d3e97b3eea32a7855dc50c121d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e7540734bad981fe59f8ef14b6fc194ae9df8d9c", + "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c", "shasum": "" }, "require": { @@ -1657,20 +1665,20 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-07-17 09:06:15" + "time": "2016-09-02 01:57:56" }, { "name": "twig/twig", - "version": "v1.24.1", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512" + "reference": "81c2b5fd36581370c7731387f05dcdb577050513" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3566d311a92aae4deec6e48682dc5a4528c4a512", - "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/81c2b5fd36581370c7731387f05dcdb577050513", + "reference": "81c2b5fd36581370c7731387f05dcdb577050513", "shasum": "" }, "require": { @@ -1683,7 +1691,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.24-dev" + "dev-master": "1.26-dev" } }, "autoload": { @@ -1718,7 +1726,7 @@ "keywords": [ "templating" ], - "time": "2016-05-30 09:11:59" + "time": "2016-10-02 16:19:13" }, { "name": "zendframework/zend-code", @@ -2624,9 +2632,7 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" + "email": "fabien@symfony.com" } ], "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", @@ -3095,16 +3101,16 @@ }, { "name": "symfony/browser-kit", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "67edaa4e89c76acd15a25a0b13728172341344c5" + "reference": "165bf6d1e72cd72f2fe170a070aa2a1f17f2d744" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/67edaa4e89c76acd15a25a0b13728172341344c5", - "reference": "67edaa4e89c76acd15a25a0b13728172341344c5", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/165bf6d1e72cd72f2fe170a070aa2a1f17f2d744", + "reference": "165bf6d1e72cd72f2fe170a070aa2a1f17f2d744", "shasum": "" }, "require": { @@ -3148,20 +3154,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2016-07-26 08:02:44" + "time": "2016-09-06 10:55:00" }, { "name": "symfony/css-selector", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "9da4c615ba303850986e0480cc472bf704cfdb64" + "reference": "71c8c3a04c126300c37089b1baa7c6322dfb845f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/9da4c615ba303850986e0480cc472bf704cfdb64", - "reference": "9da4c615ba303850986e0480cc472bf704cfdb64", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/71c8c3a04c126300c37089b1baa7c6322dfb845f", + "reference": "71c8c3a04c126300c37089b1baa7c6322dfb845f", "shasum": "" }, "require": { @@ -3201,11 +3207,11 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:31:50" + "time": "2016-09-06 10:55:00" }, { "name": "symfony/dom-crawler", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", @@ -3261,16 +3267,16 @@ }, { "name": "symfony/process", - "version": "v2.8.9", + "version": "v2.8.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d20332e43e8774ff8870b394f3dd6020cc7f8e0c" + "reference": "05a03ed27073638658cab9405d99a67dd1014987" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d20332e43e8774ff8870b394f3dd6020cc7f8e0c", - "reference": "d20332e43e8774ff8870b394f3dd6020cc7f8e0c", + "url": "https://api.github.com/repos/symfony/process/zipball/05a03ed27073638658cab9405d99a67dd1014987", + "reference": "05a03ed27073638658cab9405d99a67dd1014987", "shasum": "" }, "require": { @@ -3306,7 +3312,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-07-28 11:13:19" + "time": "2016-09-06 10:55:00" } ], "aliases": [], diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index 80271c6419..39ef193f4d 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -1343,6 +1343,13 @@ overall_header_page_body_before * Since: 3.1.0-b3 * Purpose: Add content after the page-header, but before the page-body +overall_header_searchbox_after +=== +* Locations: + + styles/prosilver/template/overall_header.html +* Since: 3.1.11-RC1 +* Purpose: Add content after the search box in the header + overall_header_searchbox_before === * Locations: diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index c4888cfc7c..b09b496bc6 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -602,13 +602,13 @@ class acp_profile if (!sizeof($error)) { - if (!check_form_key($form_key)) - { - trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); - } - if (($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save)) || ($action == 'edit' && $save)) { + if (!check_form_key($form_key)) + { + trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); + } + $this->save_profile_field($cp, $field_type, $action); } } diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php index 9a72162c29..a792ee6b79 100644 --- a/phpBB/includes/acp/acp_search.php +++ b/phpBB/includes/acp/acp_search.php @@ -54,10 +54,8 @@ class acp_search global $config, $phpbb_admin_path, $phpEx; $submit = (isset($_POST['submit'])) ? true : false; - $form_key = 'acp_search'; - add_form_key($form_key); - if ($submit && !check_form_key($form_key)) + if ($submit && !check_link_hash($request->variable('hash', ''), 'acp_search')) { trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -233,7 +231,7 @@ class acp_search 'S_YES_SEARCH' => (bool) $config['load_search'], 'S_SETTINGS' => true, - 'U_ACTION' => $this->u_action) + 'U_ACTION' => $this->u_action . '&hash=' . generate_link_hash('acp_search')) ); } @@ -253,10 +251,7 @@ class acp_search } $submit = $request->is_set_post('submit', false); - $form_key = 'acp_search'; - add_form_key($form_key); - - if (!check_form_key($form_key) && in_array($action, array('delete', 'create'))) + if (!check_link_hash($request->variable('hash', ''), 'acp_search') && in_array($action, array('create', 'delete'))) { trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -310,7 +305,7 @@ class acp_search if (method_exists($this->search, 'delete_index')) { // pass a reference to myself so the $search object can make use of save_state() and attributes - if ($error = $this->search->delete_index($this, append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=delete", false))) + if ($error = $this->search->delete_index($this, append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=delete&hash=" . generate_link_hash('acp_search'), false))) { $this->state = array(''); $this->save_state(); @@ -353,7 +348,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)); + 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)); } } @@ -441,7 +436,7 @@ class acp_search { $totaltime = microtime(true) - $starttime; $rows_per_second = $row_count / $totaltime; - meta_refresh(1, append_sid($this->u_action . '&action=create&skip_rows=' . $post_counter)); + meta_refresh(1, append_sid($this->u_action . '&action=create&skip_rows=' . $post_counter . '&hash=' . generate_link_hash('acp_search'))); trigger_error($user->lang('SEARCH_INDEX_CREATE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_CREATE_REDIRECT_RATE', $rows_per_second)); } } @@ -520,7 +515,7 @@ class acp_search $template->assign_vars(array( 'S_INDEX' => true, - 'U_ACTION' => $this->u_action, + 'U_ACTION' => $this->u_action . '&hash=' . generate_link_hash('acp_search'), 'U_PROGRESS_BAR' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=progress_bar"), 'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=progress_bar")), )); @@ -529,7 +524,7 @@ class acp_search { $template->assign_vars(array( 'S_CONTINUE_INDEXING' => $this->state[1], - 'U_CONTINUE_INDEXING' => $this->u_action . '&action=' . $this->state[1], + 'U_CONTINUE_INDEXING' => $this->u_action . '&action=' . $this->state[1] . '&hash=' . generate_link_hash('acp_search'), 'L_CONTINUE' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING'] : $user->lang['CONTINUE_DELETING_INDEX'], 'L_CONTINUE_EXPLAIN' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING_EXPLAIN'] : $user->lang['CONTINUE_DELETING_INDEX_EXPLAIN']) ); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index da698ae4cb..bbd3e524cc 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1647,13 +1647,6 @@ function generate_board_url($without_script_path = false) global $config, $user, $request; $server_name = $user->host; - $server_port = $request->server('SERVER_PORT', 0); - $forwarded_proto = $request->server('HTTP_X_FORWARDED_PROTO'); - - if (!empty($forwarded_proto) && $forwarded_proto === 'https') - { - $server_port = 443; - } // Forcing server vars is the only way to specify/override the protocol if ($config['force_server_vars'] || !$server_name) @@ -1668,6 +1661,13 @@ function generate_board_url($without_script_path = false) } else { + $server_port = $request->server('SERVER_PORT', 0); + $forwarded_proto = $request->server('HTTP_X_FORWARDED_PROTO'); + + if (!empty($forwarded_proto) && $forwarded_proto === 'https') + { + $server_port = 443; + } // Do not rely on cookie_secure, users seem to think that it means a secured cookie instead of an encrypted connection $cookie_secure = $request->is_secure() ? 1 : 0; $url = (($cookie_secure) ? 'https://' : 'http://') . $server_name; @@ -2021,8 +2021,9 @@ function check_link_hash($token, $link_name) /** * Add a secret token to the form (requires the S_FORM_TOKEN template variable) * @param string $form_name The name of the form; has to match the name used in check_form_key, otherwise no restrictions apply +* @param string $template_variable_suffix A string that is appended to the name of the template variable to which the form elements are assigned */ -function add_form_key($form_name) +function add_form_key($form_name, $template_variable_suffix = '') { global $config, $template, $user, $phpbb_dispatcher; @@ -2039,13 +2040,15 @@ function add_form_key($form_name) * Perform additional actions on creation of the form token * * @event core.add_form_key - * @var string form_name The form name - * @var int now Current time timestamp - * @var string s_fields Generated hidden fields - * @var string token Form token - * @var string token_sid User session ID + * @var string form_name The form name + * @var int now Current time timestamp + * @var string s_fields Generated hidden fields + * @var string token Form token + * @var string token_sid User session ID + * @var string template_variable_suffix The string that is appended to template variable name * * @since 3.1.0-RC3 + * @changed 3.1.11-RC1 Added template_variable_suffix */ $vars = array( 'form_name', @@ -2053,12 +2056,11 @@ function add_form_key($form_name) 's_fields', 'token', 'token_sid', + 'template_variable_suffix', ); extract($phpbb_dispatcher->trigger_event('core.add_form_key', compact($vars))); - $template->assign_vars(array( - 'S_FORM_TOKEN' => $s_fields, - )); + $template->assign_var('S_FORM_TOKEN' . $template_variable_suffix, $s_fields); } /** diff --git a/phpBB/phpbb/db/migration/data/v31x/v3110.php b/phpBB/phpbb/db/migration/data/v31x/v3110.php new file mode 100644 index 0000000000..b89b4cc6e6 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v31x/v3110.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\v31x; + +class v3110 extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return phpbb_version_compare($this->config['version'], '3.1.10', '>='); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v31x\v3110rc1', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.1.10')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php index a7dffbb7f2..b47c426110 100644 --- a/phpBB/phpbb/db/migration/tool/module.php +++ b/phpBB/phpbb/db/migration/tool/module.php @@ -97,7 +97,12 @@ class module implements \phpbb\db\migration\tool\tool_interface $parent_sql = ''; if ($parent !== false) { - $parent = $this->get_parent_module_id($parent, $module); + $parent = $this->get_parent_module_id($parent, $module, false); + if ($parent === false) + { + return false; + } + $parent_sql = 'AND parent_id = ' . (int) $parent; } @@ -205,7 +210,7 @@ class module implements \phpbb\db\migration\tool\tool_interface if ($this->exists($class, $parent, $data['module_langname'])) { - throw new \phpbb\db\migration\exception('MODULE_EXISTS', $module_id); + throw new \phpbb\db\migration\exception('MODULE_EXISTS', $data['module_langname']); } $module_data = array( @@ -431,12 +436,11 @@ class module implements \phpbb\db\migration\tool\tool_interface protected function get_categories_list() { // Select the top level categories - // and 2nd level [sub]categories which exist for ACP only + // and 2nd level [sub]categories $sql = 'SELECT m2.module_id, m2.module_langname FROM ' . $this->modules_table . ' m1, ' . $this->modules_table . " m2 WHERE m1.parent_id = 0 - AND (m1.module_id = m2.module_id - OR m2.module_class = 'acp' AND m2.parent_id = m1.module_id) + AND (m1.module_id = m2.module_id OR m2.parent_id = m1.module_id) ORDER BY m1.module_id, m2.module_id ASC"; $result = $this->db->sql_query($sql); @@ -452,11 +456,15 @@ class module implements \phpbb\db\migration\tool\tool_interface * * @param string|int $parent_id The parent module_id|module_langname * @param int|string|array $data The module_id, module_langname for existance checking or module data array for adding - * @return int The parent module_id + * @param bool $throw_exception The flag indicating if exception should be thrown on error + * @return mixed The int parent module_id or false * @throws \phpbb\db\migration\exception */ - public function get_parent_module_id($parent_id, $data = '') + public function get_parent_module_id($parent_id, $data = '', $throw_exception = true) { + // Initialize exception object placeholder + $exception = false; + // Allow '' to be sent as 0 $parent_id = $parent_id ?: 0; @@ -478,7 +486,7 @@ class module implements \phpbb\db\migration\tool\tool_interface { // No parent with the given module_langname exist case 0: - throw new \phpbb\db\migration\exception('MODULE_NOT_EXIST', $parent_id); + $exception = new \phpbb\db\migration\exception('MODULE_NOT_EXIST', $parent_id); break; // Return the module id @@ -500,7 +508,7 @@ class module implements \phpbb\db\migration\tool\tool_interface $parent_id = (int) $this->db->sql_fetchfield('parent_id'); if (!$parent_id) { - throw new \phpbb\db\migration\exception('PARENT_MODULE_FIND_ERROR', $data['parent_id']); + $exception = new \phpbb\db\migration\exception('PARENT_MODULE_FIND_ERROR', $data['parent_id']); } } else if (!empty($data) && !is_array($data)) @@ -518,12 +526,21 @@ class module implements \phpbb\db\migration\tool\tool_interface else { //Unable to get the parent module id, throwing an exception - throw new \phpbb\db\migration\exception('MODULE_EXIST_MULTIPLE', $parent_id); + $exception = new \phpbb\db\migration\exception('MODULE_EXIST_MULTIPLE', $parent_id); } break; } } + if ($exception !== false) + { + if ($throw_exception) + { + throw $exception; + } + return false; + } + return $parent_id; } } diff --git a/phpBB/phpbb/event/kernel_exception_subscriber.php b/phpBB/phpbb/event/kernel_exception_subscriber.php index e427abf5e3..3c7375dadf 100644 --- a/phpBB/phpbb/event/kernel_exception_subscriber.php +++ b/phpBB/phpbb/event/kernel_exception_subscriber.php @@ -36,6 +36,9 @@ class kernel_exception_subscriber implements EventSubscriberInterface */ protected $language; + /** @var \phpbb\request\type_cast_helper */ + protected $type_caster; + /** * Construct method * @@ -46,6 +49,7 @@ class kernel_exception_subscriber implements EventSubscriberInterface { $this->template = $template; $this->language = $language; + $this->type_caster = new \phpbb\request\type_cast_helper(); } /** @@ -59,12 +63,16 @@ class kernel_exception_subscriber implements EventSubscriberInterface $exception = $event->getException(); $message = $exception->getMessage(); + $this->type_caster->set_var($message, $message, 'string', false, false); if ($exception instanceof \phpbb\exception\exception_interface) { $message = $this->language->lang_array($message, $exception->get_parameters()); } + // Show <strong> text in bold + $message = preg_replace('#<(/?strong)>#i', '<$1>', $message); + if (!$event->getRequest()->isXmlHttpRequest()) { page_header($this->language->lang('INFORMATION')); diff --git a/phpBB/phpbb/template/twig/loader.php b/phpBB/phpbb/template/twig/loader.php index 8b12188a77..d2b42852ce 100644 --- a/phpBB/phpbb/template/twig/loader.php +++ b/phpBB/phpbb/template/twig/loader.php @@ -101,6 +101,16 @@ class loader extends \Twig_Loader_Filesystem } /** + * Adds a realpath call to fix a BC break in Twig 1.26 (https://github.com/twigphp/Twig/issues/2145) + * + * {@inheritdoc} + */ + public function addPath($path, $namespace = self::MAIN_NAMESPACE) + { + return parent::addPath($this->filesystem->realpath($path), $namespace); + } + + /** * Find the template * * Override for Twig_Loader_Filesystem::findTemplate to add support diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 4e4edcb396..4a31a0adde 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -103,6 +103,7 @@ </form> </div> <!-- ENDIF --> + <!-- EVENT overall_header_searchbox_after --> </div> <!-- EVENT overall_header_headerbar_after --> diff --git a/tests/dbal/fixtures/migrator_module.xml b/tests/dbal/fixtures/migrator_module.xml index e172d7a145..e85c43ee25 100644 --- a/tests/dbal/fixtures/migrator_module.xml +++ b/tests/dbal/fixtures/migrator_module.xml @@ -90,5 +90,44 @@ <value></value> <value></value> </row> + <row> + <value>7</value> + <value>1</value> + <value>1</value> + <value></value> + <value>ucp</value> + <value>0</value> + <value>13</value> + <value>18</value> + <value>UCP_MAIN_CAT</value> + <value></value> + <value></value> + </row> + <row> + <value>8</value> + <value>1</value> + <value>1</value> + <value>ucp_subcat</value> + <value>ucp</value> + <value>7</value> + <value>14</value> + <value>17</value> + <value>UCP_SUBCATEGORY</value> + <value>ucp_test</value> + <value></value> + </row> + <row> + <value>9</value> + <value>1</value> + <value>1</value> + <value>ucp_module</value> + <value>ucp</value> + <value>8</value> + <value>15</value> + <value>16</value> + <value>UCP_MODULE</value> + <value>ucp_module_test</value> + <value></value> + </row> </table> </dataset> diff --git a/tests/dbal/migrator_tool_module_test.php b/tests/dbal/migrator_tool_module_test.php index 1744b7e92d..29b21166b6 100644 --- a/tests/dbal/migrator_tool_module_test.php +++ b/tests/dbal/migrator_tool_module_test.php @@ -45,10 +45,10 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case $this->tool = new \phpbb\db\migration\tool\module($this->db, $this->cache, $this->user, $module_manager, $phpbb_root_path, $phpEx, 'phpbb_modules'); } - public function exists_data() + public function exists_data_acp() { return array( - // Test the category + // Test the existing category array( '', 'ACP_CAT', @@ -60,7 +60,7 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case true, ), - // Test the module + // Test the existing module array( '', 'ACP_MODULE', @@ -76,17 +76,88 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case 'ACP_MODULE', true, ), + + // Test for non-existant modules + array( + '', + 'ACP_NON_EXISTANT_CAT', + false, + ), + array( + 'ACP_CAT', + 'ACP_NON_EXISTANT_MODULE', + false, + ), ); } /** - * @dataProvider exists_data + * @dataProvider exists_data_acp */ - public function test_exists($parent, $module, $expected) + public function test_exists_acp($parent, $module, $expected) { $this->assertEquals($expected, $this->tool->exists('acp', $parent, $module)); } + public function exists_data_ucp() + { + return array( + // Test the existing category + array( + '', + 'UCP_MAIN_CAT', + true, + ), + array( + 0, + 'UCP_MAIN_CAT', + true, + ), + + // Test the existing module + array( + '', + 'UCP_SUBCATEGORY', + false, + ), + array( + false, + 'UCP_SUBCATEGORY', + true, + ), + array( + 'UCP_MAIN_CAT', + 'UCP_SUBCATEGORY', + true, + ), + array( + 'UCP_SUBCATEGORY', + 'UCP_MODULE', + true, + ), + + // Test for non-existant modules + array( + '', + 'UCP_NON_EXISTANT_CAT', + false, + ), + array( + 'UCP_MAIN_CAT', + 'UCP_NON_EXISTANT_MODULE', + false, + ), + ); + } + + /** + * @dataProvider exists_data_ucp + */ + public function test_exists_ucp($parent, $module, $expected) + { + $this->assertEquals($expected, $this->tool->exists('ucp', $parent, $module)); + } + public function test_add() { try @@ -159,6 +230,45 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case $this->fail($e); } $this->assertEquals(true, $this->tool->exists('acp', 'ACP_FORUM_BASED_PERMISSIONS', 'ACP_NEW_PERMISSIONS_MODULE')); + + // Test adding UCP modules + // Test adding new UCP category + try + { + $this->tool->add('ucp', 0, 'UCP_NEW_CAT'); + } + catch (Exception $e) + { + $this->fail($e); + } + $this->assertEquals(true, $this->tool->exists('ucp', 0, 'UCP_NEW_CAT')); + + // Test adding new UCP subcategory + try + { + $this->tool->add('ucp', 'UCP_NEW_CAT', 'UCP_NEW_SUBCAT'); + } + catch (Exception $e) + { + $this->fail($e); + } + $this->assertEquals(true, $this->tool->exists('ucp', 'UCP_NEW_CAT', 'UCP_NEW_SUBCAT')); + + // Test adding new UCP module + try + { + $this->tool->add('ucp', 'UCP_NEW_SUBCAT', array( + 'module_basename' => 'ucp_new_module', + 'module_langname' => 'UCP_NEW_MODULE', + 'module_mode' => 'ucp_test', + 'module_auth' => '', + )); + } + catch (Exception $e) + { + $this->fail($e); + } + $this->assertEquals(true, $this->tool->exists('ucp', 'UCP_NEW_SUBCAT', 'UCP_NEW_MODULE')); } public function test_remove() diff --git a/tests/di/create_container_test.php b/tests/di/create_container_test.php index 4dd0583ebe..aba7a3560b 100644 --- a/tests/di/create_container_test.php +++ b/tests/di/create_container_test.php @@ -73,8 +73,6 @@ namespace // Checks the construction of a dumped container $container = $this->builder->get_container(); $this->assertInstanceOf('phpbb_cache_container', $container); - $this->assertFalse($container->isFrozen()); - $container->getParameterBag(); // needed, otherwise the container is not marked as frozen $this->assertTrue($container->isFrozen()); } diff --git a/tests/functional/search/base.php b/tests/functional/search/base.php index fc6f4c0a0b..48c444fb76 100644 --- a/tests/functional/search/base.php +++ b/tests/functional/search/base.php @@ -79,18 +79,16 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case { $this->add_lang('acp/search'); $crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid); - $form_values = $crawler->selectButton('Create index')->form()->getValues(); - $crawler = self::request( - 'POST', - 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid, + $form = $crawler->selectButton('Create index')->form(); + $form_values = $form->getValues(); + $form_values = array_merge($form_values, array( 'search_type' => ( ($backend === null) ? $this->search_backend : $backend ), 'action' => 'create', - 'submit' => true, - 'form_token' => $form_values['form_token'], - 'creation_time' => $form_values['creation_time'], ) ); + $form->setValues($form_values); + $crawler = self::submit($form); $this->assertContainsLang('SEARCH_INDEX_CREATED', $crawler->text()); } @@ -98,18 +96,16 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case { $this->add_lang('acp/search'); $crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid); - $form_values = $crawler->selectButton('Delete index')->form()->getValues(); - $crawler = self::request( - 'POST', - 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid, + $form = $crawler->selectButton('Delete index')->form(); + $form_values = $form->getValues(); + $form_values = array_merge($form_values, array( 'search_type' => $this->search_backend, 'action' => 'delete', - 'submit' => true, - 'form_token' => $form_values['form_token'], - 'creation_time' => $form_values['creation_time'], ) ); + $form->setValues($form_values); + $crawler = self::submit($form); $this->assertContainsLang('SEARCH_INDEX_REMOVED', $crawler->text()); } } diff --git a/tests/text_formatter/s9e/default_formatting_test.php b/tests/text_formatter/s9e/default_formatting_test.php index a70528aba3..e25c3246b5 100644 --- a/tests/text_formatter/s9e/default_formatting_test.php +++ b/tests/text_formatter/s9e/default_formatting_test.php @@ -298,7 +298,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case ), array( "Emoji: \xF0\x9F\x98\x80", - 'Emoji: <img alt="' . "\xF0\x9F\x98\x80" . '" class="smilies" draggable="false" width="18" height="18" src="//twemoji.maxcdn.com/svg/1f600.svg">' + 'Emoji: <img alt="' . "\xF0\x9F\x98\x80" . '" class="smilies" draggable="false" width="18" height="18" src="//cdn.jsdelivr.net/emojione/assets/svg/1f600.svg">' ), array( "Emoji: \xF0\x9F\x98\x80", diff --git a/tests/text_processing/tickets_data/PHPBB3-14846.html b/tests/text_processing/tickets_data/PHPBB3-14846.html new file mode 100644 index 0000000000..461ca25bc6 --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-14846.html @@ -0,0 +1 @@ +<div style="padding: .2em .5em; font-size: .8em; width: 200px; background: #FFD;">moderator text<div style="font-weight: bold; text-align: right">- Mickroz</div></div>
\ No newline at end of file diff --git a/tests/text_processing/tickets_data/PHPBB3-14846.txt b/tests/text_processing/tickets_data/PHPBB3-14846.txt new file mode 100644 index 0000000000..ded7b3f1fe --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-14846.txt @@ -0,0 +1 @@ +[mod=Mickroz]moderator text[/mod]
\ No newline at end of file diff --git a/tests/text_processing/tickets_data/PHPBB3-14846.xml b/tests/text_processing/tickets_data/PHPBB3-14846.xml new file mode 100644 index 0000000000..94b094f0e3 --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-14846.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_bbcodes"> + <column>bbcode_id</column> + <column>bbcode_tag</column> + <column>bbcode_helpline</column> + <column>display_on_posting</column> + <column>bbcode_match</column> + <column>bbcode_tpl</column> + <column>first_pass_match</column> + <column>first_pass_replace</column> + <column>second_pass_match</column> + <column>second_pass_replace</column> + + <row> + <value>13</value> + <value>mod=</value> + <value></value> + <value>1</value> + <value>[mod={TEXT1}]{TEXT2}[/mod]</value> + <value><![CDATA[<div style="padding: .2em .5em; font-size: .8em; width: 200px; background: #FFD;">{TEXT2}<div style="font-weight: bold; text-align: right">- {TEXT1}</div></div>]]></value> + <value><\[/mod\]!ies]]></value> + <value><![CDATA['[mod='.str_replace(array("\r\n", '\"', '\'', '(', ')'), array("\n", '"', ''', '(', ')'), trim('${1}')).':$uid]'.str_replace(array("\r\n", '\"', '\'', '(', ')'), array("\n", '"', ''', '(', ')'), trim('${2}')).'[/mod:$uid]']]></value> + <value><\[/mod:$uid\]!s]]></value> + <value><![CDATA[<div style="padding: .2em .5em; font-size: .8em; width: 200px; background: #FFD;">${2}<div style="font-weight: bold; text-align: right">- ${1}</div></div>]]></value> + </row> + </table> +</dataset> |