aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/composer.lock260
-rw-r--r--phpBB/config/default/container/services_auth.yml1
-rw-r--r--phpBB/config/default/container/services_db.yml8
-rw-r--r--phpBB/develop/add_permissions.php1
-rw-r--r--phpBB/develop/create_schema_files.php2
-rw-r--r--phpBB/docs/INSTALL.html1
-rw-r--r--phpBB/docs/README.html2
-rw-r--r--phpBB/docs/coding-guidelines.html3
-rw-r--r--phpBB/includes/acp/acp_board.php2
-rw-r--r--phpBB/includes/acp/acp_database.php2
-rw-r--r--phpBB/includes/acp/acp_extensions.php18
-rw-r--r--phpBB/includes/acp/acp_icons.php1
-rw-r--r--phpBB/includes/acp/acp_main.php2
-rw-r--r--phpBB/includes/acp/acp_reasons.php1
-rw-r--r--phpBB/includes/acp/acp_users.php2
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_admin.php2
-rw-r--r--phpBB/includes/functions_content.php12
-rw-r--r--phpBB/includes/functions_convert.php2
-rw-r--r--phpBB/includes/functions_messenger.php12
-rw-r--r--phpBB/includes/functions_posting.php9
-rw-r--r--phpBB/includes/functions_user.php2
-rw-r--r--phpBB/install/convert/controller/convertor.php1
-rw-r--r--phpBB/install/convert/convertor.php2
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php1
-rw-r--r--phpBB/language/en/install.php3
-rw-r--r--phpBB/language/en/ucp.php1
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php35
-rw-r--r--phpBB/phpbb/db/driver/sqlite.php384
-rw-r--r--phpBB/phpbb/db/extractor/factory.php4
-rw-r--r--phpBB/phpbb/db/extractor/sqlite_extractor.php149
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/remove_duplicate_migrations.php77
-rw-r--r--phpBB/phpbb/db/migrator.php36
-rw-r--r--phpBB/phpbb/db/tools/tools.php116
-rw-r--r--phpBB/phpbb/install/helper/database.php17
-rw-r--r--phpBB/phpbb/notification/type/report_pm.php2
-rw-r--r--phpBB/phpbb/search/fulltext_native.php6
-rw-r--r--phpBB/phpbb/template/twig/lexer.php7
-rw-r--r--phpBB/styles/prosilver/template/ajax.js4
-rw-r--r--phpBB/styles/prosilver/template/navbar_header.html4
-rw-r--r--phpBB/styles/prosilver/template/posting_attach_body.html2
-rw-r--r--phpBB/styles/prosilver/theme/colours.css5
-rw-r--r--phpBB/styles/prosilver/theme/common.css20
-rw-r--r--phpBB/viewonline.php1
-rw-r--r--tests/functional/notification_test.php2
-rw-r--r--tests/functions/convert_30_dbms_to_31_test.php1
-rw-r--r--tests/functions/user_delete_test.php1
-rw-r--r--tests/migrator/schema_generator_test.php2
-rw-r--r--tests/test_framework/phpbb_database_test_case.php2
-rw-r--r--tests/test_framework/phpbb_database_test_connection_manager.php15
-rw-r--r--tests/test_framework/phpbb_test_case_helpers.php11
51 files changed, 382 insertions, 876 deletions
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index 175aa6f7d3..158a4e24a9 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -346,16 +346,16 @@
},
{
"name": "marc1706/fast-image-size",
- "version": "v1.1.1",
+ "version": "v1.1.2",
"source": {
"type": "git",
"url": "https://github.com/marc1706/fast-image-size.git",
- "reference": "50ae9b13f862b0c7c6c9df057c396ea32837733a"
+ "reference": "8bb644f8f767c5763acd61140045a78d10e1eb06"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/marc1706/fast-image-size/zipball/50ae9b13f862b0c7c6c9df057c396ea32837733a",
- "reference": "50ae9b13f862b0c7c6c9df057c396ea32837733a",
+ "url": "https://api.github.com/repos/marc1706/fast-image-size/zipball/8bb644f8f767c5763acd61140045a78d10e1eb06",
+ "reference": "8bb644f8f767c5763acd61140045a78d10e1eb06",
"shasum": ""
},
"require": {
@@ -393,7 +393,7 @@
"php",
"size"
],
- "time": "2016-06-08 18:14:49"
+ "time": "2016-10-30 19:00:39"
},
{
"name": "ocramius/proxy-manager",
@@ -460,16 +460,16 @@
},
{
"name": "paragonie/random_compat",
- "version": "v2.0.2",
+ "version": "v2.0.3",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
- "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf"
+ "reference": "c0125896dbb151380ab47e96c621741e79623beb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/088c04e2f261c33bed6ca5245491cfca69195ccf",
- "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf",
+ "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c0125896dbb151380ab47e96c621741e79623beb",
+ "reference": "c0125896dbb151380ab47e96c621741e79623beb",
"shasum": ""
},
"require": {
@@ -504,7 +504,7 @@
"pseudorandom",
"random"
],
- "time": "2016-04-03 06:00:07"
+ "time": "2016-10-17 15:23:22"
},
{
"name": "patchwork/utf8",
@@ -567,22 +567,30 @@
},
{
"name": "psr/log",
- "version": "1.0.0",
+ "version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
+ "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b",
- "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
"shasum": ""
},
+ "require": {
+ "php": ">=5.3.0"
+ },
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
"autoload": {
- "psr-0": {
- "Psr\\Log\\": ""
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -596,12 +604,13 @@
}
],
"description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
- "time": "2012-12-21 11:40:51"
+ "time": "2016-10-10 12:19:37"
},
{
"name": "react/promise",
@@ -709,16 +718,16 @@
},
{
"name": "symfony/config",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "005bf10c156335ede2e89fb9a9ee10a0b742bc84"
+ "reference": "f8b1922bbda9d2ac86aecd649399040bce849fde"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/005bf10c156335ede2e89fb9a9ee10a0b742bc84",
- "reference": "005bf10c156335ede2e89fb9a9ee10a0b742bc84",
+ "url": "https://api.github.com/repos/symfony/config/zipball/f8b1922bbda9d2ac86aecd649399040bce849fde",
+ "reference": "f8b1922bbda9d2ac86aecd649399040bce849fde",
"shasum": ""
},
"require": {
@@ -758,24 +767,25 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2016-08-16 14:56:08"
+ "time": "2016-09-14 20:31:12"
},
{
"name": "symfony/console",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "3d3e4fa5f0614c8e45220e5de80332322e33bd90"
+ "reference": "7350016c8abcab897046f1aead2b766b84d3eff8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/3d3e4fa5f0614c8e45220e5de80332322e33bd90",
- "reference": "3d3e4fa5f0614c8e45220e5de80332322e33bd90",
+ "url": "https://api.github.com/repos/symfony/console/zipball/7350016c8abcab897046f1aead2b766b84d3eff8",
+ "reference": "7350016c8abcab897046f1aead2b766b84d3eff8",
"shasum": ""
},
"require": {
"php": ">=5.3.9",
+ "symfony/debug": "~2.7,>=2.7.2|~3.0.0",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
@@ -818,11 +828,11 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2016-09-06 10:55:00"
+ "time": "2016-10-06 01:43:09"
},
{
"name": "symfony/debug",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
@@ -879,16 +889,16 @@
},
{
"name": "symfony/dependency-injection",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "0a732a9cafc30e54077967da4d019e1d618a8cb9"
+ "reference": "3d61c765daa1a5832f1d7c767f48886b8d8ea64c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/0a732a9cafc30e54077967da4d019e1d618a8cb9",
- "reference": "0a732a9cafc30e54077967da4d019e1d618a8cb9",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/3d61c765daa1a5832f1d7c767f48886b8d8ea64c",
+ "reference": "3d61c765daa1a5832f1d7c767f48886b8d8ea64c",
"shasum": ""
},
"require": {
@@ -938,20 +948,20 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
- "time": "2016-09-06 23:19:39"
+ "time": "2016-10-24 15:52:36"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8"
+ "reference": "25c576abd4e0f212e678fe8b2bd9a9a98c7ea934"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/889983a79a043dfda68f38c38b6dba092dd49cd8",
- "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/25c576abd4e0f212e678fe8b2bd9a9a98c7ea934",
+ "reference": "25c576abd4e0f212e678fe8b2bd9a9a98c7ea934",
"shasum": ""
},
"require": {
@@ -998,20 +1008,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2016-07-28 16:56:28"
+ "time": "2016-10-13 01:43:15"
},
{
"name": "symfony/filesystem",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "44b499521defddf2eae17a18c811bbdae4f98bdf"
+ "reference": "a3784111af9f95f102b6411548376e1ae7c93898"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/44b499521defddf2eae17a18c811bbdae4f98bdf",
- "reference": "44b499521defddf2eae17a18c811bbdae4f98bdf",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/a3784111af9f95f102b6411548376e1ae7c93898",
+ "reference": "a3784111af9f95f102b6411548376e1ae7c93898",
"shasum": ""
},
"require": {
@@ -1047,20 +1057,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2016-09-06 10:55:00"
+ "time": "2016-10-18 04:28:30"
},
{
"name": "symfony/finder",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "bec5533e6ed650547d6ec8de4b541dc9929066f7"
+ "reference": "bc24c8f5674c6f6841f2856b70e5d60784be5691"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/bec5533e6ed650547d6ec8de4b541dc9929066f7",
- "reference": "bec5533e6ed650547d6ec8de4b541dc9929066f7",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/bc24c8f5674c6f6841f2856b70e5d60784be5691",
+ "reference": "bc24c8f5674c6f6841f2856b70e5d60784be5691",
"shasum": ""
},
"require": {
@@ -1096,20 +1106,20 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2016-08-26 11:57:43"
+ "time": "2016-09-28 00:10:16"
},
{
"name": "symfony/http-foundation",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "1d4ab8de2215e44e57fddc1e6b5d122546769e7d"
+ "reference": "a6e6c34d337f3c74c39b29c5f54d33023de8897c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/1d4ab8de2215e44e57fddc1e6b5d122546769e7d",
- "reference": "1d4ab8de2215e44e57fddc1e6b5d122546769e7d",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/a6e6c34d337f3c74c39b29c5f54d33023de8897c",
+ "reference": "a6e6c34d337f3c74c39b29c5f54d33023de8897c",
"shasum": ""
},
"require": {
@@ -1151,20 +1161,20 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "time": "2016-09-06 10:55:00"
+ "time": "2016-10-24 15:52:36"
},
{
"name": "symfony/http-kernel",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "a47004349e9216ab98a8019616a66e2d5c32b0ca"
+ "reference": "ba7249f746da1544512c942c50ef3bc4026296e6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a47004349e9216ab98a8019616a66e2d5c32b0ca",
- "reference": "a47004349e9216ab98a8019616a66e2d5c32b0ca",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ba7249f746da1544512c942c50ef3bc4026296e6",
+ "reference": "ba7249f746da1544512c942c50ef3bc4026296e6",
"shasum": ""
},
"require": {
@@ -1172,7 +1182,7 @@
"psr/log": "~1.0",
"symfony/debug": "~2.6,>=2.6.2",
"symfony/event-dispatcher": "~2.6,>=2.6.7|~3.0.0",
- "symfony/http-foundation": "~2.7.15|~2.8.8|~3.0.8"
+ "symfony/http-foundation": "~2.7.20|~2.8.13|~3.1.6"
},
"conflict": {
"symfony/config": "<2.7"
@@ -1233,7 +1243,7 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
- "time": "2016-09-07 02:02:58"
+ "time": "2016-10-27 02:18:22"
},
{
"name": "symfony/polyfill-mbstring",
@@ -1410,16 +1420,16 @@
},
{
"name": "symfony/proxy-manager-bridge",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/proxy-manager-bridge.git",
- "reference": "ceb78e0773587479b96ff8afd6ac860b4e43f4d8"
+ "reference": "69922100cdfe37bc9c0429cab5bd523e861e562e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/proxy-manager-bridge/zipball/ceb78e0773587479b96ff8afd6ac860b4e43f4d8",
- "reference": "ceb78e0773587479b96ff8afd6ac860b4e43f4d8",
+ "url": "https://api.github.com/repos/symfony/proxy-manager-bridge/zipball/69922100cdfe37bc9c0429cab5bd523e861e562e",
+ "reference": "69922100cdfe37bc9c0429cab5bd523e861e562e",
"shasum": ""
},
"require": {
@@ -1460,11 +1470,11 @@
],
"description": "Symfony ProxyManager Bridge",
"homepage": "https://symfony.com",
- "time": "2016-07-19 10:40:24"
+ "time": "2016-10-03 15:49:46"
},
{
"name": "symfony/routing",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
@@ -1539,21 +1549,21 @@
},
{
"name": "symfony/twig-bridge",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/twig-bridge.git",
- "reference": "5e9679f7085e99adb5248e07b4677494b8f884b5"
+ "reference": "b9df700554a19c9c00c662f2cd9fb3f03c0d4bcf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/5e9679f7085e99adb5248e07b4677494b8f884b5",
- "reference": "5e9679f7085e99adb5248e07b4677494b8f884b5",
+ "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/b9df700554a19c9c00c662f2cd9fb3f03c0d4bcf",
+ "reference": "b9df700554a19c9c00c662f2cd9fb3f03c0d4bcf",
"shasum": ""
},
"require": {
"php": ">=5.3.9",
- "twig/twig": "~1.23|~2.0"
+ "twig/twig": "~1.27|~2.0"
},
"require-dev": {
"symfony/asset": "~2.7|~3.0.0",
@@ -1616,20 +1626,20 @@
],
"description": "Symfony Twig Bridge",
"homepage": "https://symfony.com",
- "time": "2016-09-06 10:55:00"
+ "time": "2016-10-24 15:52:36"
},
{
"name": "symfony/yaml",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c"
+ "reference": "396784cd06b91f3db576f248f2402d547a077787"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/e7540734bad981fe59f8ef14b6fc194ae9df8d9c",
- "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/396784cd06b91f3db576f248f2402d547a077787",
+ "reference": "396784cd06b91f3db576f248f2402d547a077787",
"shasum": ""
},
"require": {
@@ -1665,20 +1675,20 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2016-09-02 01:57:56"
+ "time": "2016-10-21 20:59:10"
},
{
"name": "twig/twig",
- "version": "v1.26.0",
+ "version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "81c2b5fd36581370c7731387f05dcdb577050513"
+ "reference": "3c6c0033fd3b5679c6e1cb60f4f9766c2b424d97"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/81c2b5fd36581370c7731387f05dcdb577050513",
- "reference": "81c2b5fd36581370c7731387f05dcdb577050513",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/3c6c0033fd3b5679c6e1cb60f4f9766c2b424d97",
+ "reference": "3c6c0033fd3b5679c6e1cb60f4f9766c2b424d97",
"shasum": ""
},
"require": {
@@ -1691,7 +1701,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.26-dev"
+ "dev-master": "1.27-dev"
}
},
"autoload": {
@@ -1726,7 +1736,7 @@
"keywords": [
"templating"
],
- "time": "2016-10-02 16:19:13"
+ "time": "2016-10-25 19:17:17"
},
{
"name": "zendframework/zend-code",
@@ -1935,16 +1945,16 @@
},
{
"name": "facebook/webdriver",
- "version": "1.1.2",
+ "version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/facebook/php-webdriver.git",
- "reference": "0b889d7de7461439f8a3bbcca46e0f696cb27986"
+ "reference": "b7186fb1bcfda956d237f59face250d06ef47253"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/0b889d7de7461439f8a3bbcca46e0f696cb27986",
- "reference": "0b889d7de7461439f8a3bbcca46e0f696cb27986",
+ "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/b7186fb1bcfda956d237f59face250d06ef47253",
+ "reference": "b7186fb1bcfda956d237f59face250d06ef47253",
"shasum": ""
},
"require": {
@@ -1952,7 +1962,9 @@
"php": ">=5.3.19"
},
"require-dev": {
- "phpunit/phpunit": "4.6.*"
+ "friendsofphp/php-cs-fixer": "^1.11",
+ "phpunit/phpunit": "4.6.* || ~5.0",
+ "squizlabs/php_codesniffer": "^2.6"
},
"suggest": {
"phpdocumentor/phpdocumentor": "2.*"
@@ -1975,26 +1987,26 @@
"selenium",
"webdriver"
],
- "time": "2016-06-04 00:02:34"
+ "time": "2016-08-10 00:44:08"
},
{
"name": "laravel/homestead",
- "version": "v2.2.1",
+ "version": "v2.2.2",
"source": {
"type": "git",
"url": "https://github.com/laravel/homestead.git",
- "reference": "5008339af93bbb73efee53cbef9374c5d443c708"
+ "reference": "f4e45f895d8707042c2d0698627d33c484e7c6ba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/homestead/zipball/5008339af93bbb73efee53cbef9374c5d443c708",
- "reference": "5008339af93bbb73efee53cbef9374c5d443c708",
+ "url": "https://api.github.com/repos/laravel/homestead/zipball/f4e45f895d8707042c2d0698627d33c484e7c6ba",
+ "reference": "f4e45f895d8707042c2d0698627d33c484e7c6ba",
"shasum": ""
},
"require": {
"php": ">=5.4",
- "symfony/console": "~2.0",
- "symfony/process": "~2.0"
+ "symfony/console": "~2.0 || ~3.0",
+ "symfony/process": "~2.0 || ~3.0"
},
"bin": [
"homestead"
@@ -2016,20 +2028,20 @@
}
],
"description": "A virtual machine for web artisans.",
- "time": "2016-01-05 19:19:26"
+ "time": "2016-09-17 04:42:33"
},
{
"name": "michelf/php-markdown",
- "version": "1.6.0",
+ "version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/michelf/php-markdown.git",
- "reference": "156e56ee036505ec637d761ee62dc425d807183c"
+ "reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/michelf/php-markdown/zipball/156e56ee036505ec637d761ee62dc425d807183c",
- "reference": "156e56ee036505ec637d761ee62dc425d807183c",
+ "url": "https://api.github.com/repos/michelf/php-markdown/zipball/1f51cc520948f66cd2af8cbc45a5ee175e774220",
+ "reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220",
"shasum": ""
},
"require": {
@@ -2067,7 +2079,7 @@
"keywords": [
"markdown"
],
- "time": "2015-12-24 01:37:31"
+ "time": "2016-10-29 18:58:20"
},
{
"name": "nikic/php-parser",
@@ -2818,23 +2830,23 @@
},
{
"name": "sebastian/environment",
- "version": "1.3.7",
+ "version": "1.3.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716"
+ "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716",
- "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
+ "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^5.3.3 || ^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^4.8 || ^5.0"
},
"type": "library",
"extra": {
@@ -2864,7 +2876,7 @@
"environment",
"hhvm"
],
- "time": "2016-05-17 03:18:57"
+ "time": "2016-08-18 05:49:44"
},
{
"name": "sebastian/exporter",
@@ -3023,16 +3035,16 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "2.6.2",
+ "version": "2.7.0",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "4edb770cb853def6e60c93abb088ad5ac2010c83"
+ "reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/4edb770cb853def6e60c93abb088ad5ac2010c83",
- "reference": "4edb770cb853def6e60c93abb088ad5ac2010c83",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/571e27b6348e5b3a637b2abc82ac0d01e6d7bbed",
+ "reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed",
"shasum": ""
},
"require": {
@@ -3097,11 +3109,11 @@
"phpcs",
"standards"
],
- "time": "2016-07-13 23:29:13"
+ "time": "2016-09-01 23:53:02"
},
{
"name": "symfony/browser-kit",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
@@ -3158,7 +3170,7 @@
},
{
"name": "symfony/css-selector",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
@@ -3211,16 +3223,16 @@
},
{
"name": "symfony/dom-crawler",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "aac03b7ea2a7adff10a3599d614e79e6101230ab"
+ "reference": "a94f3fe6f179d6453e5ed8188cf4bfdf933d85f4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/aac03b7ea2a7adff10a3599d614e79e6101230ab",
- "reference": "aac03b7ea2a7adff10a3599d614e79e6101230ab",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/a94f3fe6f179d6453e5ed8188cf4bfdf933d85f4",
+ "reference": "a94f3fe6f179d6453e5ed8188cf4bfdf933d85f4",
"shasum": ""
},
"require": {
@@ -3263,20 +3275,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2016-07-30 07:20:35"
+ "time": "2016-10-18 15:35:45"
},
{
"name": "symfony/process",
- "version": "v2.8.11",
+ "version": "v2.8.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "05a03ed27073638658cab9405d99a67dd1014987"
+ "reference": "024de37f8a6b9e5e8244d9eb3fcf3e467dd2a93f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/05a03ed27073638658cab9405d99a67dd1014987",
- "reference": "05a03ed27073638658cab9405d99a67dd1014987",
+ "url": "https://api.github.com/repos/symfony/process/zipball/024de37f8a6b9e5e8244d9eb3fcf3e467dd2a93f",
+ "reference": "024de37f8a6b9e5e8244d9eb3fcf3e467dd2a93f",
"shasum": ""
},
"require": {
@@ -3312,7 +3324,7 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2016-09-06 10:55:00"
+ "time": "2016-09-29 14:03:54"
}
],
"aliases": [],
diff --git a/phpBB/config/default/container/services_auth.yml b/phpBB/config/default/container/services_auth.yml
index ee6f7ef448..ed8dc90a74 100644
--- a/phpBB/config/default/container/services_auth.yml
+++ b/phpBB/config/default/container/services_auth.yml
@@ -63,6 +63,7 @@ services:
- '@auth.provider.oauth.service_collection'
- '%tables.users%'
- '@service_container'
+ - '@dispatcher'
- '%core.root_path%'
- '%core.php_ext%'
tags:
diff --git a/phpBB/config/default/container/services_db.yml b/phpBB/config/default/container/services_db.yml
index 30c5a7fc7f..d7a8238400 100644
--- a/phpBB/config/default/container/services_db.yml
+++ b/phpBB/config/default/container/services_db.yml
@@ -71,11 +71,3 @@ services:
- '%core.root_path%'
- '@request'
- '@dbal.conn.driver'
-
- dbal.extractor.extractors.sqlite_extractor:
- class: phpbb\db\extractor\sqlite_extractor
- shared: false
- arguments:
- - '%core.root_path%'
- - '@request'
- - '@dbal.conn.driver'
diff --git a/phpBB/develop/add_permissions.php b/phpBB/develop/add_permissions.php
index 697dbdbaca..c575729d91 100644
--- a/phpBB/develop/add_permissions.php
+++ b/phpBB/develop/add_permissions.php
@@ -379,7 +379,6 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
$sql = 'VALUES ' . implode(', ', preg_replace('#^(.*?)$#', '(\1)', $sql_subary));
break;
- case 'sqlite':
case 'sqlite3':
$sql = implode(' UNION ALL ', preg_replace('#^(.*?)$#', 'SELECT \1', $sql_subary));
break;
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 09bc4c4085..6e0a082045 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -49,7 +49,7 @@ $classes = $finder->core_path('phpbb/')
->directory('/db/migration/data')
->get_classes();
-$db = new \phpbb\db\driver\sqlite();
+$db = new \phpbb\db\driver\sqlite3();
$factory = new \phpbb\db\tools\factory();
$db_tools = $factory->get($db, true);
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
index 4837ad35e2..748ae69cf7 100644
--- a/phpBB/docs/INSTALL.html
+++ b/phpBB/docs/INSTALL.html
@@ -142,7 +142,6 @@
<li>MySQL 3.23 or above (MySQLi supported)</li>
<li>MariaDB 5.1 or above</li>
<li>PostgreSQL 8.3+</li>
- <li>SQLite 2.8.2+</li>
<li>SQLite 3.6.15+</li>
<li>MS SQL Server 2000 or above (via ODBC or the native adapter)</li>
<li>Oracle</li>
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html
index 770c30f932..7fd80b3c2d 100644
--- a/phpBB/docs/README.html
+++ b/phpBB/docs/README.html
@@ -327,7 +327,7 @@
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
- <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8, SQLite 2 and SQLite 3. Versions of PHP used range from 5.4.x above 5.6.x to 7.0.x without problem.</p>
+ <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 5.4.x above 5.6.x to 7.0.x without problem.</p>
<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index 9e07290697..9b5c668880 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -1123,9 +1123,6 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<ul>
<li>
- <p>Use <code>sizeof</code> instead of <code>count</code></p>
- </li>
- <li>
<p>Use <code>strpos</code> instead of <code>strstr</code></p>
</li>
<li>
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index f487662da5..02af98ec54 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -1044,7 +1044,7 @@ class acp_board
$user->timezone = $old_tz;
return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('" . addslashes($key) . "').value = '" . addslashes($value) . "'; } else { document.getElementById('" . addslashes($key) . "').value = this.value; }\">$dateformat_options</select>
- <input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />";
+ <input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"64\" />";
}
/**
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 5e430e82ea..00c7ef40c0 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -115,7 +115,6 @@ class acp_database
// We might wanna empty out all that junk :D
switch ($db->get_sql_layer())
{
- case 'sqlite':
case 'sqlite3':
$extractor->flush('DELETE FROM ' . $table_name . ";\n");
break;
@@ -304,7 +303,6 @@ class acp_database
case 'mysql':
case 'mysql4':
case 'mysqli':
- case 'sqlite':
case 'sqlite3':
while (($sql = $fgetd($fp, ";\n", $read, $seek, $eof)) !== false)
{
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 9fbf2f20f1..d2e01c80cc 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -34,7 +34,7 @@ class acp_extensions
function main()
{
// Start the page
- global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpbb_log, $cache;
+ global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpbb_log, $cache, $phpbb_dispatcher;
$this->db = $db;
$this->config = $config;
@@ -43,6 +43,7 @@ class acp_extensions
$this->cache = $cache;
$this->request = $request;
$this->log = $phpbb_log;
+ $this->phpbb_dispatcher = $phpbb_dispatcher;
$user->add_lang(array('install', 'acp/extensions', 'migrator'));
@@ -55,6 +56,21 @@ class acp_extensions
$safe_time_limit = (ini_get('max_execution_time') / 2);
$start_time = time();
+ /**
+ * Event to run a specific action on extension
+ *
+ * @event core.acp_extensions_run_action
+ * @var string action Action to run
+ * @var string u_action Url we are at
+ * @var string ext_name Extension name from request
+ * @var int safe_time_limit Safe limit of execution time
+ * @var int start_time Start time
+ * @since 3.1.11-RC1
+ */
+ $u_action = $this->u_action;
+ $vars = array('action', 'u_action', 'ext_name', 'safe_time_limit', 'start_time');
+ extract($this->phpbb_dispatcher->trigger_event('core.acp_extensions_run_action', compact($vars)));
+
// Cancel action
if ($request->is_set_post('cancel'))
{
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index f5c7ab0dfe..6cd5386857 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -563,7 +563,6 @@ class acp_icons
{
switch ($db->get_sql_layer())
{
- case 'sqlite':
case 'sqlite3':
$db->sql_query('DELETE FROM ' . $table);
break;
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 8697504c77..fe9657aecb 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -275,7 +275,6 @@ class acp_main
case 'db_track':
switch ($db->get_sql_layer())
{
- case 'sqlite':
case 'sqlite3':
$db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
break;
@@ -386,7 +385,6 @@ class acp_main
{
switch ($db->get_sql_layer())
{
- case 'sqlite':
case 'sqlite3':
$db->sql_query("DELETE FROM $table");
break;
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
index 020bd8f48c..51c398681d 100644
--- a/phpBB/includes/acp/acp_reasons.php
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -250,7 +250,6 @@ class acp_reasons
// Teh standard
case 'postgres':
case 'oracle':
- case 'sqlite':
case 'sqlite3':
// Change the reports using this reason to 'other'
$sql = 'UPDATE ' . REPORTS_TABLE . '
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index fc7f3bb56a..25e9d6f658 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -1959,7 +1959,7 @@ class acp_users
'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
- 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
+ 'L_AVATAR_EXPLAIN' => $user->lang(($config['avatar_filesize'] == 0) ? 'AVATAR_EXPLAIN_NO_FILESIZE' : 'AVATAR_EXPLAIN', $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
'S_AVATARS_ENABLED' => ($config['allow_avatar'] && $avatars_enabled),
));
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index bbd3e524cc..8996c0e766 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3522,7 +3522,7 @@ function obtain_guest_count($item_id = 0, $item = 'forum')
// Get number of online guests
- if ($db->get_sql_layer() === 'sqlite' || $db->get_sql_layer() === 'sqlite3')
+ if ($db->get_sql_layer() === 'sqlite3')
{
$sql = 'SELECT COUNT(session_ip) as num_guests
FROM (
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index df89b1c0ff..c1a99da231 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2403,7 +2403,6 @@ function phpbb_cache_moderators($db, $cache, $auth)
// Clear table
switch ($db->get_sql_layer())
{
- case 'sqlite':
case 'sqlite3':
$db->sql_query('DELETE FROM ' . MODERATOR_CACHE_TABLE);
break;
@@ -2861,7 +2860,6 @@ function get_database_size()
}
break;
- case 'sqlite':
case 'sqlite3':
global $dbhost;
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index e36eb8119b..9ec965a6a1 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -1035,7 +1035,7 @@ function bbcode_nl2br($text)
*/
function smiley_text($text, $force_option = false)
{
- global $config, $user, $phpbb_path_helper;
+ global $config, $user, $phpbb_path_helper, $phpbb_dispatcher;
if ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies'))
{
@@ -1044,6 +1044,16 @@ function smiley_text($text, $force_option = false)
else
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();
+
+ /**
+ * Event to override the root_path for smilies
+ *
+ * @event core.smiley_text_root_path
+ * @var string root_path root_path for smilies
+ * @since 3.1.11-RC1
+ */
+ $vars = array('root_path');
+ extract($phpbb_dispatcher->trigger_event('core.smiley_text_root_path', compact($vars)));
return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img class="smilies" src="' . $root_path . $config['smilies_path'] . '/\2 />', $text);
}
}
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index c508ef313b..176e3dd6de 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -1652,7 +1652,6 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
$sql = 'VALUES ' . implode(', ', preg_replace('#^(.*?)$#', '(\1)', $sql_subary));
break;
- case 'sqlite':
case 'sqlite3':
case 'mssqlnative':
$sql = implode(' UNION ALL ', preg_replace('#^(.*?)$#', 'SELECT \1', $sql_subary));
@@ -2040,7 +2039,6 @@ function update_topics_posted()
switch ($db->get_sql_layer())
{
- case 'sqlite':
case 'sqlite3':
$db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
break;
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 0056cbca35..526e18528f 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -431,7 +431,7 @@ class messenger
*/
function build_header($to, $cc, $bcc)
{
- global $config;
+ global $config, $phpbb_dispatcher;
// We could use keys here, but we won't do this for 3.0.x to retain backwards compatibility
$headers = array();
@@ -463,6 +463,16 @@ class messenger
$headers[] = 'X-MimeOLE: phpBB3';
$headers[] = 'X-phpBB-Origin: phpbb://' . str_replace(array('http://', 'https://'), array('', ''), generate_board_url());
+ /**
+ * Event to modify email header entries
+ *
+ * @event core.modify_email_headers
+ * @var array headers Array containing email header entries
+ * @since 3.1.11-RC1
+ */
+ $vars = array('headers');
+ extract($phpbb_dispatcher->trigger_event('core.modify_email_headers', compact($vars)));
+
if (sizeof($this->extra_headers))
{
$headers = array_merge($headers, $this->extra_headers);
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 3a2004396c..551165c558 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -120,6 +120,15 @@ function generate_smilies($mode, $forum_id)
foreach ($smilies as $row)
{
+ /**
+ * Modify smiley root path before populating smiley list
+ *
+ * @event core.generate_smilies_before
+ * @var string root_path root_path for smilies
+ * @since 3.1.11-RC1
+ */
+ $vars = array('root_path');
+ extract($phpbb_dispatcher->trigger_event('core.generate_smilies_before', compact($vars)));
$template->assign_block_vars('smiley', array(
'SMILEY_CODE' => $row['code'],
'A_SMILEY_CODE' => addslashes($row['code']),
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index f29f974ccf..227ac3fe0c 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -2204,7 +2204,7 @@ function phpbb_avatar_explanation_string()
{
global $config, $user;
- return $user->lang('AVATAR_EXPLAIN',
+ return $user->lang(($config['avatar_filesize'] == 0) ? 'AVATAR_EXPLAIN_NO_FILESIZE' : 'AVATAR_EXPLAIN',
$user->lang('PIXELS', (int) $config['avatar_max_width']),
$user->lang('PIXELS', (int) $config['avatar_max_height']),
round($config['avatar_filesize'] / 1024));
diff --git a/phpBB/install/convert/controller/convertor.php b/phpBB/install/convert/controller/convertor.php
index a40f1d0b52..9a46117fe6 100644
--- a/phpBB/install/convert/controller/convertor.php
+++ b/phpBB/install/convert/controller/convertor.php
@@ -410,7 +410,6 @@ class convertor
switch ($this->db->get_sql_layer())
{
- case 'sqlite':
case 'sqlite3':
$this->db->sql_query('DELETE FROM ' . $this->session_keys_table);
$this->db->sql_query('DELETE FROM ' . $this->session_table);
diff --git a/phpBB/install/convert/convertor.php b/phpBB/install/convert/convertor.php
index 08e485f726..f7f05ebdae 100644
--- a/phpBB/install/convert/convertor.php
+++ b/phpBB/install/convert/convertor.php
@@ -144,7 +144,6 @@ class convertor
$convert->mysql_convert = false;
switch ($src_db->sql_layer)
{
- case 'sqlite':
case 'sqlite3':
$convert->src_truncate_statement = 'DELETE FROM ';
break;
@@ -176,7 +175,6 @@ class convertor
switch ($db->get_sql_layer())
{
- case 'sqlite':
case 'sqlite3':
$convert->truncate_statement = 'DELETE FROM ';
break;
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index 0e3ef43328..6f43e1915e 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -1827,7 +1827,6 @@ function phpbb_create_userconv_table()
)';
break;
- case 'sqlite':
case 'sqlite3':
$create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' (
user_id INTEGER NOT NULL DEFAULT \'0\',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 1bf09fdb26..35cea17a24 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -72,7 +72,6 @@ $lang = array_merge($lang, array(
<ul>
<li>MySQL 3.23 or above (MySQLi supported)</li>
<li>PostgreSQL 8.3+</li>
- <li>SQLite 2.8.2+</li>
<li>SQLite 3.6.15+</li>
<li>MS SQL Server 2000 or above (directly or via ODBC)</li>
<li>MS SQL Server 2005 or above (native)</li>
@@ -191,7 +190,6 @@ $lang = array_merge($lang, array(
'DB_OPTION_MYSQLI' => 'MySQL with MySQLi Extension',
'DB_OPTION_ORACLE' => 'Oracle',
'DB_OPTION_POSTGRES' => 'PostgreSQL',
- 'DB_OPTION_SQLITE' => 'SQLite 2',
'DB_OPTION_SQLITE3' => 'SQLite 3',
// Errors
@@ -204,7 +202,6 @@ $lang = array_merge($lang, array(
'INST_ERR_DB_NO_ERROR' => 'No error message given.',
'INST_ERR_PREFIX' => 'Tables with the specified prefix already exist, please choose an alternative.',
'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the “MySQL with MySQLi Extension” option you have selected. Please try the “MySQL” option instead.',
- 'INST_ERR_DB_NO_SQLITE' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 2.8.2.',
'INST_ERR_DB_NO_SQLITE3' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 3.6.15.',
'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the <var>NLS_CHARACTERSET</var> parameter to <var>UTF8</var>. Either upgrade your installation to 9.2+ or change the parameter.',
'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in <var>UNICODE</var> or <var>UTF8</var> encoding. Try installing with a database in <var>UNICODE</var> or <var>UTF8</var> encoding.',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index ec7f3fe714..5056e23d24 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -100,6 +100,7 @@ $lang = array_merge($lang, array(
'AVATAR_DRIVER_UPLOAD_TITLE' => 'Upload avatar',
'AVATAR_DRIVER_UPLOAD_EXPLAIN' => 'Upload your own custom avatar.',
'AVATAR_EXPLAIN' => 'Maximum dimensions; width: %1$s, height: %2$s, file size: %3$.2f KiB.',
+ 'AVATAR_EXPLAIN_NO_FILESIZE' => 'Maximum dimensions; width: %1$s, height: %2$s.',
'AVATAR_FEATURES_DISABLED' => 'The avatar functionality is currently disabled.',
'AVATAR_GALLERY' => 'Local gallery',
'AVATAR_GENERAL_UPLOAD_ERROR' => 'Could not upload avatar to %s.',
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index 04729d8453..fdc5f57df0 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -105,6 +105,13 @@ class oauth extends \phpbb\auth\provider\base
protected $phpbb_container;
/**
+ * phpBB event dispatcher
+ *
+ * @var \phpbb\event\dispatcher_interface
+ */
+ protected $dispatcher;
+
+ /**
* phpBB root path
*
* @var string
@@ -132,10 +139,11 @@ class oauth extends \phpbb\auth\provider\base
* @param \phpbb\di\service_collection $service_providers Contains \phpbb\auth\provider\oauth\service_interface
* @param string $users_table
* @param \Symfony\Component\DependencyInjection\ContainerInterface $phpbb_container DI container
+ * @param \phpbb\event\dispatcher_interface $dispatcher phpBB event dispatcher
* @param string $phpbb_root_path
* @param string $php_ext
*/
- public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request_interface $request, \phpbb\user $user, $auth_provider_oauth_token_storage_table, $auth_provider_oauth_state_table, $auth_provider_oauth_token_account_assoc, \phpbb\di\service_collection $service_providers, $users_table, \Symfony\Component\DependencyInjection\ContainerInterface $phpbb_container, $phpbb_root_path, $php_ext)
+ public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request_interface $request, \phpbb\user $user, $auth_provider_oauth_token_storage_table, $auth_provider_oauth_state_table, $auth_provider_oauth_token_account_assoc, \phpbb\di\service_collection $service_providers, $users_table, \Symfony\Component\DependencyInjection\ContainerInterface $phpbb_container, \phpbb\event\dispatcher_interface $dispatcher, $phpbb_root_path, $php_ext)
{
$this->db = $db;
$this->config = $config;
@@ -148,6 +156,7 @@ class oauth extends \phpbb\auth\provider\base
$this->service_providers = $service_providers;
$this->users_table = $users_table;
$this->phpbb_container = $phpbb_container;
+ $this->dispatcher = $dispatcher;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
}
@@ -248,6 +257,18 @@ class oauth extends \phpbb\auth\provider\base
// Update token storage to store the user_id
$storage->set_user_id($row['user_id']);
+ /**
+ * Event is triggered after user is successfuly logged in via OAuth.
+ *
+ * @event core.auth_oauth_login_after
+ * @var array row User row
+ * @since 3.1.11-RC1
+ */
+ $vars = array(
+ 'row',
+ );
+ extract($this->dispatcher->trigger_event('core.auth_oauth_login_after', compact($vars)));
+
// The user is now authenticated and can be logged in
return array(
'status' => LOGIN_SUCCESS,
@@ -569,6 +590,18 @@ class oauth extends \phpbb\auth\provider\base
$sql = 'INSERT INTO ' . $this->auth_provider_oauth_token_account_assoc . '
' . $this->db->sql_build_array('INSERT', $data);
$this->db->sql_query($sql);
+
+ /**
+ * Event is triggered after user links account.
+ *
+ * @event core.auth_oauth_link_after
+ * @var array data User row
+ * @since 3.1.11-RC1
+ */
+ $vars = array(
+ 'data',
+ );
+ extract($this->dispatcher->trigger_event('core.auth_oauth_link_after', compact($vars)));
}
/**
diff --git a/phpBB/phpbb/db/driver/sqlite.php b/phpBB/phpbb/db/driver/sqlite.php
deleted file mode 100644
index 8e205ebb81..0000000000
--- a/phpBB/phpbb/db/driver/sqlite.php
+++ /dev/null
@@ -1,384 +0,0 @@
-<?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\driver;
-
-/**
-* Sqlite Database Abstraction Layer
-* Minimum Requirement: 2.8.2+
-*/
-class sqlite extends \phpbb\db\driver\driver
-{
- var $connect_error = '';
-
- /**
- * {@inheritDoc}
- */
- function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
- {
- $this->persistency = $persistency;
- $this->user = $sqluser;
- $this->server = $sqlserver . (($port) ? ':' . $port : '');
- $this->dbname = $database;
-
- $error = '';
- if ($this->persistency)
- {
- if (!function_exists('sqlite_popen'))
- {
- $this->connect_error = 'sqlite_popen function does not exist, is sqlite extension installed?';
- return $this->sql_error('');
- }
- $this->db_connect_id = @sqlite_popen($this->server, 0666, $error);
- }
- else
- {
- if (!function_exists('sqlite_open'))
- {
- $this->connect_error = 'sqlite_open function does not exist, is sqlite extension installed?';
- return $this->sql_error('');
- }
- $this->db_connect_id = @sqlite_open($this->server, 0666, $error);
- }
-
- if ($this->db_connect_id)
- {
- @sqlite_query('PRAGMA short_column_names = 1', $this->db_connect_id);
-// @sqlite_query('PRAGMA encoding = "UTF-8"', $this->db_connect_id);
- }
-
- return ($this->db_connect_id) ? true : array('message' => $error);
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_server_info($raw = false, $use_cache = true)
- {
- global $cache;
-
- if (!$use_cache || empty($cache) || ($this->sql_server_version = $cache->get('sqlite_version')) === false)
- {
- $result = @sqlite_query('SELECT sqlite_version() AS version', $this->db_connect_id);
- if ($result)
- {
- $row = sqlite_fetch_array($result, SQLITE_ASSOC);
-
- $this->sql_server_version = (!empty($row['version'])) ? $row['version'] : 0;
-
- if (!empty($cache) && $use_cache)
- {
- $cache->put('sqlite_version', $this->sql_server_version);
- }
- }
- }
-
- return ($raw) ? $this->sql_server_version : 'SQLite ' . $this->sql_server_version;
- }
-
- /**
- * SQL Transaction
- * @access private
- */
- function _sql_transaction($status = 'begin')
- {
- switch ($status)
- {
- case 'begin':
- return @sqlite_query('BEGIN', $this->db_connect_id);
- break;
-
- case 'commit':
- return @sqlite_query('COMMIT', $this->db_connect_id);
- break;
-
- case 'rollback':
- return @sqlite_query('ROLLBACK', $this->db_connect_id);
- break;
- }
-
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_query($query = '', $cache_ttl = 0)
- {
- if ($query != '')
- {
- global $cache;
-
- // EXPLAIN only in extra debug mode
- if (defined('DEBUG'))
- {
- $this->sql_report('start', $query);
- }
- else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
- {
- $this->curtime = microtime(true);
- }
-
- $this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
- $this->sql_add_num_queries($this->query_result);
-
- if ($this->query_result === false)
- {
- if (($this->query_result = @sqlite_query($query, $this->db_connect_id)) === false)
- {
- $this->sql_error($query);
- }
-
- if (defined('DEBUG'))
- {
- $this->sql_report('stop', $query);
- }
- else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
- {
- $this->sql_time += microtime(true) - $this->curtime;
- }
-
- if (!$this->query_result)
- {
- return false;
- }
-
- if ($cache && $cache_ttl)
- {
- $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
- }
- }
- else if (defined('DEBUG'))
- {
- $this->sql_report('fromcache', $query);
- }
- }
- else
- {
- return false;
- }
-
- return $this->query_result;
- }
-
- /**
- * Build LIMIT query
- */
- function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
- {
- $this->query_result = false;
-
- // if $total is set to 0 we do not want to limit the number of rows
- if ($total == 0)
- {
- $total = -1;
- }
-
- $query .= "\n LIMIT " . ((!empty($offset)) ? $offset . ', ' . $total : $total);
-
- return $this->sql_query($query, $cache_ttl);
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_affectedrows()
- {
- return ($this->db_connect_id) ? @sqlite_changes($this->db_connect_id) : false;
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_fetchrow($query_id = false)
- {
- global $cache;
-
- if ($query_id === false)
- {
- $query_id = $this->query_result;
- }
-
- if ($cache && $cache->sql_exists($query_id))
- {
- return $cache->sql_fetchrow($query_id);
- }
-
- return ($query_id) ? sqlite_fetch_array($query_id, SQLITE_ASSOC) : false;
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_rowseek($rownum, &$query_id)
- {
- global $cache;
-
- if ($query_id === false)
- {
- $query_id = $this->query_result;
- }
-
- if ($cache && $cache->sql_exists($query_id))
- {
- return $cache->sql_rowseek($rownum, $query_id);
- }
-
- return ($query_id) ? @sqlite_seek($query_id, $rownum) : false;
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_nextid()
- {
- return ($this->db_connect_id) ? @sqlite_last_insert_rowid($this->db_connect_id) : false;
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_freeresult($query_id = false)
- {
- global $cache;
-
- if ($query_id === false)
- {
- $query_id = $this->query_result;
- }
-
- if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
- {
- return $cache->sql_freeresult($query_id);
- }
-
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_escape($msg)
- {
- return @sqlite_escape_string($msg);
- }
-
- /**
- * {@inheritDoc}
- *
- * For SQLite an underscore is a not-known character... this may change with SQLite3
- */
- function sql_like_expression($expression)
- {
- // Unlike LIKE, GLOB is unfortunately case sensitive.
- // We only catch * and ? here, not the character map possible on file globbing.
- $expression = str_replace(array(chr(0) . '_', chr(0) . '%'), array(chr(0) . '?', chr(0) . '*'), $expression);
-
- $expression = str_replace(array('?', '*'), array("\?", "\*"), $expression);
- $expression = str_replace(array(chr(0) . "\?", chr(0) . "\*"), array('?', '*'), $expression);
-
- return 'GLOB \'' . $this->sql_escape($expression) . '\'';
- }
-
- /**
- * {@inheritDoc}
- *
- * For SQLite an underscore is a not-known character...
- */
- function sql_not_like_expression($expression)
- {
- // Unlike NOT LIKE, NOT GLOB is unfortunately case sensitive.
- // We only catch * and ? here, not the character map possible on file globbing.
- $expression = str_replace(array(chr(0) . '_', chr(0) . '%'), array(chr(0) . '?', chr(0) . '*'), $expression);
-
- $expression = str_replace(array('?', '*'), array("\?", "\*"), $expression);
- $expression = str_replace(array(chr(0) . "\?", chr(0) . "\*"), array('?', '*'), $expression);
-
- return 'NOT GLOB \'' . $this->sql_escape($expression) . '\'';
- }
-
- /**
- * return sql error array
- * @access private
- */
- function _sql_error()
- {
- if (function_exists('sqlite_error_string'))
- {
- $error = array(
- 'message' => @sqlite_error_string(@sqlite_last_error($this->db_connect_id)),
- 'code' => @sqlite_last_error($this->db_connect_id),
- );
- }
- else
- {
- $error = array(
- 'message' => $this->connect_error,
- 'code' => '',
- );
- }
-
- return $error;
- }
-
- /**
- * Build db-specific query data
- * @access private
- */
- function _sql_custom_build($stage, $data)
- {
- return $data;
- }
-
- /**
- * Close sql connection
- * @access private
- */
- function _sql_close()
- {
- return @sqlite_close($this->db_connect_id);
- }
-
- /**
- * Build db-specific report
- * @access private
- */
- function _sql_report($mode, $query = '')
- {
- switch ($mode)
- {
- case 'start':
- break;
-
- case 'fromcache':
- $endtime = explode(' ', microtime());
- $endtime = $endtime[0] + $endtime[1];
-
- $result = @sqlite_query($query, $this->db_connect_id);
- if ($result)
- {
- while ($void = sqlite_fetch_array($result, SQLITE_ASSOC))
- {
- // Take the time spent on parsing rows into account
- }
- }
-
- $splittime = explode(' ', microtime());
- $splittime = $splittime[0] + $splittime[1];
-
- $this->sql_report('record_fromcache', $query, $endtime, $splittime);
-
- break;
- }
- }
-}
diff --git a/phpBB/phpbb/db/extractor/factory.php b/phpBB/phpbb/db/extractor/factory.php
index eed3661ae9..f27aae720f 100644
--- a/phpBB/phpbb/db/extractor/factory.php
+++ b/phpBB/phpbb/db/extractor/factory.php
@@ -65,10 +65,6 @@ class factory
{
return $this->container->get('dbal.extractor.extractors.postgres_extractor');
}
- else if ($this->db instanceof \phpbb\db\driver\sqlite)
- {
- return $this->container->get('dbal.extractor.extractors.sqlite_extractor');
- }
else if ($this->db instanceof \phpbb\db\driver\sqlite3)
{
return $this->container->get('dbal.extractor.extractors.sqlite3_extractor');
diff --git a/phpBB/phpbb/db/extractor/sqlite_extractor.php b/phpBB/phpbb/db/extractor/sqlite_extractor.php
deleted file mode 100644
index 2734e23235..0000000000
--- a/phpBB/phpbb/db/extractor/sqlite_extractor.php
+++ /dev/null
@@ -1,149 +0,0 @@
-<?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\extractor;
-
-use phpbb\db\extractor\exception\extractor_not_initialized_exception;
-
-class sqlite_extractor extends base_extractor
-{
- /**
- * {@inheritdoc}
- */
- public function write_start($table_prefix)
- {
- if (!$this->is_initialized)
- {
- throw new extractor_not_initialized_exception();
- }
-
- $sql_data = "--\n";
- $sql_data .= "-- phpBB Backup Script\n";
- $sql_data .= "-- Dump of tables for $table_prefix\n";
- $sql_data .= "-- DATE : " . gmdate("d-m-Y H:i:s", $this->time) . " GMT\n";
- $sql_data .= "--\n";
- $sql_data .= "BEGIN TRANSACTION;\n";
- $this->flush($sql_data);
- }
-
- /**
- * {@inheritdoc}
- */
- public function write_table($table_name)
- {
- if (!$this->is_initialized)
- {
- throw new extractor_not_initialized_exception();
- }
-
- $sql_data = '-- Table: ' . $table_name . "\n";
- $sql_data .= "DROP TABLE $table_name;\n";
-
- $sql = "SELECT sql
- FROM sqlite_master
- WHERE type = 'table'
- AND name = '" . $this->db->sql_escape($table_name) . "'
- ORDER BY type DESC, name;";
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
-
- // Create Table
- $sql_data .= $row['sql'] . ";\n";
-
- $result = $this->db->sql_query("PRAGMA index_list('" . $this->db->sql_escape($table_name) . "');");
-
- $ar = array();
- while ($row = $this->db->sql_fetchrow($result))
- {
- $ar[] = $row;
- }
- $this->db->sql_freeresult($result);
-
- foreach ($ar as $value)
- {
- if (strpos($value['name'], 'autoindex') !== false)
- {
- continue;
- }
-
- $result = $this->db->sql_query("PRAGMA index_info('" . $this->db->sql_escape($value['name']) . "');");
-
- $fields = array();
- while ($row = $this->db->sql_fetchrow($result))
- {
- $fields[] = $row['name'];
- }
- $this->db->sql_freeresult($result);
-
- $sql_data .= 'CREATE ' . ($value['unique'] ? 'UNIQUE ' : '') . 'INDEX ' . $value['name'] . ' on ' . $table_name . ' (' . implode(', ', $fields) . ");\n";
- }
-
- $this->flush($sql_data . "\n");
- }
-
- /**
- * {@inheritdoc}
- */
- public function write_data($table_name)
- {
- if (!$this->is_initialized)
- {
- throw new extractor_not_initialized_exception();
- }
-
- $col_types = sqlite_fetch_column_types($this->db->get_db_connect_id(), $table_name);
-
- $sql = "SELECT *
- FROM $table_name";
- $result = sqlite_unbuffered_query($this->db->get_db_connect_id(), $sql);
- $rows = sqlite_fetch_all($result, SQLITE_ASSOC);
- $sql_insert = 'INSERT INTO ' . $table_name . ' (' . implode(', ', array_keys($col_types)) . ') VALUES (';
- foreach ($rows as $row)
- {
- foreach ($row as $column_name => $column_data)
- {
- if (is_null($column_data))
- {
- $row[$column_name] = 'NULL';
- }
- else if ($column_data == '')
- {
- $row[$column_name] = "''";
- }
- else if (strpos($col_types[$column_name], 'text') !== false || strpos($col_types[$column_name], 'char') !== false || strpos($col_types[$column_name], 'blob') !== false)
- {
- $row[$column_name] = sanitize_data_generic(str_replace("'", "''", $column_data));
- }
- }
- $this->flush($sql_insert . implode(', ', $row) . ");\n");
- }
- }
-
- /**
- * Writes closing line(s) to database backup
- *
- * @return null
- * @throws \phpbb\db\extractor\exception\extractor_not_initialized_exception when calling this function before init_extractor()
- */
- public function write_end()
- {
- if (!$this->is_initialized)
- {
- throw new extractor_not_initialized_exception();
- }
-
- $this->flush("COMMIT;\n");
- parent::write_end();
- }
-}
diff --git a/phpBB/phpbb/db/migration/data/v31x/remove_duplicate_migrations.php b/phpBB/phpbb/db/migration/data/v31x/remove_duplicate_migrations.php
new file mode 100644
index 0000000000..417d569a09
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/remove_duplicate_migrations.php
@@ -0,0 +1,77 @@
+<?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 remove_duplicate_migrations extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v31x\v3110');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'deduplicate_entries'))),
+ );
+ }
+
+ public function deduplicate_entries()
+ {
+ $migration_state = array();
+ $duplicate_migrations = array();
+
+ $sql = "SELECT *
+ FROM " . $this->table_prefix . 'migrations';
+ $result = $this->db->sql_query($sql);
+
+ if (!$this->db->get_sql_error_triggered())
+ {
+ while ($migration = $this->db->sql_fetchrow($result))
+ {
+ $migration_state[$migration['migration_name']] = $migration;
+
+ $migration_state[$migration['migration_name']]['migration_depends_on'] = unserialize($migration['migration_depends_on']);
+ }
+ }
+
+ $this->db->sql_freeresult($result);
+
+ foreach ($migration_state as $name => $migration)
+ {
+ $prepended_name = ($name[0] == '\\' ? '' : '\\') . $name;
+ $prefixless_name = $name[0] == '\\' ? substr($name, 1) : $name;
+
+ if ($prepended_name != $name && isset($migration_state[$prepended_name]) && $migration_state[$prepended_name]['migration_depends_on'] == $migration_state[$name]['migration_depends_on'])
+ {
+ $duplicate_migrations[] = $name;
+ unset($migration_state[$prepended_name]);
+ }
+ else if ($prefixless_name != $name && isset($migration_state[$prefixless_name]) && $migration_state[$prefixless_name]['migration_depends_on'] == $migration_state[$name]['migration_depends_on'])
+ {
+ $duplicate_migrations[] = $prefixless_name;
+ unset($migration_state[$prefixless_name]);
+ }
+ }
+
+ if (count($duplicate_migrations))
+ {
+ $sql = 'DELETE
+ FROM ' . $this->table_prefix . 'migrations
+ WHERE ' . $this->db->sql_in_set('migration_name', $duplicate_migrations);
+ $this->db->sql_query($sql);
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index 86cb45df6f..d7d7f18d2b 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -243,6 +243,34 @@ class migrator
}
/**
+ * Get a valid migration name from the migration state array in case the
+ * supplied name is not in the migration state list.
+ *
+ * @param string $name Migration name
+ * @return string Migration name
+ */
+ protected function get_valid_name($name)
+ {
+ // Try falling back to a valid migration name with or without leading backslash
+ if (!isset($this->migration_state[$name]))
+ {
+ $prepended_name = ($name[0] == '\\' ? '' : '\\') . $name;
+ $prefixless_name = $name[0] == '\\' ? substr($name, 1) : $name;
+
+ if (isset($this->migration_state[$prepended_name]))
+ {
+ $name = $prepended_name;
+ }
+ else if (isset($this->migration_state[$prefixless_name]))
+ {
+ $name = $prefixless_name;
+ }
+ }
+
+ return $name;
+ }
+
+ /**
* Effectively runs a single update step from the next migration to be applied.
*
* @return null
@@ -251,6 +279,8 @@ class migrator
{
foreach ($this->migrations as $name)
{
+ $name = $this->get_valid_name($name);
+
if (!isset($this->migration_state[$name]) ||
!$this->migration_state[$name]['migration_schema_done'] ||
!$this->migration_state[$name]['migration_data_done'])
@@ -306,6 +336,9 @@ class migrator
foreach ($state['migration_depends_on'] as $depend)
{
+ $depend = $this->get_valid_name($depend);
+
+ // Test all possible namings before throwing exception
if ($this->unfulfillable($depend) !== false)
{
throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $depend);
@@ -829,6 +862,8 @@ class migrator
*/
public function unfulfillable($name)
{
+ $name = $this->get_valid_name($name);
+
if (isset($this->migration_state[$name]) || isset($this->fulfillable_migrations[$name]))
{
return false;
@@ -844,6 +879,7 @@ class migrator
foreach ($depends as $depend)
{
+ $depend = $this->get_valid_name($depend);
$unfulfillable = $this->unfulfillable($depend);
if ($unfulfillable !== false)
{
diff --git a/phpBB/phpbb/db/tools/tools.php b/phpBB/phpbb/db/tools/tools.php
index 37ac0d0468..9273d69cd6 100644
--- a/phpBB/phpbb/db/tools/tools.php
+++ b/phpBB/phpbb/db/tools/tools.php
@@ -136,37 +136,6 @@ class tools implements tools_interface
'VARBINARY' => 'raw(255)',
),
- 'sqlite' => array(
- 'INT:' => 'int(%d)',
- 'BINT' => 'bigint(20)',
- 'ULINT' => 'INTEGER UNSIGNED', // 'int(10) UNSIGNED',
- 'UINT' => 'INTEGER UNSIGNED', // 'mediumint(8) UNSIGNED',
- 'UINT:' => 'INTEGER UNSIGNED', // 'int(%d) UNSIGNED',
- 'TINT:' => 'tinyint(%d)',
- 'USINT' => 'INTEGER UNSIGNED', // 'mediumint(4) UNSIGNED',
- 'BOOL' => 'INTEGER UNSIGNED', // 'tinyint(1) UNSIGNED',
- 'VCHAR' => 'varchar(255)',
- 'VCHAR:' => 'varchar(%d)',
- 'CHAR:' => 'char(%d)',
- 'XSTEXT' => 'text(65535)',
- 'STEXT' => 'text(65535)',
- 'TEXT' => 'text(65535)',
- 'MTEXT' => 'mediumtext(16777215)',
- 'XSTEXT_UNI'=> 'text(65535)',
- 'STEXT_UNI' => 'text(65535)',
- 'TEXT_UNI' => 'text(65535)',
- 'MTEXT_UNI' => 'mediumtext(16777215)',
- 'TIMESTAMP' => 'INTEGER UNSIGNED', // 'int(11) UNSIGNED',
- 'DECIMAL' => 'decimal(5,2)',
- 'DECIMAL:' => 'decimal(%d,2)',
- 'PDECIMAL' => 'decimal(6,3)',
- 'PDECIMAL:' => 'decimal(%d,3)',
- 'VCHAR_UNI' => 'varchar(255)',
- 'VCHAR_UNI:'=> 'varchar(%d)',
- 'VCHAR_CI' => 'varchar(255)',
- 'VARBINARY' => 'blob',
- ),
-
'sqlite3' => array(
'INT:' => 'INT(%d)',
'BINT' => 'BIGINT(20)',
@@ -277,12 +246,6 @@ class tools implements tools_interface
$sql = 'SHOW TABLES';
break;
- case 'sqlite':
- $sql = 'SELECT name
- FROM sqlite_master
- WHERE type = "table"';
- break;
-
case 'sqlite3':
$sql = 'SELECT name
FROM sqlite_master
@@ -398,7 +361,6 @@ class tools implements tools_interface
{
case 'mysql_40':
case 'mysql_41':
- case 'sqlite':
case 'sqlite3':
$table_sql .= ",\n\t PRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . ')';
break;
@@ -420,7 +382,6 @@ class tools implements tools_interface
break;
case 'mysql_40':
- case 'sqlite':
case 'sqlite3':
$table_sql .= "\n);";
$statements[] = $table_sql;
@@ -497,7 +458,7 @@ class tools implements tools_interface
$sqlite = false;
// For SQLite we need to perform the schema changes in a much more different way
- if (($this->db->get_sql_layer() == 'sqlite' || $this->db->get_sql_layer() == 'sqlite3') && $this->return_statements)
+ if ($this->db->get_sql_layer() == 'sqlite3' && $this->return_statements)
{
$sqlite_data = array();
$sqlite = true;
@@ -884,7 +845,6 @@ class tools implements tools_interface
WHERE LOWER(table_name) = '" . strtolower($table_name) . "'";
break;
- case 'sqlite':
case 'sqlite3':
$sql = "SELECT sql
FROM sqlite_master
@@ -967,7 +927,6 @@ class tools implements tools_interface
$col = 'index_name';
break;
- case 'sqlite':
case 'sqlite3':
$sql = "PRAGMA index_list('" . $table_name . "');";
$col = 'name';
@@ -986,7 +945,6 @@ class tools implements tools_interface
switch ($this->sql_layer)
{
case 'oracle':
- case 'sqlite':
case 'sqlite3':
$row[$col] = substr($row[$col], strlen($table_name) + 1);
break;
@@ -1026,7 +984,6 @@ class tools implements tools_interface
$col = 'index_name';
break;
- case 'sqlite':
case 'sqlite3':
$sql = "PRAGMA index_list('" . $table_name . "');";
$col = 'name';
@@ -1041,7 +998,7 @@ class tools implements tools_interface
continue;
}
- if (($this->sql_layer == 'sqlite' || $this->sql_layer == 'sqlite3') && !$row['unique'])
+ if ($this->sql_layer == 'sqlite3' && !$row['unique'])
{
continue;
}
@@ -1061,7 +1018,6 @@ class tools implements tools_interface
}
break;
- case 'sqlite':
case 'sqlite3':
$row[$col] = substr($row[$col], strlen($table_name) + 1);
break;
@@ -1193,18 +1149,12 @@ class tools implements tools_interface
break;
- case 'sqlite':
case 'sqlite3':
$return_array['primary_key_set'] = false;
if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
{
- $sql .= ' INTEGER PRIMARY KEY';
+ $sql .= ' INTEGER PRIMARY KEY AUTOINCREMENT';
$return_array['primary_key_set'] = true;
-
- if ($this->sql_layer === 'sqlite3')
- {
- $sql .= ' AUTOINCREMENT';
- }
}
else
{
@@ -1306,57 +1256,6 @@ class tools implements tools_interface
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD ' . $column_name . ' ' . $column_data['column_type_sql'];
break;
- case 'sqlite':
- if ($inline && $this->return_statements)
- {
- return $column_name . ' ' . $column_data['column_type_sql'];
- }
-
- $recreate_queries = $this->sqlite_get_recreate_table_queries($table_name);
- if (empty($recreate_queries))
- {
- break;
- }
-
- $statements[] = 'begin';
-
- $sql_create_table = array_shift($recreate_queries);
-
- // Create a backup table and populate it, destroy the existing one
- $statements[] = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', 'CREATE TEMPORARY TABLE ' . $table_name . '_temp', $sql_create_table);
- $statements[] = 'INSERT INTO ' . $table_name . '_temp SELECT * FROM ' . $table_name;
- $statements[] = 'DROP TABLE ' . $table_name;
-
- preg_match('#\((.*)\)#s', $sql_create_table, $matches);
-
- $new_table_cols = trim($matches[1]);
- $old_table_cols = preg_split('/,(?![\s\w]+\))/m', $new_table_cols);
- $column_list = array();
-
- foreach ($old_table_cols as $declaration)
- {
- $entities = preg_split('#\s+#', trim($declaration));
- if ($entities[0] == 'PRIMARY')
- {
- continue;
- }
- $column_list[] = $entities[0];
- }
-
- $columns = implode(',', $column_list);
-
- $new_table_cols = $column_name . ' ' . $column_data['column_type_sql'] . ',' . $new_table_cols;
-
- // create a new table and fill it up. destroy the temp one
- $statements[] = 'CREATE TABLE ' . $table_name . ' (' . $new_table_cols . ');';
- $statements = array_merge($statements, $recreate_queries);
-
- $statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
- $statements[] = 'DROP TABLE ' . $table_name . '_temp';
-
- $statements[] = 'commit';
- break;
-
case 'sqlite3':
if ($inline && $this->return_statements)
{
@@ -1388,7 +1287,6 @@ class tools implements tools_interface
$statements[] = 'ALTER TABLE ' . $table_name . ' DROP COLUMN ' . $column_name;
break;
- case 'sqlite':
case 'sqlite3':
if ($inline && $this->return_statements)
@@ -1465,7 +1363,6 @@ class tools implements tools_interface
break;
case 'oracle':
- case 'sqlite':
case 'sqlite3':
$statements[] = 'DROP INDEX ' . $table_name . '_' . $index_name;
break;
@@ -1529,7 +1426,6 @@ class tools implements tools_interface
$statements[] = 'ALTER TABLE ' . $table_name . ' add CONSTRAINT pk_' . $table_name . ' PRIMARY KEY (' . implode(', ', $column) . ')';
break;
- case 'sqlite':
case 'sqlite3':
if ($inline && $this->return_statements)
@@ -1596,7 +1492,6 @@ class tools implements tools_interface
switch ($this->sql_layer)
{
case 'oracle':
- case 'sqlite':
case 'sqlite3':
$statements[] = 'CREATE UNIQUE INDEX ' . $table_name . '_' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
break;
@@ -1628,7 +1523,6 @@ class tools implements tools_interface
switch ($this->sql_layer)
{
case 'oracle':
- case 'sqlite':
case 'sqlite3':
$statements[] = 'CREATE INDEX ' . $table_name . '_' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
break;
@@ -1693,7 +1587,6 @@ class tools implements tools_interface
$col = 'index_name';
break;
- case 'sqlite':
case 'sqlite3':
$sql = "PRAGMA index_info('" . $table_name . "');";
$col = 'name';
@@ -1711,7 +1604,6 @@ class tools implements tools_interface
switch ($this->sql_layer)
{
case 'oracle':
- case 'sqlite':
case 'sqlite3':
$row[$col] = substr($row[$col], strlen($table_name) + 1);
break;
@@ -1818,7 +1710,6 @@ class tools implements tools_interface
$this->return_statements = $old_return_statements;
break;
- case 'sqlite':
case 'sqlite3':
if ($inline && $this->return_statements)
@@ -1899,7 +1790,6 @@ class tools implements tools_interface
{
case 'mysql_40':
case 'mysql_41':
- case 'sqlite':
case 'sqlite3':
// Not supported
throw new \Exception('DBMS is not supported');
diff --git a/phpBB/phpbb/install/helper/database.php b/phpBB/phpbb/install/helper/database.php
index be0c953d28..192f0a3654 100644
--- a/phpBB/phpbb/install/helper/database.php
+++ b/phpBB/phpbb/install/helper/database.php
@@ -90,15 +90,6 @@ class database
'AVAILABLE' => true,
'2.0.x' => true,
),
- 'sqlite' => array(
- 'LABEL' => 'SQLite',
- 'SCHEMA' => 'sqlite',
- 'MODULE' => 'sqlite',
- 'DELIM' => ';',
- 'DRIVER' => 'phpbb\db\driver\sqlite',
- 'AVAILABLE' => true,
- '2.0.x' => false,
- ),
'sqlite3' => array(
'LABEL' => 'SQLite3',
'SCHEMA' => 'sqlite',
@@ -390,14 +381,6 @@ class database
);
}
break;
- case 'sqlite':
- if (version_compare($db->sql_server_info(true), '2.8.2', '<'))
- {
- $errors[] = array(
- 'title' => 'INST_ERR_DB_NO_SQLITE',
- );
- }
- break;
case 'sqlite3':
if (version_compare($db->sql_server_info(true), '3.6.15', '<'))
{
diff --git a/phpBB/phpbb/notification/type/report_pm.php b/phpBB/phpbb/notification/type/report_pm.php
index 6091919769..239805204c 100644
--- a/phpBB/phpbb/notification/type/report_pm.php
+++ b/phpBB/phpbb/notification/type/report_pm.php
@@ -52,7 +52,7 @@ class report_pm extends \phpbb\notification\type\pm
*
* @var string Permission name
*/
- protected $permission = 'm_report';
+ protected $permission = 'm_pm_report';
/**
* Notification option data (for outputting to the user)
diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php
index 580d9b6878..2071a973e5 100644
--- a/phpBB/phpbb/search/fulltext_native.php
+++ b/phpBB/phpbb/search/fulltext_native.php
@@ -878,7 +878,6 @@ class fulltext_native extends \phpbb\search\base
break;
- case 'sqlite':
case 'sqlite3':
$sql_array_count['SELECT'] = ($type == 'posts') ? 'DISTINCT p.post_id' : 'DISTINCT p.topic_id';
$sql = 'SELECT COUNT(' . (($type == 'posts') ? 'post_id' : 'topic_id') . ') as total_results
@@ -1185,7 +1184,7 @@ class fulltext_native extends \phpbb\search\base
}
else
{
- if ($this->db->get_sql_layer() == 'sqlite' || $this->db->get_sql_layer() == 'sqlite3')
+ if ($this->db->get_sql_layer() == 'sqlite3')
{
$sql = 'SELECT COUNT(topic_id) as total_results
FROM (SELECT DISTINCT t.topic_id';
@@ -1202,7 +1201,7 @@ class fulltext_native extends \phpbb\search\base
$post_visibility
$sql_fora
AND t.topic_id = p.topic_id
- $sql_time" . (($this->db->get_sql_layer() == 'sqlite' || $this->db->get_sql_layer() == 'sqlite3') ? ')' : '');
+ $sql_time" . ($this->db->get_sql_layer() == 'sqlite3' ? ')' : '');
}
$result = $this->db->sql_query($sql);
@@ -1667,7 +1666,6 @@ class fulltext_native extends \phpbb\search\base
{
switch ($this->db->get_sql_layer())
{
- case 'sqlite':
case 'sqlite3':
$this->db->sql_query('DELETE FROM ' . SEARCH_WORDLIST_TABLE);
$this->db->sql_query('DELETE FROM ' . SEARCH_WORDMATCH_TABLE);
diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php
index f1542109a4..de03aec04b 100644
--- a/phpBB/phpbb/template/twig/lexer.php
+++ b/phpBB/phpbb/template/twig/lexer.php
@@ -22,6 +22,11 @@ class lexer extends \Twig_Lexer
public function tokenize($code, $filename = null)
{
+ if ($code instanceof \Twig_Source)
+ {
+ $filename = $code->getName();
+ $code = $code->getCode();
+ }
// Our phpBB tags
// Commented out tokens are handled separately from the main replace
$phpbb_tags = array(
@@ -125,7 +130,7 @@ class lexer extends \Twig_Lexer
// Appends any filters
$code = preg_replace('#{([a-zA-Z0-9_\.]+)(\|[^}]+?)?}#', '{{ $1$2 }}', $code);
- return parent::tokenize($code, $filename);
+ return parent::tokenize(new \Twig_Source($code, $filename));
}
/**
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index aec6b0bbe6..3888d26785 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -132,9 +132,9 @@ phpbb.markNotifications = function($popup, unreadCount) {
// Update the unread count.
$('strong', '#notification_list_button').html(unreadCount);
- // Remove the Mark all read link if there are no unread notifications.
+ // Remove the Mark all read link & notification count if there are no unread notifications.
if (!unreadCount) {
- $('#mark_all_notifications').remove();
+ $('#mark_all_notifications, #notification_list_button > strong').remove();
}
// Update page title
diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html
index 7925bd6362..ab6eb0805b 100644
--- a/phpBB/styles/prosilver/template/navbar_header.html
+++ b/phpBB/styles/prosilver/template/navbar_header.html
@@ -145,14 +145,14 @@
<!-- IF S_DISPLAY_PM -->
<li class="rightside" data-skip-responsive="true">
<a href="{U_PRIVATEMSGS}" role="menuitem">
- <i class="icon fa-inbox fa-fw" aria-hidden="true"></i><span><span>{L_PRIVATE_MESSAGES} [</span><strong>{PRIVATE_MESSAGE_COUNT}</strong><span>]</span></span>
+ <i class="icon fa-inbox fa-fw" aria-hidden="true"></i><span><span>{L_PRIVATE_MESSAGES} <!-- IF PRIVATE_MESSAGE_COUNT --><strong class="badge">{PRIVATE_MESSAGE_COUNT}</strong><!-- ENDIF --></span>
</a>
</li>
<!-- ENDIF -->
<!-- IF S_NOTIFICATIONS_DISPLAY -->
<li class="dropdown-container dropdown-{S_CONTENT_FLOW_END} rightside" data-skip-responsive="true">
<a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button" class="dropdown-trigger">
- <i class="icon fa-bell fa-fw" aria-hidden="true"></i><span><span>{L_NOTIFICATIONS} [</span><strong>{NOTIFICATIONS_COUNT}</strong><span>]</span></span>
+ <i class="icon fa-bell fa-fw" aria-hidden="true"></i><span><span>{L_NOTIFICATIONS} <!-- IF NOTIFICATIONS_COUNT --><strong class="badge">{NOTIFICATIONS_COUNT}</strong><!-- ENDIF --></span>
</a>
<!-- INCLUDE notification_dropdown.html -->
</li>
diff --git a/phpBB/styles/prosilver/template/posting_attach_body.html b/phpBB/styles/prosilver/template/posting_attach_body.html
index da527e9a75..618ac95656 100644
--- a/phpBB/styles/prosilver/template/posting_attach_body.html
+++ b/phpBB/styles/prosilver/template/posting_attach_body.html
@@ -7,7 +7,7 @@
<dl>
<dt><label for="fileupload">{L_FILENAME}{L_COLON}</label></dt>
<dd>
- <input type="file" name="fileupload" id="fileupload" maxlength="{FILESIZE}" value="" class="inputbox autowidth" />
+ <input type="file" name="fileupload" id="fileupload" class="inputbox autowidth" />
<input type="submit" name="add_file" value="{L_ADD_FILE}" class="button2" onclick="upload = true;" />
</dd>
</dl>
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index d76fd0852a..cf21ac216b 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -1168,3 +1168,8 @@ input.disabled {
li.notification-reported strong, li.notification-disapproved strong {
color: #D31141;
}
+
+.badge {
+ background-color: #D31141;
+ color: #ffffff;
+}
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index e800c63294..8368fc158c 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -1205,6 +1205,22 @@ ul.linklist:after,
margin-left: 58px;
}
+.badge {
+ border-radius: 10px;
+ opacity: 0.8;
+ text-align: center;
+ white-space: nowrap;
+ font-size: 10px;
+ line-height: 1;
+ float: right;
+ display: inline-block;
+ margin-left: 3px;
+ vertical-align: baseline;
+ position: relative;
+ top: 3px;
+ padding: 4px 6px;
+}
+
/* Navbar specific list items
----------------------------------------*/
@@ -1216,10 +1232,6 @@ ul.linklist:after,
display: none;
}
-.linklist.compact .rightside > a strong {
- padding-left: 2px;
-}
-
.dropdown-page-jump .dropdown {
top: 20px;
}
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index 3f35ac541e..85eb653b5a 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -127,7 +127,6 @@ if (!$show_guests)
{
switch ($db->get_sql_layer())
{
- case 'sqlite':
case 'sqlite3':
$sql = 'SELECT COUNT(session_ip) as num_guests
FROM (
diff --git a/tests/functional/notification_test.php b/tests/functional/notification_test.php
index 5c6b87d50b..8751de8016 100644
--- a/tests/functional/notification_test.php
+++ b/tests/functional/notification_test.php
@@ -82,6 +82,6 @@ class phpbb_functional_notification_test extends phpbb_functional_test_case
// Get form token
$link = $crawler->selectLink($this->lang('NOTIFICATIONS_MARK_ALL_READ'))->link()->getUri();
$crawler = self::request('GET', substr($link, strpos($link, 'ucp.')));
- $this->assertEquals(0, $crawler->filter('#notification_list_button strong')->text());
+ $this->assertCount(0, $crawler->filter('#notification_list_button strong'));
}
}
diff --git a/tests/functions/convert_30_dbms_to_31_test.php b/tests/functions/convert_30_dbms_to_31_test.php
index e46a569565..456eb64461 100644
--- a/tests/functions/convert_30_dbms_to_31_test.php
+++ b/tests/functions/convert_30_dbms_to_31_test.php
@@ -22,7 +22,6 @@ class phpbb_convert_30_dbms_to_31_test extends phpbb_test_case
array('mysqli'),
array('oracle'),
array('postgres'),
- array('sqlite'),
);
}
diff --git a/tests/functions/user_delete_test.php b/tests/functions/user_delete_test.php
index 480b5fc5e1..db9b6e0c90 100644
--- a/tests/functions/user_delete_test.php
+++ b/tests/functions/user_delete_test.php
@@ -72,6 +72,7 @@ class phpbb_functions_user_delete_test extends phpbb_database_test_case
$oauth_provider_collection,
'phpbb_users',
$phpbb_container,
+ $phpbb_dispatcher,
$this->phpbb_root_path,
$this->php_ext
);
diff --git a/tests/migrator/schema_generator_test.php b/tests/migrator/schema_generator_test.php
index 40a8343e22..1996d207ea 100644
--- a/tests/migrator/schema_generator_test.php
+++ b/tests/migrator/schema_generator_test.php
@@ -29,7 +29,7 @@ class schema_generator_test extends phpbb_test_case
parent::setUp();
$this->config = new \phpbb\config\config(array());
- $this->db = new \phpbb\db\driver\sqlite();
+ $this->db = new \phpbb\db\driver\sqlite3();
$factory = new \phpbb\db\tools\factory();
$this->db_tools = $factory->get($this->db);
$this->table_prefix = 'phpbb_';
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php
index 4d0460ebeb..b7386e9a3e 100644
--- a/tests/test_framework/phpbb_database_test_case.php
+++ b/tests/test_framework/phpbb_database_test_case.php
@@ -76,7 +76,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
global $table_prefix;
- $db = new \phpbb\db\driver\sqlite();
+ $db = new \phpbb\db\driver\sqlite3();
$factory = new \phpbb\db\tools\factory();
$db_tools = $factory->get($db, true);
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php
index 27ac64e21d..147029d699 100644
--- a/tests/test_framework/phpbb_database_test_connection_manager.php
+++ b/tests/test_framework/phpbb_database_test_connection_manager.php
@@ -55,7 +55,6 @@ class phpbb_database_test_connection_manager
switch ($this->dbms['PDO'])
{
- case 'sqlite2':
case 'sqlite': // SQLite3 driver
$dsn .= $this->config['dbhost'];
break;
@@ -193,7 +192,6 @@ class phpbb_database_test_connection_manager
{
switch ($this->config['dbms'])
{
- case 'phpbb\db\driver\sqlite':
case 'phpbb\db\driver\sqlite3':
$this->connect();
// Drop all of the tables
@@ -269,12 +267,6 @@ class phpbb_database_test_connection_manager
$sql = 'SHOW TABLES';
break;
- case 'phpbb\db\driver\sqlite':
- $sql = 'SELECT name
- FROM sqlite_master
- WHERE type = "table"';
- break;
-
case 'phpbb\db\driver\sqlite3':
$sql = 'SELECT name
FROM sqlite_master
@@ -378,7 +370,7 @@ class phpbb_database_test_connection_manager
$classes = $finder->core_path('phpbb/db/migration/data/')
->get_classes();
- $db = new \phpbb\db\driver\sqlite();
+ $db = new \phpbb\db\driver\sqlite3();
$factory = new \phpbb\db\tools\factory();
$db_tools = $factory->get($db, true);
@@ -454,11 +446,6 @@ class phpbb_database_test_connection_manager
'DELIM' => ';',
'PDO' => 'pgsql',
),
- 'phpbb\db\driver\sqlite' => array(
- 'SCHEMA' => 'sqlite',
- 'DELIM' => ';',
- 'PDO' => 'sqlite2',
- ),
'phpbb\db\driver\sqlite3' => array(
'SCHEMA' => 'sqlite',
'DELIM' => ';',
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php
index c4b653ec7c..7fb9a740b8 100644
--- a/tests/test_framework/phpbb_test_case_helpers.php
+++ b/tests/test_framework/phpbb_test_case_helpers.php
@@ -122,17 +122,6 @@ class phpbb_test_case_helpers
'dbpasswd' => '',
));
}
- else if (extension_loaded('sqlite'))
- {
- $config = array_merge($config, array(
- 'dbms' => 'phpbb\db\driver\sqlite',
- 'dbhost' => dirname(__FILE__) . '/../phpbb_unit_tests.sqlite2', // filename
- 'dbport' => '',
- 'dbname' => '',
- 'dbuser' => '',
- 'dbpasswd' => '',
- ));
- }
if (isset($_SERVER['PHPBB_TEST_CONFIG']))
{