diff options
55 files changed, 819 insertions, 201 deletions
diff --git a/build/build.xml b/build/build.xml index f2668e2101..7d0068bec9 100644 --- a/build/build.xml +++ b/build/build.xml @@ -102,6 +102,7 @@ --extensions=php --standard=build/code_sniffer/ruleset-php-extensions.xml --ignore=${project.basedir}/phpBB/ext/*/tests/* + --ignore=${project.basedir}/phpBB/ext/*/vendor/* phpBB/ext" dir="." returnProperty="retval-php-ext" passthru="true" /> <if> diff --git a/phpBB/composer.json b/phpBB/composer.json index 53d2f873f1..9b473a3bb7 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -22,6 +22,13 @@ "phpunit/phpunit": "4.1.*", "phing/phing": "2.4.*", "sami/sami": "1.*", - "squizlabs/php_codesniffer": "1.*" + "squizlabs/php_codesniffer": "1.*", + "symfony/browser-kit": "2.3.*", + "symfony/debug": "2.3.*", + "symfony/dom-crawler": "2.3.*", + "symfony/filesystem": "2.3.*", + "symfony/finder": "2.3.*", + "symfony/http-foundation": "2.3.*", + "symfony/process": "2.3.*" } } diff --git a/phpBB/composer.lock b/phpBB/composer.lock index 89973b93d4..751cd0695f 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -3,7 +3,7 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "300d29b350ca2d75b1fa169fe46470f0", + "hash": "dcd46c1373cfc4dacd2e1f8a79da0b91", "packages": [ { "name": "lusitanian/oauth", @@ -108,17 +108,17 @@ }, { "name": "symfony/config", - "version": "v2.3.12", + "version": "v2.3.16", "target-dir": "Symfony/Component/Config", "source": { "type": "git", "url": "https://github.com/symfony/Config.git", - "reference": "91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21" + "reference": "259722b5f2e87d3f487630abfd40f922cf2f6900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21", - "reference": "91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21", + "url": "https://api.github.com/repos/symfony/Config/zipball/259722b5f2e87d3f487630abfd40f922cf2f6900", + "reference": "259722b5f2e87d3f487630abfd40f922cf2f6900", "shasum": "" }, "require": { @@ -154,21 +154,21 @@ ], "description": "Symfony Config Component", "homepage": "http://symfony.com", - "time": "2014-03-31 10:15:50" + "time": "2014-04-22 08:09:28" }, { "name": "symfony/console", - "version": "v2.3.12", + "version": "v2.3.16", "target-dir": "Symfony/Component/Console", "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "df17996d37eb113a5675ca4cc2ac45f4fc057cb7" + "reference": "c6c5a354a9945a5e9a9a6a495ca19558eb8639e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/df17996d37eb113a5675ca4cc2ac45f4fc057cb7", - "reference": "df17996d37eb113a5675ca4cc2ac45f4fc057cb7", + "url": "https://api.github.com/repos/symfony/Console/zipball/c6c5a354a9945a5e9a9a6a495ca19558eb8639e9", + "reference": "c6c5a354a9945a5e9a9a6a495ca19558eb8639e9", "shasum": "" }, "require": { @@ -209,21 +209,21 @@ ], "description": "Symfony Console Component", "homepage": "http://symfony.com", - "time": "2014-03-01 17:25:29" + "time": "2014-05-14 13:35:53" }, { "name": "symfony/debug", - "version": "v2.4.4", + "version": "v2.3.16", "target-dir": "Symfony/Component/Debug", "source": { "type": "git", "url": "https://github.com/symfony/Debug.git", - "reference": "6a8eb9aba50595014fef52d6b4d99b31dfaa6f02" + "reference": "ca764f8af9cc4ba5d81b598c1b18b30db5508e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/6a8eb9aba50595014fef52d6b4d99b31dfaa6f02", - "reference": "6a8eb9aba50595014fef52d6b4d99b31dfaa6f02", + "url": "https://api.github.com/repos/symfony/Debug/zipball/ca764f8af9cc4ba5d81b598c1b18b30db5508e18", + "reference": "ca764f8af9cc4ba5d81b598c1b18b30db5508e18", "shasum": "" }, "require": { @@ -234,13 +234,14 @@ "symfony/http-kernel": "~2.1" }, "suggest": { + "symfony/class-loader": "", "symfony/http-foundation": "", "symfony/http-kernel": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -266,21 +267,21 @@ ], "description": "Symfony Debug Component", "homepage": "http://symfony.com", - "time": "2014-04-16 10:34:42" + "time": "2014-04-29 19:42:43" }, { "name": "symfony/dependency-injection", - "version": "v2.3.12", + "version": "v2.3.16", "target-dir": "Symfony/Component/DependencyInjection", "source": { "type": "git", "url": "https://github.com/symfony/DependencyInjection.git", - "reference": "41e9e2078e8edf261c11be478300c8fcddb64e30" + "reference": "5ebd813eac59b4051705a2e29e32f211a966b6ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/41e9e2078e8edf261c11be478300c8fcddb64e30", - "reference": "41e9e2078e8edf261c11be478300c8fcddb64e30", + "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/5ebd813eac59b4051705a2e29e32f211a966b6ca", + "reference": "5ebd813eac59b4051705a2e29e32f211a966b6ca", "shasum": "" }, "require": { @@ -324,21 +325,21 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "http://symfony.com", - "time": "2014-03-27 18:14:33" + "time": "2014-05-02 22:42:57" }, { "name": "symfony/event-dispatcher", - "version": "v2.3.12", + "version": "v2.3.16", "target-dir": "Symfony/Component/EventDispatcher", "source": { "type": "git", "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "15645237c6ff70e74a28e8836362d82492765055" + "reference": "cb7cd38c081507d10997553c4c522956a4d2afab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/15645237c6ff70e74a28e8836362d82492765055", - "reference": "15645237c6ff70e74a28e8836362d82492765055", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/cb7cd38c081507d10997553c4c522956a4d2afab", + "reference": "cb7cd38c081507d10997553c4c522956a4d2afab", "shasum": "" }, "require": { @@ -380,21 +381,21 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "http://symfony.com", - "time": "2014-02-11 10:29:24" + "time": "2014-04-16 10:30:19" }, { "name": "symfony/filesystem", - "version": "v2.4.4", + "version": "v2.3.16", "target-dir": "Symfony/Component/Filesystem", "source": { "type": "git", "url": "https://github.com/symfony/Filesystem.git", - "reference": "a3af8294bcce4a7c1b2892363b0c9d8109affad4" + "reference": "69e476c4db31c43ab7ab797adc5fc73d20aa5571" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/a3af8294bcce4a7c1b2892363b0c9d8109affad4", - "reference": "a3af8294bcce4a7c1b2892363b0c9d8109affad4", + "url": "https://api.github.com/repos/symfony/Filesystem/zipball/69e476c4db31c43ab7ab797adc5fc73d20aa5571", + "reference": "69e476c4db31c43ab7ab797adc5fc73d20aa5571", "shasum": "" }, "require": { @@ -403,7 +404,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -429,33 +430,30 @@ ], "description": "Symfony Filesystem Component", "homepage": "http://symfony.com", - "time": "2014-04-16 10:34:31" + "time": "2014-04-16 10:30:19" }, { "name": "symfony/http-foundation", - "version": "v2.4.4", + "version": "v2.3.16", "target-dir": "Symfony/Component/HttpFoundation", "source": { "type": "git", "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "22c4dee84271ad0cd08d19f26d89f2878e11159b" + "reference": "ad7891d4dfe221c5a9edca64b71bdb500f5b026a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/22c4dee84271ad0cd08d19f26d89f2878e11159b", - "reference": "22c4dee84271ad0cd08d19f26d89f2878e11159b", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/ad7891d4dfe221c5a9edca64b71bdb500f5b026a", + "reference": "ad7891d4dfe221c5a9edca64b71bdb500f5b026a", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "require-dev": { - "symfony/expression-language": "~2.4" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -484,21 +482,21 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "http://symfony.com", - "time": "2014-04-18 21:02:05" + "time": "2014-05-22 16:20:26" }, { "name": "symfony/http-kernel", - "version": "v2.3.12", + "version": "v2.3.16", "target-dir": "Symfony/Component/HttpKernel", "source": { "type": "git", "url": "https://github.com/symfony/HttpKernel.git", - "reference": "48d61b3622ca35dd924b167441a9810ad55906ce" + "reference": "d8c00747f592183692afaacf622c444c36092613" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/48d61b3622ca35dd924b167441a9810ad55906ce", - "reference": "48d61b3622ca35dd924b167441a9810ad55906ce", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/d8c00747f592183692afaacf622c444c36092613", + "reference": "d8c00747f592183692afaacf622c444c36092613", "shasum": "" }, "require": { @@ -557,21 +555,21 @@ ], "description": "Symfony HttpKernel Component", "homepage": "http://symfony.com", - "time": "2014-04-03 05:42:39" + "time": "2014-05-31 02:04:21" }, { "name": "symfony/routing", - "version": "v2.3.12", + "version": "v2.3.16", "target-dir": "Symfony/Component/Routing", "source": { "type": "git", "url": "https://github.com/symfony/Routing.git", - "reference": "08afcafd9af22a24a8055669f85d63b863c4711b" + "reference": "6e4c9024a04340b83e456a1a24597dba066dcdc9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/08afcafd9af22a24a8055669f85d63b863c4711b", - "reference": "08afcafd9af22a24a8055669f85d63b863c4711b", + "url": "https://api.github.com/repos/symfony/Routing/zipball/6e4c9024a04340b83e456a1a24597dba066dcdc9", + "reference": "6e4c9024a04340b83e456a1a24597dba066dcdc9", "shasum": "" }, "require": { @@ -617,21 +615,21 @@ ], "description": "Symfony Routing Component", "homepage": "http://symfony.com", - "time": "2014-03-28 10:34:27" + "time": "2014-04-23 13:35:47" }, { "name": "symfony/yaml", - "version": "v2.3.12", + "version": "v2.3.16", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "3acf34f6993db3d873fa77ac2cb6e595db00b88d" + "reference": "2e257c292cfce88bf6c894a03d0fe8d782055aee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/3acf34f6993db3d873fa77ac2cb6e595db00b88d", - "reference": "3acf34f6993db3d873fa77ac2cb6e595db00b88d", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/2e257c292cfce88bf6c894a03d0fe8d782055aee", + "reference": "2e257c292cfce88bf6c894a03d0fe8d782055aee", "shasum": "" }, "require": { @@ -666,7 +664,7 @@ ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2014-03-04 16:04:39" + "time": "2014-05-12 09:13:35" }, { "name": "twig/twig", @@ -2170,17 +2168,17 @@ }, { "name": "symfony/browser-kit", - "version": "v2.3.4", + "version": "v2.3.16", "target-dir": "Symfony/Component/BrowserKit", "source": { "type": "git", "url": "https://github.com/symfony/BrowserKit.git", - "reference": "2639dc4eec81f92760e05396a93bb78000b4f5ca" + "reference": "bc6cb0fe5196ecfe183483791928ed525ac41728" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/2639dc4eec81f92760e05396a93bb78000b4f5ca", - "reference": "2639dc4eec81f92760e05396a93bb78000b4f5ca", + "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/bc6cb0fe5196ecfe183483791928ed525ac41728", + "reference": "bc6cb0fe5196ecfe183483791928ed525ac41728", "shasum": "" }, "require": { @@ -2223,21 +2221,21 @@ ], "description": "Symfony BrowserKit Component", "homepage": "http://symfony.com", - "time": "2013-07-21 12:12:18" + "time": "2014-04-22 14:58:51" }, { "name": "symfony/css-selector", - "version": "v2.3.4", + "version": "v2.3.16", "target-dir": "Symfony/Component/CssSelector", "source": { "type": "git", "url": "https://github.com/symfony/CssSelector.git", - "reference": "885544201cb24e79754da1dbd61bd779c2e4353e" + "reference": "2ff53e8a7870b453836e879b083b971d455e174d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/885544201cb24e79754da1dbd61bd779c2e4353e", - "reference": "885544201cb24e79754da1dbd61bd779c2e4353e", + "url": "https://api.github.com/repos/symfony/CssSelector/zipball/2ff53e8a7870b453836e879b083b971d455e174d", + "reference": "2ff53e8a7870b453836e879b083b971d455e174d", "shasum": "" }, "require": { @@ -2276,21 +2274,21 @@ ], "description": "Symfony CssSelector Component", "homepage": "http://symfony.com", - "time": "2013-07-21 12:12:18" + "time": "2014-05-12 09:13:35" }, { "name": "symfony/dom-crawler", - "version": "v2.3.4", + "version": "v2.3.16", "target-dir": "Symfony/Component/DomCrawler", "source": { "type": "git", "url": "https://github.com/symfony/DomCrawler.git", - "reference": "e05e07fe8958a304b5e135f8e65d4ae6148cf59b" + "reference": "5dd259d7842480fa7c5d4a45c4f911bd6fb60bc8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/e05e07fe8958a304b5e135f8e65d4ae6148cf59b", - "reference": "e05e07fe8958a304b5e135f8e65d4ae6148cf59b", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/5dd259d7842480fa7c5d4a45c4f911bd6fb60bc8", + "reference": "5dd259d7842480fa7c5d4a45c4f911bd6fb60bc8", "shasum": "" }, "require": { @@ -2331,21 +2329,21 @@ ], "description": "Symfony DomCrawler Component", "homepage": "http://symfony.com", - "time": "2013-07-21 12:12:18" + "time": "2014-05-26 22:15:18" }, { "name": "symfony/finder", - "version": "v2.3.4", + "version": "v2.3.16", "target-dir": "Symfony/Component/Finder", "source": { "type": "git", "url": "https://github.com/symfony/Finder.git", - "reference": "4a0fee5b86f5bbd9dfdc11ec124eba2915737ce1" + "reference": "32949721cc76afd75e4ac60d14ac3cf55b10a768" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/4a0fee5b86f5bbd9dfdc11ec124eba2915737ce1", - "reference": "4a0fee5b86f5bbd9dfdc11ec124eba2915737ce1", + "url": "https://api.github.com/repos/symfony/Finder/zipball/32949721cc76afd75e4ac60d14ac3cf55b10a768", + "reference": "32949721cc76afd75e4ac60d14ac3cf55b10a768", "shasum": "" }, "require": { @@ -2380,21 +2378,21 @@ ], "description": "Symfony Finder Component", "homepage": "http://symfony.com", - "time": "2013-08-13 20:18:00" + "time": "2014-05-22 13:42:36" }, { "name": "symfony/process", - "version": "v2.3.4", + "version": "v2.3.16", "target-dir": "Symfony/Component/Process", "source": { "type": "git", "url": "https://github.com/symfony/Process.git", - "reference": "1e91553e1cedd0b8fb1da6ea4f89b02e21713d5b" + "reference": "2cd7d075df6cb0d564c069a66408b3877c07d4e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/1e91553e1cedd0b8fb1da6ea4f89b02e21713d5b", - "reference": "1e91553e1cedd0b8fb1da6ea4f89b02e21713d5b", + "url": "https://api.github.com/repos/symfony/Process/zipball/2cd7d075df6cb0d564c069a66408b3877c07d4e3", + "reference": "2cd7d075df6cb0d564c069a66408b3877c07d4e3", "shasum": "" }, "require": { @@ -2429,7 +2427,7 @@ ], "description": "Symfony Process Component", "homepage": "http://symfony.com", - "time": "2013-08-22 06:42:25" + "time": "2014-05-17 21:49:26" } ], "aliases": [ diff --git a/phpBB/config/migrator.yml b/phpBB/config/migrator.yml index 202421c09f..cd04eea5c2 100644 --- a/phpBB/config/migrator.yml +++ b/phpBB/config/migrator.yml @@ -29,6 +29,13 @@ services: tags: - { name: migrator.tool } + migrator.tool.config_text: + class: phpbb\db\migration\tool\config_text + arguments: + - @config_text + tags: + - { name: migrator.tool } + migrator.tool.module: class: phpbb\db\migration\tool\module arguments: diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index ec56ae8e9a..b4e387bd73 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -96,6 +96,7 @@ services: - @config - @controller.provider - @ext.manager + - @symfony_request - %core.root_path% - %core.php_ext% @@ -304,6 +305,7 @@ services: arguments: - @symfony_request - @filesystem + - @request - %core.root_path% - %core.php_ext% - %core.adm_relative_path% @@ -362,3 +364,5 @@ services: viewonline_helper: class: phpbb\viewonline_helper + arguments: + - @filesystem diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index d11193e4b0..d39be50251 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1137,7 +1137,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas // Update log $log_entry = ($ban_exclude) ? 'LOG_BAN_EXCLUDE_' : 'LOG_BAN_'; - // Add to moderator log, admin log and user notes + // Add to admin log, moderator log and user notes add_log('admin', $log_entry . strtoupper($mode), $ban_reason, $ban_list_log); add_log('mod', 0, 0, $log_entry . strtoupper($mode), $ban_reason, $ban_list_log); if ($mode == 'user') diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index e81abd0c8e..1687409198 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -151,6 +151,7 @@ function mcp_post_details($id, $mode, $action) if (sizeof($attachments)) { + $user->add_lang('viewtopic'); $update_count = array(); parse_attachments($post_info['forum_id'], $message, $attachments, $update_count); } diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 5ba5f1e830..a315b167d7 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -393,8 +393,9 @@ class ucp_profile } $template->assign_vars(array( - 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '', - 'JABBER' => $data['jabber'], + 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '', + 'S_JABBER_ENABLED' => $config['jab_enable'], + 'JABBER' => $data['jabber'], )); // Get additional profile fields and assign them to the template block var 'profile_fields' diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php index 102dffcd5b..904dc92080 100644 --- a/phpBB/language/en/help_faq.php +++ b/phpBB/language/en/help_faq.php @@ -121,7 +121,7 @@ $help = array( ), array( 0 => 'How do I add a signature to my post?', - 1 => 'To add a signature to a post you must first create one via your User Control Panel. Once created, you can check the <em>Attach a signature</em> box on the posting form to add your signature. You can also add a signature by default to all your posts by checking the appropriate radio button in your profile. If you do so, you can still prevent a signature being added to individual posts by un-checking the add signature box within the posting form.' + 1 => 'To add a signature to a post you must first create one via your User Control Panel. Once created, you can check the <em>Attach a signature</em> box on the posting form to add your signature. You can also add a signature by default to all your posts by checking the appropriate radio button in the User Control Panel. If you do so, you can still prevent a signature being added to individual posts by un-checking the add signature box within the posting form.' ), array( 0 => 'How do I create a poll?', @@ -153,7 +153,7 @@ $help = array( ), array( 0 => 'What is the “Save” button for in topic posting?', - 1 => 'This allows you to save passages to be completed and submitted at a later date. To reload a saved passage, visit the User Control Panel.' + 1 => 'This allows you to save drafts to be completed and submitted at a later date. To reload a saved draft, visit the User Control Panel.' ), array( 0 => 'Why does my post need to be approved?', @@ -254,7 +254,7 @@ $help = array( ), array( 0 => 'I keep getting unwanted private messages!', - 1 => 'You can block a user from sending you private messages by using message rules within your User Control Panel. If you are receiving abusive private messages from a particular user, inform a board administrator; they have the power to prevent a user from sending private messages.' + 1 => 'You can automatically delete private messages from a user by using message rules within your User Control Panel. If you are receiving abusive private messages from a particular user, report the messages to the moderators; they have the power to prevent a user from sending private messages.' ), array( 0 => 'I have received a spamming or abusive email from someone on this board!', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 02051bf0df..4f4dcb1b41 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -829,8 +829,14 @@ switch ($mode) $pagination = $phpbb_container->get('pagination'); // Sorting - $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'k' => $user->lang['JABBER']); - $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'k' => 'u.user_jabber'); + $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT']); + $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts'); + + if ($config['jab_enable']) + { + $sort_key_text['k'] = $user->lang['JABBER']; + $sort_key_sql['k'] = 'u.user_jabber'; + } if ($auth->acl_get('a_user')) { @@ -1286,6 +1292,7 @@ switch ($mode) 'S_IP_SEARCH_ALLOWED' => ($auth->acl_getf_global('m_info')) ? true : false, 'S_EMAIL_SEARCH_ALLOWED'=> ($auth->acl_get('a_user')) ? true : false, + 'S_JABBER_ENABLED' => $config['jab_enable'], 'S_IN_SEARCH_POPUP' => ($form && $field) ? true : false, 'S_SEARCH_USER' => ($mode == 'searchuser' || ($mode == '' && $submit)), 'S_FORM_NAME' => $form, diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php index 930bc42a98..e330fb5b6d 100644 --- a/phpBB/phpbb/controller/helper.php +++ b/phpBB/phpbb/controller/helper.php @@ -40,6 +40,9 @@ class helper */ protected $config; + /* @var \phpbb\symfony_request */ + protected $symfony_request; + /** * phpBB root path * @var string @@ -60,14 +63,16 @@ class helper * @param \phpbb\config\config $config Config object * @param \phpbb\controller\provider $provider Path provider * @param \phpbb\extension\manager $manager Extension manager object + * @param \phpbb\symfony_request $symfony_request Symfony Request object * @param string $phpbb_root_path phpBB root path * @param string $php_ext PHP extension */ - public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, \phpbb\extension\manager $manager, $phpbb_root_path, $php_ext) + public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, \phpbb\extension\manager $manager, \phpbb\symfony_request $symfony_request, $phpbb_root_path, $php_ext) { $this->template = $template; $this->user = $user; $this->config = $config; + $this->symfony_request = $symfony_request; $this->phpbb_root_path = $phpbb_root_path; $this->php_ext = $php_ext; $provider->find_routing_files($manager->get_finder()); @@ -151,4 +156,14 @@ class helper return $this->render('message_body.html', $this->user->lang('INFORMATION'), $code); } + + /** + * Return the current url + * + * @return string + */ + public function get_current_url() + { + return generate_board_url(true) . $this->symfony_request->getRequestUri(); + } } diff --git a/phpBB/phpbb/db/driver/postgres.php b/phpBB/phpbb/db/driver/postgres.php index a67cd9f7c2..83e9fa51f6 100644 --- a/phpBB/phpbb/db/driver/postgres.php +++ b/phpBB/phpbb/db/driver/postgres.php @@ -15,10 +15,11 @@ namespace phpbb\db\driver; /** * PostgreSQL Database Abstraction Layer -* Minimum Requirement is Version 7.3+ +* Minimum Requirement is Version 8.3+ */ class postgres extends \phpbb\db\driver\driver { + var $multi_insert = true; var $last_query_text = ''; var $connect_error = ''; @@ -101,11 +102,6 @@ class postgres extends \phpbb\db\driver\driver if ($this->db_connect_id) { - if (version_compare($this->sql_server_info(true), '8.2', '>=')) - { - $this->multi_insert = true; - } - if ($schema !== '') { @pg_query($this->db_connect_id, 'SET search_path TO ' . $schema); diff --git a/phpBB/phpbb/db/driver/sqlite3.php b/phpBB/phpbb/db/driver/sqlite3.php index 6511c755a0..0922229e0a 100644 --- a/phpBB/phpbb/db/driver/sqlite3.php +++ b/phpBB/phpbb/db/driver/sqlite3.php @@ -50,9 +50,10 @@ class sqlite3 extends \phpbb\db\driver\driver $this->dbo = new \SQLite3($this->server, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE); $this->db_connect_id = true; } - catch (Exception $e) + catch (\Exception $e) { - return array('message' => $e->getMessage()); + $this->connect_error = $e->getMessage(); + return array('message' => $this->connect_error); } return true; @@ -280,7 +281,7 @@ class sqlite3 extends \phpbb\db\driver\driver */ protected function _sql_error() { - if (class_exists('SQLite3', false)) + if (class_exists('SQLite3', false) && isset($this->dbo)) { $error = array( 'message' => $this->dbo->lastErrorMsg(), diff --git a/phpBB/phpbb/db/migration/profilefield_base_migration.php b/phpBB/phpbb/db/migration/profilefield_base_migration.php index d416a9b228..e66e5fd080 100644 --- a/phpBB/phpbb/db/migration/profilefield_base_migration.php +++ b/phpBB/phpbb/db/migration/profilefield_base_migration.php @@ -21,6 +21,23 @@ abstract class profilefield_base_migration extends \phpbb\db\migration\migration protected $profilefield_data; + /** + * Language data should be in array -> each language_data in separate key + * array( + * array( + * 'option_id' => value, + * 'field_type' => value, + * 'lang_value' => value, + * ), + * array( + * 'option_id' => value, + * 'field_type' => value, + * 'lang_value' => value, + * ), + * ) + */ + protected $profilefield_language_data; + protected $user_column_name; public function effectively_installed() @@ -58,6 +75,13 @@ abstract class profilefield_base_migration extends \phpbb\db\migration\migration ); } + public function revert_data() + { + return array( + array('custom', array(array($this, 'delete_custom_profile_field_data'))), + ); + } + public function create_custom_field() { $sql = 'SELECT MAX(field_order) as max_field_order @@ -96,6 +120,69 @@ abstract class profilefield_base_migration extends \phpbb\db\migration\migration } /** + * Create Custom profile fields languguage entries + */ + public function create_language_entries() + { + $field_id = $this->get_custom_profile_field_id(); + + $insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, PROFILE_FIELDS_LANG_TABLE); + + $sql = 'SELECT lang_id + FROM ' . LANG_TABLE; + $result = $this->db->sql_query($sql); + while ($lang_id = (int) $this->db->sql_fetchfield('lang_id')) + { + foreach ($this->profilefield_language_data as $language_data) + { + $insert_buffer->insert(array_merge(array( + 'field_id' => $field_id, + 'lang_id' => $lang_id, + ), $language_data)); + } + } + $this->db->sql_freeresult($result); + + $insert_buffer->flush(); + } + + /** + * Clean database when reverting the migration + */ + public function delete_custom_profile_field_data() + { + $field_id = $this->get_custom_profile_field_id(); + + $sql = 'DELETE FROM ' . PROFILE_FIELDS_TABLE . ' + WHERE field_id = ' . $field_id; + $this->db->sql_query($sql); + + $sql = 'DELETE FROM ' . PROFILE_LANG_TABLE . ' + WHERE field_id = ' . $field_id; + $this->db->sql_query($sql); + + $sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . ' + WHERE field_id = ' . $field_id; + $this->db->sql_query($sql); + } + + /** + * Get custom profile field id + * @return int custom profile filed id + */ + public function get_custom_profile_field_id() + { + $sql = 'SELECT field_id + FROM ' . PROFILE_FIELDS_TABLE . " + WHERE field_name = '" . $this->profilefield_name . "'"; + $result = $this->db->sql_query($sql); + $field_id = (int) $this->db->sql_fetchfield('field_id'); + $this->db->sql_freeresult($result); + + return $field_id; + } + + /** * @param int $start Start of staggering step * @return mixed int start of the next step, null if the end was reached */ diff --git a/phpBB/phpbb/db/migration/tool/config_text.php b/phpBB/phpbb/db/migration/tool/config_text.php new file mode 100644 index 0000000000..bf8ac55023 --- /dev/null +++ b/phpBB/phpbb/db/migration/tool/config_text.php @@ -0,0 +1,125 @@ +<?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\tool; + +/** +* Migration config_text tool +*/ +class config_text implements \phpbb\db\migration\tool\tool_interface +{ + /** @var \phpbb\config\db_text */ + protected $config_text; + + /** + * Constructor + * + * @param \phpbb\config\db_text $config_text + */ + public function __construct(\phpbb\config\db_text $config_text) + { + $this->config_text = $config_text; + } + + /** + * {@inheritdoc} + */ + public function get_name() + { + return 'config_text'; + } + + /** + * Add a config_text setting. + * + * @param string $config_name The name of the config_text setting + * you would like to add + * @param mixed $config_value The value of the config_text setting + * @return null + */ + public function add($config_name, $config_value) + { + if (!is_null($this->config_text->get($config_name))) + { + return; + } + + $this->config_text->set($config_name, $config_value); + } + + /** + * Update an existing config_text setting. + * + * @param string $config_name The name of the config_text setting you would + * like to update + * @param mixed $config_value The value of the config_text setting + * @return null + * @throws \phpbb\db\migration\exception + */ + public function update($config_name, $config_value) + { + if (is_null($this->config_text->get($config_name))) + { + throw new \phpbb\db\migration\exception('CONFIG_NOT_EXIST', $config_name); + } + + $this->config_text->set($config_name, $config_value); + } + + /** + * Remove an existing config_text setting. + * + * @param string $config_name The name of the config_text setting you would + * like to remove + * @return null + */ + public function remove($config_name) + { + if (is_null($this->config_text->get($config_name))) + { + return; + } + + $this->config_text->delete($config_name); + } + + /** + * {@inheritdoc} + */ + public function reverse() + { + $arguments = func_get_args(); + $original_call = array_shift($arguments); + + $call = false; + switch ($original_call) + { + case 'add': + $call = 'remove'; + break; + + case 'remove': + $call = 'add'; + if (sizeof($arguments) == 1) + { + $arguments[] = ''; + } + break; + } + + if ($call) + { + return call_user_func_array(array(&$this, $call), $arguments); + } + } +} diff --git a/phpBB/phpbb/event/dispatcher.php b/phpBB/phpbb/event/dispatcher.php index 6a2f9008be..9a786022c2 100644 --- a/phpBB/phpbb/event/dispatcher.php +++ b/phpBB/phpbb/event/dispatcher.php @@ -29,8 +29,11 @@ use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher; * extract($phpbb_dispatcher->trigger_event('core.index', compact($vars))); * */ -class dispatcher extends ContainerAwareEventDispatcher +class dispatcher extends ContainerAwareEventDispatcher implements dispatcher_interface { + /** + * {@inheritdoc} + */ public function trigger_event($eventName, $data = array()) { $event = new \phpbb\event\data($data); diff --git a/phpBB/phpbb/event/dispatcher_interface.php b/phpBB/phpbb/event/dispatcher_interface.php new file mode 100644 index 0000000000..50a3ef9101 --- /dev/null +++ b/phpBB/phpbb/event/dispatcher_interface.php @@ -0,0 +1,40 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\event; + +/** +* Extension of the Symfony2 EventDispatcher +* +* It provides an additional `trigger_event` method, which +* gives some syntactic sugar for dispatching events. Instead +* of creating the event object, the method will do that for +* you. +* +* Example: +* +* $vars = array('page_title'); +* extract($phpbb_dispatcher->trigger_event('core.index', compact($vars))); +* +*/ +interface dispatcher_interface extends \Symfony\Component\EventDispatcher\EventDispatcherInterface +{ + /** + * Construct and dispatch an event + * + * @param string $eventName The event name + * @param array $data An array containing the variables sending with the event + * @return mixed + */ + public function trigger_event($eventName, $data = array()); +} diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index 4ffe7345f3..c522c3273f 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -70,7 +70,7 @@ class log implements \phpbb\log\log_interface /** * Event dispatcher object - * @var \phpbb\event\dispatcher + * @var \phpbb\event\dispatcher_interface */ protected $dispatcher; @@ -98,7 +98,7 @@ class log implements \phpbb\log\log_interface * @param \phpbb\db\driver\driver_interface $db Database object * @param \phpbb\user $user User object * @param \phpbb\auth\auth $auth Auth object - * @param \phpbb\event\dispatcher $phpbb_dispatcher Event dispatcher + * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher * @param string $phpbb_root_path Root path * @param string $relative_admin_path Relative admin root path * @param string $php_ext PHP Extension diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php index b592cc4460..a8592eac6c 100644 --- a/phpBB/phpbb/path_helper.php +++ b/phpBB/phpbb/path_helper.php @@ -24,6 +24,9 @@ class path_helper /** @var \phpbb\filesystem */ protected $filesystem; + /** @var \phpbb\request\request_interface */ + protected $request; + /** @var string */ protected $phpbb_root_path; @@ -41,13 +44,16 @@ class path_helper * * @param \phpbb\symfony_request $symfony_request * @param \phpbb\filesystem $filesystem + * @param \phpbb\request\request_interface $request * @param string $phpbb_root_path Relative path to phpBB root * @param string $php_ext PHP extension (php) + * @param mixed $adm_relative_path Relative path admin path to adm/ root */ - public function __construct(\phpbb\symfony_request $symfony_request, \phpbb\filesystem $filesystem, $phpbb_root_path, $php_ext, $adm_relative_path = null) + public function __construct(\phpbb\symfony_request $symfony_request, \phpbb\filesystem $filesystem, \phpbb\request\request_interface $request, $phpbb_root_path, $php_ext, $adm_relative_path = null) { $this->symfony_request = $symfony_request; $this->filesystem = $filesystem; + $this->request = $request; $this->phpbb_root_path = $phpbb_root_path; $this->php_ext = $php_ext; $this->adm_relative_path = $adm_relative_path; @@ -98,7 +104,13 @@ class path_helper { $path = substr($path, strlen($this->phpbb_root_path)); - return $this->filesystem->clean_path($this->get_web_root_path() . $path); + $web_root_path = $this->get_web_root_path(); + if (substr($web_root_path, -8) === 'app.php/' && substr($path, 0, 7) === 'app.php') + { + $path = substr($path, 8); + } + + return $this->filesystem->clean_path($web_root_path . $path); } return $path; @@ -170,6 +182,34 @@ class path_helper return $this->web_root_path = $this->phpbb_root_path; } + /* + * Check AJAX request: + * If the current request is a AJAX we need to fix the paths. + * We need to get the root path based on the Referer, so we can use + * the generated URLs in the template of the Referer. If we do not + * generate the relative path based on the Referer, but based on the + * currently requested URL, the generated URLs will not point to the + * intended locations: + * Referer desired URL desired relative root path + * memberlist.php faq.php ./ + * memberlist.php app.php/foo/bar ./ + * app.php/foo memberlist.php ../ + * app.php/foo app.php/fox ../ + * app.php/foo/bar memberlist.php ../../ + * ../page.php memberlist.php ./phpBB/ + * ../sub/page.php memberlist.php ./../phpBB/ + * + * The referer must be specified as a parameter in the query. + */ + if ($this->request->is_ajax() && $this->symfony_request->get('_referer')) + { + $referer_web_root_path = $this->get_web_root_path_from_ajax_referer( + $this->symfony_request->get('_referer'), + $this->symfony_request->getSchemeAndHttpHost() . $this->symfony_request->getBasePath() + ); + return $this->web_root_path = $this->phpbb_root_path . $referer_web_root_path; + } + // How many corrections might we need? $corrections = substr_count($path_info, '/'); @@ -191,6 +231,65 @@ class path_helper } /** + * Get the web root path of the referer form an ajax request + * + * @param string $absolute_referer_url + * @param string $absolute_board_url + * @return string + */ + public function get_web_root_path_from_ajax_referer($absolute_referer_url, $absolute_board_url) + { + // If the board URL is in the beginning of the referer, this means + // we the referer is in the board URL or a subdirectory of it. + // So we just need to count the / (slashes) in the left over part of + // the referer and prepend ../ the the current root_path, to get the + // web root path of the referer. + if (strpos($absolute_referer_url, $absolute_board_url) === 0) + { + $relative_referer_path = substr($absolute_referer_url, strlen($absolute_board_url)); + $has_params = strpos($relative_referer_path, '?'); + if ($has_params !== false) + { + $relative_referer_path = substr($relative_referer_path, 0, $has_params); + } + $corrections = substr_count($relative_referer_path, '/'); + return $this->phpbb_root_path . str_repeat('../', $corrections - 1); + } + + // If not, it's a bit more complicated. We go to the parent directory + // of the referer until we find the remaining referer in the board URL. + // Foreach directory we need to add a ../ to the fixed root_path. + // When we finally found it, we need to remove the remaining referer + // from the board URL, to get the boards root path. + // If the then append these two strings, we get our fixed web root path. + $fixed_root_path = ''; + $referer_dir = $absolute_referer_url; + $has_params = strpos($referer_dir, '?'); + if ($has_params !== false) + { + $referer_dir = substr($referer_dir, 0, $has_params); + } + + // If we do not find a slash at the end of the referer, we come + // from a file. So the first dirname() does not need a traversal + // path correction. + if (substr($referer_dir, -1) !== '/') + { + $referer_dir = dirname($referer_dir); + } + + while (strpos($absolute_board_url, $referer_dir) !== 0) + { + $fixed_root_path .= '../'; + $referer_dir = dirname($referer_dir); + } + + $fixed_root_path .= substr($absolute_board_url, strlen($referer_dir) + 1); + // Add trailing slash + return $this->phpbb_root_path . $fixed_root_path . '/'; + } + + /** * Eliminates useless . and .. components from specified URL * * @param string $url URL to clean diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php index 3f51016c93..9b3dcadf32 100644 --- a/phpBB/phpbb/permissions.php +++ b/phpBB/phpbb/permissions.php @@ -17,7 +17,7 @@ class permissions { /** * Event dispatcher object - * @var \phpbb\event\dispatcher + * @var \phpbb\event\dispatcher_interface */ protected $dispatcher; @@ -30,10 +30,10 @@ class permissions /** * Constructor * - * @param \phpbb\event\dispatcher $phpbb_dispatcher Event dispatcher + * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher * @param \phpbb\user $user User Object */ - public function __construct(\phpbb\event\dispatcher $phpbb_dispatcher, \phpbb\user $user) + public function __construct(\phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\user $user) { $this->dispatcher = $phpbb_dispatcher; $this->user = $user; diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php index 26c11d9e22..f3b1676799 100644 --- a/phpBB/phpbb/profilefields/manager.php +++ b/phpBB/phpbb/profilefields/manager.php @@ -32,7 +32,7 @@ class manager /** * Event dispatcher object - * @var \phpbb\event\dispatcher + * @var \phpbb\event\dispatcher_interface */ protected $dispatcher; @@ -73,7 +73,7 @@ class manager * * @param \phpbb\auth\auth $auth Auth object * @param \phpbb\db\driver\driver_interface $db Database object - * @param \phpbb\event\dispatcher $dispatcher Event dispatcher object + * @param \phpbb\event\dispatcher_interface $dispatcher Event dispatcher object * @param \phpbb\request\request $request Request object * @param \phpbb\template\template $template Template object * @param \phpbb\di\service_collection $type_collection @@ -82,7 +82,7 @@ class manager * @param string $fields_language_table * @param string $fields_data_table */ - public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db, \phpbb\event\dispatcher $dispatcher, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\di\service_collection $type_collection, \phpbb\user $user, $fields_table, $fields_language_table, $fields_data_table) + public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db, \phpbb\event\dispatcher_interface $dispatcher, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\di\service_collection $type_collection, \phpbb\user $user, $fields_table, $fields_language_table, $fields_data_table) { $this->auth = $auth; $this->db = $db; diff --git a/phpBB/phpbb/viewonline_helper.php b/phpBB/phpbb/viewonline_helper.php index 3fc33119a3..b722f9d911 100644 --- a/phpBB/phpbb/viewonline_helper.php +++ b/phpBB/phpbb/viewonline_helper.php @@ -18,6 +18,17 @@ namespace phpbb; */ class viewonline_helper { + /** @var \phpbb\filesystem */ + protected $filesystem; + + /** + * @param \phpbb\filesystem $filesystem + */ + public function __construct(\phpbb\filesystem $filesystem) + { + $this->filesystem = $filesystem; + } + /** * Get user page * @@ -26,7 +37,13 @@ class viewonline_helper */ public function get_user_page($session_page) { - preg_match('#^([./\\]*+[a-z0-9/_-]+)#i', $session_page, $on_page); + $session_page = $this->filesystem->clean_path($session_page); + if (strpos($session_page, './') === 0) + { + $session_page = substr($session_page, 2); + } + + preg_match('#^((\.\./)*([a-z0-9/_-]+))#i', $session_page, $on_page); if (empty($on_page)) { $on_page[1] = ''; diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html index c9f81a4099..8fdec01212 100644 --- a/phpBB/styles/prosilver/template/mcp_forum.html +++ b/phpBB/styles/prosilver/template/mcp_forum.html @@ -48,6 +48,13 @@ <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --> <!-- IF topicrow.S_MOVED_TOPIC and S_CAN_DELETE --> <a href="{topicrow.U_DELETE_TOPIC}" class="topictitle">[ {L_DELETE_SHADOW_TOPIC} ]</a><!-- ENDIF --> <br /> + + <div class="responsive-show" style="display: none;"> + <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF --> + {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} « {topicrow.LAST_POST_TIME}<br /> + </div> + <span class="responsive-show left-box" style="display: none;">{L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong></span> + <!-- IF .topicrow.pagination --> <div class="pagination"> <ul> @@ -62,15 +69,11 @@ </ul> </div> <!-- ENDIF --> + <div class="responsive-hide"> <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF --> {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} </div> - <div class="responsive-show" style="display: none;"> - <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF --> - {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} « {topicrow.LAST_POST_TIME}<br /> - {L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong> - </div> </div> </dt> diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html index 4c14baf2b6..4fba966151 100644 --- a/phpBB/styles/prosilver/template/memberlist_search.html +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -29,18 +29,20 @@ <dd><input type="text" name="email" id="email" value="{EMAIL}" class="inputbox" /></dd> </dl> <!-- ENDIF --> +<!-- IF S_JABBER_ENABLED --> <dl> <dt><label for="jabber">{L_JABBER}:</label></dt> <dd><input type="text" name="jabber" id="jabber" value="{JABBER}" class="inputbox" /></dd> </dl> - <dl> - <dt><label for="search_group_id">{L_GROUP}{L_COLON}</label></dt> - <dd><select name="search_group_id" id="search_group_id">{S_GROUP_SELECT}</select></dd> - </dl> - <dl> - <dt><label for="sk" class="label3">{L_SORT_BY}{L_COLON}</label></dt> - <dd><select name="sk" id="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select></dd> - </dl> +<!-- ENDIF --> + <dl> + <dt><label for="search_group_id">{L_GROUP}{L_COLON}</label></dt> + <dd><select name="search_group_id" id="search_group_id">{S_GROUP_SELECT}</select></dd> + </dl> + <dl> + <dt><label for="sk" class="label3">{L_SORT_BY}{L_COLON}</label></dt> + <dd><select name="sk" id="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select></dd> + </dl> </fieldset> <fieldset class="fields1 column2"> diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html index 4cd306f87b..cb646f25e4 100644 --- a/phpBB/styles/prosilver/template/navbar_header.html +++ b/phpBB/styles/prosilver/template/navbar_header.html @@ -15,13 +15,13 @@ <!-- IF S_REGISTERED_USER --> <li class="small-icon icon-search-self"><a href="{U_SEARCH_SELF}" role="menuitem">{L_SEARCH_SELF}</a></li> <!-- ENDIF --> - <li class="small-icon icon-search-unanswered"><a href="{U_SEARCH_UNANSWERED}" role="menuitem">{L_SEARCH_UNANSWERED}</a></li> - <!-- IF S_LOAD_UNREADS --> - <li class="small-icon icon-search-unread"><a href="{U_SEARCH_UNREAD}" role="menuitem">{L_SEARCH_UNREAD}</a></li> - <!-- ENDIF --> <!-- IF S_USER_LOGGED_IN --> <li class="small-icon icon-search-new"><a href="{U_SEARCH_NEW}" role="menuitem">{L_SEARCH_NEW}</a></li> <!-- ENDIF --> + <!-- IF S_LOAD_UNREADS --> + <li class="small-icon icon-search-unread"><a href="{U_SEARCH_UNREAD}" role="menuitem">{L_SEARCH_UNREAD}</a></li> + <!-- ENDIF --> + <li class="small-icon icon-search-unanswered"><a href="{U_SEARCH_UNANSWERED}" role="menuitem">{L_SEARCH_UNANSWERED}</a></li> <li class="small-icon icon-search-active"><a href="{U_SEARCH_ACTIVE_TOPICS}" role="menuitem">{L_SEARCH_ACTIVE_TOPICS}</a></li> <!-- ENDIF --> <li class="separator"></li> @@ -30,12 +30,12 @@ </ul> </div> </li> - <!-- IF U_ACP --><li class="small-icon icon-acp" data-skip-responsive="true"><a href="{U_ACP}" title="{L_ACP}" role="menuitem">{L_ACP_SHORT}</a></li><!-- ENDIF --> - <!-- IF U_MCP --><li class="small-icon icon-mcp" data-skip-responsive="true"><a href="{U_MCP}" title="{L_MCP}" role="menuitem">{L_MCP_SHORT}</a></li><!-- ENDIF --> <!-- EVENT overall_header_navigation_prepend --> <li class="small-icon icon-faq" <!-- IF not S_USER_LOGGED_IN -->data-skip-responsive="true"<!-- ELSE -->data-last-responsive="true"<!-- ENDIF -->><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}" role="menuitem">{L_FAQ}</a></li> <!-- EVENT overall_header_navigation_append --> + <!-- IF U_ACP --><li class="small-icon icon-acp" data-skip-responsive="true"><a href="{U_ACP}" title="{L_ACP}" role="menuitem">{L_ACP_SHORT}</a></li><!-- ENDIF --> + <!-- IF U_MCP --><li class="small-icon icon-mcp" data-skip-responsive="true"><a href="{U_MCP}" title="{L_MCP}" role="menuitem">{L_MCP_SHORT}</a></li><!-- ENDIF --> <!-- IF S_REGISTERED_USER --> <li id="username_logged_in" class="rightside <!-- IF CURRENT_USER_AVATAR --> no-bulletin<!-- ENDIF -->" data-skip-responsive="true"> diff --git a/phpBB/styles/prosilver/template/pagination.html b/phpBB/styles/prosilver/template/pagination.html index cde183291d..cb2c09bff7 100644 --- a/phpBB/styles/prosilver/template/pagination.html +++ b/phpBB/styles/prosilver/template/pagination.html @@ -7,7 +7,7 @@ <ul class="dropdown-contents"> <li>{L_JUMP_TO_PAGE}{L_COLON}</li> <li class="page-jump-form"> - <input type="text" name="page-number" maxlength="6" title="{L_SEARCH_KEYWORDS}" class="inputbox tiny" value="" data-per-page="{PER_PAGE}" data-base-url="{BASE_URL|e('html_attr')}" data-start-name="{START_NAME}" /> + <input type="number" name="page-number" maxlength="6" title="{L_JUMP_PAGE}" class="inputbox tiny" data-per-page="{PER_PAGE}" data-base-url="{BASE_URL|e('html_attr')}" data-start-name="{START_NAME}" /> <input class="button2" value="{L_GO}" type="button" /> </li> </ul> diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html index c0bf681f47..986bc92298 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html +++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html @@ -20,10 +20,12 @@ </dd> </dl> <!-- ENDIF --> + <!-- IF S_JABBER_ENABLED --> <dl> <dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt> <dd><input type="email" name="jabber" id="jabber" maxlength="255" value="{JABBER}" class="inputbox" /></dd> </dl> + <!-- ENDIF --> <!-- BEGIN profile_fields --> <dl> <dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}{L_COLON}<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label> diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index a3fb8aa6da..e8c50f79b2 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -35,7 +35,7 @@ <!-- ENDIF --> <!-- IF S_DISPLAY_POST_INFO or .pagination or TOTAL_POSTS or TOTAL_TOPICS --> - <div class="action-bar top" <!-- IF S_HAS_SUBFORUM -->style="margin-top: 2em;"<!-- ENDIF -->> + <div class="action-bar top"> <!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO --> <div class="buttons"> @@ -150,6 +150,15 @@ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF --> <!-- IF topicrow.S_TOPIC_DELETED --><a href="{topicrow.U_MCP_QUEUE}">{DELETED_IMG}</a> <!-- ENDIF --> <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br /> + + <!-- IF not S_IS_BOT --> + <div class="responsive-show" style="display: none;"> + {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} « <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a> + <!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --><br />{L_POSTED} {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF --> + </div> + <!-- IF topicrow.REPLIES --><span class="responsive-show left-box" style="display: none;">{L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong></span><!-- ENDIF --> + <!-- ENDIF --> + <!-- IF .topicrow.pagination --> <div class="pagination"> <ul> @@ -164,19 +173,13 @@ </ul> </div> <!-- ENDIF --> + <div class="responsive-hide"> <!-- IF topicrow.S_HAS_POLL -->{POLL_IMG} <!-- ENDIF --> <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF --> {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} <!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --> » {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF --> </div> - <!-- IF not S_IS_BOT --> - <div class="responsive-show" style="display: none;"> - {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} « <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a> - <!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --><br />{L_POSTED} {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF --> - <!-- IF topicrow.REPLIES --><br />{L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong><!-- ENDIF --> - </div> - <!-- ENDIF --> <!-- EVENT topiclist_row_append --> </div> diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index 720a56468c..bc9e4b3965 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -2,7 +2,7 @@ ---------------------------------------- */ /** -* common.css +* common.css */ .rtl h1 { margin-right: 0; @@ -189,7 +189,7 @@ /* Misc layout styles ---------------------------------------- */ -/* column[1-2] styles are containers for two column layouts +/* column[1-2] styles are containers for two column layouts Also see tweaks.css */ .rtl .column1 { float: right; @@ -436,7 +436,7 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { } .rtl dl.icon dt .list-inner { - padding-left: 0; + padding-left: 5px; padding-right: 45px; /* Space for folder icon */ } @@ -1018,10 +1018,10 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { /* Forums and topics lists ----------------------------------------*/ - .rtl ul.topiclist.forums dt, .rtl ul.topiclist.topics dt { + .rtl ul.topiclist.forums dt { margin-left: -250px; } - .rtl ul.topiclist.forums dt .list-inner, .rtl ul.topiclist.topics dt .list-inner { + .rtl ul.topiclist.forums dt .list-inner { margin-left: 250px; } @@ -1033,11 +1033,11 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { @media only screen and (max-width: 550px), only screen and (max-device-width: 550px) { - .rtl ul.topiclist.forums dt, .rtl ul.topiclist.topics dt { + .rtl ul.topiclist.forums dt { margin-left: 0; } - .rtl ul.topiclist.forums dt .list-inner, .rtl ul.topiclist.topics dt .list-inner { + .rtl ul.topiclist.forums dt .list-inner { margin-left: 0; } } @@ -1060,7 +1060,7 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { { .rtl dl.details dt, .rtl dl.details dd { float: none; - text-align: right; + text-align: right; } .rtl dl.details dd { diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 606a788036..fce66f7efb 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -228,15 +228,15 @@ p.post-notice { background-image: none; } -p.post-notice.deleted:before { +p.post-notice.deleted:before { background-image: url("./images/icon_topic_deleted.png"); } -p.post-notice.unapproved:before { +p.post-notice.unapproved:before { background-image: url("./images/icon_topic_unapproved.gif"); } -p.post-notice.reported:before, p.post-notice.error:before { +p.post-notice.reported:before, p.post-notice.error:before { background-image: url("./images/icon_topic_reported.gif"); } @@ -273,10 +273,6 @@ a:hover { color: #D31141; } border-bottom-color: #5D8FBD; } -.postlink { - color: #368AD2; -} - .postlink:hover { background-color: #D0E4F6; color: #0D4473; diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 60a06df504..e33bf99965 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -59,7 +59,7 @@ body { font-size: 10px; line-height: normal; margin: 0; - padding: 0; + padding: 12px 0; word-wrap: break-word; } @@ -177,7 +177,7 @@ ol ol ul, ol ul ul, ul ol ul, ul ul ul { #wrap { border: 1px solid transparent; border-radius: 8px; - margin: 12px auto; + margin: 0 auto; max-width: 1152px; min-width: 625px; padding: 15px; @@ -185,7 +185,7 @@ ol ol ul, ol ul ul, ul ol ul, ul ul ul { @media only screen and (max-width: 1220px), only screen and (max-device-width: 1220px) { #wrap { - margin: 12px; + margin: 0 12px; } } @@ -432,7 +432,7 @@ ul.linklist.bulletin > li:before { padding-right: 4px; } -ul.linklist.bulletin > li:first-child:before, +ul.linklist.bulletin > li:first-child:before, ul.linklist.bulletin > li.rightside:last-child:before { content: none; } @@ -852,6 +852,10 @@ fieldset.fields1 dl.pmlist dd.recipients { margin: 4px 0; } +.forabg + .action-bar { + margin-top: 2em; +} + .action-bar:after { clear: both; content: ''; diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index 0f7f843010..a014f57d47 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -458,7 +458,7 @@ blockquote { blockquote blockquote { /* Nested quotes */ font-size: 1em; - margin: 0.5em 1px 0 15px; + margin: 0.5em 1px 0 15px; } blockquote cite { @@ -515,7 +515,7 @@ blockquote .codebox { ----------------------------------------*/ .attachbox { float: left; - width: auto; + width: auto; max-width: 100%; margin: 5px 5px 5px 0; padding: 6px; @@ -592,7 +592,7 @@ dl.file dt { dl.file dd { margin: 0; - padding: 0; + padding: 0; } dl.thumbnail img { diff --git a/phpBB/styles/prosilver/theme/cp.css b/phpBB/styles/prosilver/theme/cp.css index e144c74f20..5149a16ec9 100644 --- a/phpBB/styles/prosilver/theme/cp.css +++ b/phpBB/styles/prosilver/theme/cp.css @@ -138,7 +138,7 @@ ul.cplist { cursor: pointer; } -/* CP tabbed menu +/* CP tabbed menu ----------------------------------------*/ #tabs { margin: 20px 0 0 7px; @@ -321,7 +321,7 @@ ol.def-rules li { border-right-color: transparent; } -.pmlist li.pm_marked_colour, .pm_marked_colour, +.pmlist li.pm_marked_colour, .pm_marked_colour, .pmlist li.pm_replied_colour, .pm_replied_colour, .pmlist li.pm_friend_colour, .pm_friend_colour, .pmlist li.pm_foe_colour, .pm_foe_colour { @@ -354,7 +354,7 @@ ol.def-rules li { @media only screen and (max-width: 900px), only screen and (max-device-width: 900px) { .nojs #tabs a span, .nojs #minitabs a span { - max-width: 40px; + max-width: 40px; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.5px; @@ -366,8 +366,8 @@ ol.def-rules li { margin: 0; } - #navigation { - padding: 0; + #navigation { + padding: 0; margin: 0 auto; max-width: 320px; } diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css index a1d70dedf6..f0effa01c4 100644 --- a/phpBB/styles/prosilver/theme/forms.css +++ b/phpBB/styles/prosilver/theme/forms.css @@ -68,7 +68,7 @@ fieldset dl { } fieldset dt { - float: left; + float: left; width: 40%; text-align: left; display: block; @@ -276,6 +276,10 @@ textarea.inputbox { width: auto !important; } +input[type="number"] { + -moz-padding-end: inherit; +} + input[type="search"] { -webkit-appearance: textfield; -webkit-box-sizing: content-box; @@ -313,8 +317,8 @@ input.button3 { font-variant: small-caps; } -input[type="button"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"] { - cursor: pointer; +input[type="button"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"] { + cursor: pointer; } /* Alternative button */ diff --git a/phpBB/styles/prosilver/theme/print.css b/phpBB/styles/prosilver/theme/print.css index 88de620493..34129c92e8 100644 --- a/phpBB/styles/prosilver/theme/print.css +++ b/phpBB/styles/prosilver/theme/print.css @@ -91,11 +91,11 @@ hr { } /* Dont want to print url for names or titles in content area */ -.postbody .author a:link, .postbody .author a:visited, -html>body .postbody .author a:link:after, +.postbody .author a:link, .postbody .author a:visited, +html>body .postbody .author a:link:after, html>body .postbody .author a:visited:after, -.postquote .quote-by a:link, .postquote .quote-by a:visited, -html>body .postquote .quote-by a:link:after, +.postquote .quote-by a:link, .postquote .quote-by a:visited, +html>body .postquote .quote-by a:link:after, html>body .postquote .quote-by a:visited:after, html>body .postbody h1 a:link:after, html>body .postbody h2 a:link:after { text-decoration: none; @@ -119,7 +119,7 @@ html>body .postbody h1 a:link:after, html>body .postbody h2 a:link:after { .postquote img { display: none; } .postquote span { display: block; } .postquote span .postquote { font-size: 100%; } -.quote-by, blockquote cite { +.quote-by, blockquote cite { color: black; display : block; font-weight: bold; diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index 9615f1a0b4..241b4d132e 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -12,6 +12,10 @@ html { height: auto; } +body { + padding: 0; +} + #wrap { border: none; border-radius: 0; @@ -118,23 +122,23 @@ ul.topiclist li.header dt .list-inner { min-height: 0; } -ul.topiclist dd { - display: none; +ul.topiclist dd { + display: none; } -ul.topiclist dd.mark { - display: block; +ul.topiclist dd.mark { + display: block; } /* Forums and topics lists ----------------------------------------*/ -ul.topiclist.forums dt, ul.topiclist.topics dt { +ul.topiclist.forums dt { margin-right: -250px; } -ul.topiclist.forums dt .list-inner, ul.topiclist.topics dt .list-inner { +ul.topiclist.forums dt .list-inner { margin-right: 250px; } -ul.topiclist.forums dd.lastpost, ul.topiclist.topics dd.lastpost { +ul.topiclist.forums dd.lastpost { display: block; } @@ -159,15 +163,15 @@ ul.topiclist.forums dd.topics dfn, ul.topiclist.topics dd.posts dfn { @media only screen and (max-width: 550px), only screen and (max-device-width: 550px) { - ul.topiclist.forums dt, ul.topiclist.topics dt { + ul.topiclist.forums dt { margin-right: 0; } - ul.topiclist.forums dt .list-inner, ul.topiclist.topics dt .list-inner { + ul.topiclist.forums dt .list-inner { margin-right: 0; } - ul.topiclist.forums dd.lastpost, ul.topiclist.topics dd.lastpost { + ul.topiclist.forums dd.lastpost { display: none; } } @@ -200,8 +204,8 @@ ul.topiclist li.row dt a.subforum { margin: 5px 0 0; } -.row .pagination > ul { - margin-top: 0; +.row .pagination .ellipsis + li { + display: none !important; } /* Responsive tables @@ -366,7 +370,7 @@ fieldset.quick-login label[for="autologin"] { dl.details dt, dl.details dd { width: auto; float: none; - text-align: left; + text-align: left; } dl.details dd { diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css index 28eb328cb1..ea0c66d20a 100644 --- a/phpBB/styles/prosilver/theme/tweaks.css +++ b/phpBB/styles/prosilver/theme/tweaks.css @@ -1,6 +1,6 @@ /* Style Sheet Tweaks -These style definitions are IE 7 and 8 specific +These style definitions are IE 7 and 8 specific tweaks required due to its poor CSS support. -------------------------------------------------*/ @@ -14,9 +14,9 @@ ul.linklist { } /* Align checkboxes/radio buttons nicely */ -dd label input { - vertical-align: text-bottom; - *vertical-align: middle; +dd label input { + vertical-align: text-bottom; + *vertical-align: middle; } /* Simple fix so forum and topic lists always have a height set */ diff --git a/phpBB/styles/subsilver2/template/memberlist_search.html b/phpBB/styles/subsilver2/template/memberlist_search.html index aa6b61fe22..12dd10be2e 100644 --- a/phpBB/styles/subsilver2/template/memberlist_search.html +++ b/phpBB/styles/subsilver2/template/memberlist_search.html @@ -104,8 +104,12 @@ <tr> <td class="row1"><b class="genmed">{L_GROUP}{L_COLON}</b></td> <td class="row2" nowrap="nowrap"><select name="search_group_id">{S_GROUP_SELECT}</select></td> - <td class="row1"><b class="genmed">{L_JABBER}{L_COLON}</b></td> - <td class="row2"><input class="post" type="text" name="jabber" value="{JABBER}" /></td> + <!-- IF S_JABBER_ENABLED --> + <td class="row1"><b class="genmed">{L_JABBER}{L_COLON}</b></td> + <td class="row2"><input class="post" type="text" name="jabber" value="{JABBER}" /></td> + <!-- ELSE --> + <td colspan="2" class="row1"> </td> + <!-- ENDIF --> </tr> <tr> <td class="row1"><b class="genmed">{L_SORT_BY}{L_COLON}</b></td> diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index 550643ff03..00c627f62e 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -121,10 +121,12 @@ <td><a href="{U_PM}" class="imageset">{PM_IMG}</a></td> </tr> <!-- ENDIF --> + <!-- IF S_JABBER_ENABLED --> <tr> <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_JABBER}{L_COLON} </td> <td><!-- IF U_JABBER --><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false" class="imageset">{JABBER_IMG}</a><!-- ELSEIF USER_JABBER -->{USER_JABBER_IMG}<!-- ENDIF --></td> </tr> + <!-- ENDIF --> <!-- BEGIN custom_fields --> <!-- IF custom_fields.S_PROFILE_CONTACT --> <tr> diff --git a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html index bf0aa8f899..2d0140a15d 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html @@ -12,10 +12,12 @@ <tr> <td class="row1" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td> </tr> +<!-- IF S_JABBER_ENABLED --> <tr> <td class="row1" width="35%"><b class="genmed">{L_UCP_JABBER}{L_COLON} </b></td> <td class="row2"><input class="post" type="text" name="jabber" size="30" maxlength="255" value="{JABBER}" /></td> </tr> +<!-- ENDIF --> <!-- IF S_BIRTHDAYS_ENABLED --> <tr> <td class="row1" width="35%"><b class="genmed">{L_BIRTHDAY}{L_COLON} </b><br /><span class="gensmall">{L_BIRTHDAY_EXPLAIN}</span></td> diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php index 246397ad6c..de505e2c9f 100644 --- a/tests/avatar/manager_test.php +++ b/tests/avatar/manager_test.php @@ -38,6 +38,7 @@ class phpbb_avatar_manager_test extends \phpbb_test_case new phpbb_mock_request() ), new \phpbb\filesystem(), + $this->getMock('\phpbb\request\request'), $phpbb_root_path, $phpEx ); diff --git a/tests/controller/helper_route_test.php b/tests/controller/helper_route_test.php index 621efaa830..206c3a4f0b 100644 --- a/tests/controller/helper_route_test.php +++ b/tests/controller/helper_route_test.php @@ -26,6 +26,7 @@ class phpbb_controller_helper_route_test extends phpbb_test_case new phpbb_mock_request() ), new \phpbb\filesystem(), + $this->getMock('\phpbb\request\request'), $phpbb_root_path, $phpEx ); diff --git a/tests/dbal/fixtures/migrator_config_text.xml b/tests/dbal/fixtures/migrator_config_text.xml new file mode 100644 index 0000000000..ba8e1fcfcc --- /dev/null +++ b/tests/dbal/fixtures/migrator_config_text.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_config_text"> + <column>config_name</column> + <column>config_value</column> + </table> +</dataset> diff --git a/tests/dbal/migrator_tool_config_text_test.php b/tests/dbal/migrator_tool_config_text_test.php new file mode 100644 index 0000000000..b271c2d62e --- /dev/null +++ b/tests/dbal/migrator_tool_config_text_test.php @@ -0,0 +1,75 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +class phpbb_dbal_migrator_tool_config_text_test extends phpbb_database_test_case +{ + public function getDataSet() + { + return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/migrator_config_text.xml'); + } + + public function setup() + { + parent::setup(); + + $this->db = $this->new_dbal(); + $this->config_text = new \phpbb\config\db_text($this->db, 'phpbb_config_text'); + + $this->tool = new \phpbb\db\migration\tool\config_text($this->config_text); + } + + public function test_add() + { + $this->tool->add('foo', 'bar'); + $this->assertEquals('bar', $this->config_text->get('foo')); + } + + public function test_add_twice() + { + $this->tool->add('foo', 'bar'); + $this->assertEquals('bar', $this->config_text->get('foo')); + + $this->tool->add('foo', 'bar2'); + $this->assertEquals('bar', $this->config_text->get('foo')); + } + + public function test_update() + { + $this->config_text->set('foo', 'bar'); + + $this->tool->update('foo', 'bar2'); + $this->assertEquals('bar2', $this->config_text->get('foo')); + } + + public function test_remove() + { + $this->config_text->set('foo', 'bar'); + + $this->tool->remove('foo'); + $this->assertNull($this->config_text->get('foo')); + } + + public function test_reverse_add() + { + $this->config_text->set('foo', 'bar'); + + $this->tool->reverse('add', 'foo'); + $this->assertNull($this->config_text->get('foo')); + } + + public function test_reverse_remove() + { + $this->tool->reverse('remove', 'foo'); + $this->assertSame('', $this->config_text->get('foo')); + } +} diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php index 6b6ea80d82..535e4fe0d5 100644 --- a/tests/extension/metadata_manager_test.php +++ b/tests/extension/metadata_manager_test.php @@ -53,6 +53,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case new phpbb_mock_request() ), new \phpbb\filesystem(), + $this->getMock('\phpbb\request\request'), $this->phpbb_root_path, $this->phpEx ), diff --git a/tests/functions/build_url_test.php b/tests/functions/build_url_test.php index 7a70bddc71..06415a424e 100644 --- a/tests/functions/build_url_test.php +++ b/tests/functions/build_url_test.php @@ -30,10 +30,11 @@ class phpbb_build_url_test extends phpbb_test_case new phpbb_mock_request() ), new \phpbb\filesystem(), + $this->getMock('\phpbb\request\request'), $phpbb_root_path, 'php' ); - $phpbb_container->set('path_helper', $path_helper); + $phpbb_container->set('path_helper', $phpbb_path_helper); } public function build_url_test_data() { diff --git a/tests/mock/controller_helper.php b/tests/mock/controller_helper.php index 9f70f8e96c..f9d231258e 100644 --- a/tests/mock/controller_helper.php +++ b/tests/mock/controller_helper.php @@ -23,4 +23,9 @@ class phpbb_mock_controller_helper extends \phpbb\controller\helper $provider->find_routing_files($manager->get_finder()); $this->route_collection = $provider->find($phpbb_root_path_ext)->get_routes(); } + + public function get_current_url() + { + return ''; + } } diff --git a/tests/path_helper/path_helper_test.php b/tests/path_helper/path_helper_test.php index 9866cb6efe..27e94d6a07 100644 --- a/tests/path_helper/path_helper_test.php +++ b/tests/path_helper/path_helper_test.php @@ -29,6 +29,7 @@ class phpbb_path_helper_test extends phpbb_test_case new phpbb_mock_request() ), new \phpbb\filesystem(), + $this->getMock('\phpbb\request\request'), $this->phpbb_root_path, 'php' ); @@ -158,6 +159,7 @@ class phpbb_path_helper_test extends phpbb_test_case $path_helper = new \phpbb\path_helper( $symfony_request, new \phpbb\filesystem(), + $this->getMock('\phpbb\request\request'), $this->phpbb_root_path, 'php' ); @@ -338,4 +340,58 @@ class phpbb_path_helper_test extends phpbb_test_case { $this->assertEquals($expected, $this->path_helper->append_url_params($url, $params, $is_amp)); } + + public function get_web_root_path_from_ajax_referer_data() + { + return array( + array( + 'http://www.phpbb.com/community/route1/route2/', + 'http://www.phpbb.com/community', + '../../', + ), + array( + 'http://www.phpbb.com/community/route1/route2', + 'http://www.phpbb.com/community', + '../', + ), + array( + 'http://www.phpbb.com/community/route1', + 'http://www.phpbb.com/community', + '', + ), + array( + 'http://www.phpbb.com/community/', + 'http://www.phpbb.com/community', + '', + ), + array( + 'http://www.phpbb.com/notcommunity/route1/route2/', + 'http://www.phpbb.com/community', + '../../../community/', + ), + array( + 'http://www.phpbb.com/notcommunity/route1/route2', + 'http://www.phpbb.com/community', + '../../community/', + ), + array( + 'http://www.phpbb.com/notcommunity/route1', + 'http://www.phpbb.com/community', + '../community/', + ), + array( + 'http://www.phpbb.com/notcommunity/', + 'http://www.phpbb.com/community', + '../community/', + ), + ); + } + + /** + * @dataProvider get_web_root_path_from_ajax_referer_data + */ + public function test_get_web_root_path_from_ajax_referer($referer_url, $board_url, $expected) + { + $this->assertEquals($this->phpbb_root_path . $expected, $this->path_helper->get_web_root_path_from_ajax_referer($referer_url, $board_url)); + } } diff --git a/tests/security/redirect_test.php b/tests/security/redirect_test.php index fb1011cde0..3961c2781e 100644 --- a/tests/security/redirect_test.php +++ b/tests/security/redirect_test.php @@ -63,6 +63,7 @@ class phpbb_security_redirect_test extends phpbb_security_test_base new phpbb_mock_request() ), new \phpbb\filesystem(), + $this->getMock('\phpbb\request\request'), $this->phpbb_root_path, 'php' ); diff --git a/tests/template/template_events_test.php b/tests/template/template_events_test.php index ce3c90b78a..c415c969fe 100644 --- a/tests/template/template_events_test.php +++ b/tests/template/template_events_test.php @@ -143,6 +143,7 @@ Zeta test event in all', new phpbb_mock_request() ), new \phpbb\filesystem(), + $this->getMock('\phpbb\request\request'), $phpbb_root_path, $phpEx ); diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php index 00b823b2c4..83446b5352 100644 --- a/tests/template/template_test_case.php +++ b/tests/template/template_test_case.php @@ -72,6 +72,7 @@ class phpbb_template_template_test_case extends phpbb_test_case new phpbb_mock_request() ), new \phpbb\filesystem(), + $this->getMock('\phpbb\request\request'), $phpbb_root_path, $phpEx ); diff --git a/tests/template/template_test_case_with_tree.php b/tests/template/template_test_case_with_tree.php index 4f778a9c1c..68ecc4b706 100644 --- a/tests/template/template_test_case_with_tree.php +++ b/tests/template/template_test_case_with_tree.php @@ -27,6 +27,7 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat new phpbb_mock_request() ), new \phpbb\filesystem(), + $this->getMock('\phpbb\request\request'), $phpbb_root_path, $phpEx ); diff --git a/tests/test_framework/phpbb_session_test_case.php b/tests/test_framework/phpbb_session_test_case.php index 8a5d582573..d4fc174a12 100644 --- a/tests/test_framework/phpbb_session_test_case.php +++ b/tests/test_framework/phpbb_session_test_case.php @@ -32,6 +32,7 @@ abstract class phpbb_session_test_case extends phpbb_database_test_case $phpbb_path_helper = new \phpbb\path_helper( $symfony_request, $phpbb_filesystem, + $this->getMock('\phpbb\request\request'), $phpbb_root_path, $phpEx ); diff --git a/tests/viewonline/helper_test.php b/tests/viewonline/helper_test.php index e4950bb51a..bbbed59de7 100644 --- a/tests/viewonline/helper_test.php +++ b/tests/viewonline/helper_test.php @@ -17,23 +17,27 @@ class phpbb_viewonline_helper_test extends phpbb_test_case { parent::setUp(); - $this->viewonline_helper = new \phpbb\viewonline_helper(); + $this->viewonline_helper = new \phpbb\viewonline_helper(new \phpbb\filesystem()); } public function session_pages_data() { return array( - array('index.php', 'index.php'), - array('foobar/test.php', 'foobar/test.php'), + array('index.php', 'index'), + array('foobar/test.php', 'foobar/test'), array('', ''), - array('../index.php', '../index.php'), + array('./../../index.php', '../../index'), + array('../subdir/index.php', '../subdir/index'), + array('../index.php', '../index'), + array('././index.php', 'index'), + array('./index.php', 'index'), ); } /** * @dataProvider session_pages_data */ - public function test_get_user_page($expected, $session_page) + public function test_get_user_page($session_page, $expected) { $on_page = $this->viewonline_helper->get_user_page($session_page); $this->assertArrayHasKey(1, $on_page); diff --git a/travis/ext-sniff.sh b/travis/ext-sniff.sh new file mode 100755 index 0000000000..4e557a41c1 --- /dev/null +++ b/travis/ext-sniff.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# 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. +# +set -e +set -x + +DB=$1 +TRAVIS_PHP_VERSION=$2 +EXTNAME=$3 + +if [ "$TRAVIS_PHP_VERSION" == "5.5" -a "$DB" == "mysqli" ] +then + phpBB/vendor/bin/phpcs \ + -s \ + --extensions=php \ + --standard=build/code_sniffer/ruleset-php-extensions.xml \ + "--ignore=phpBB/ext/$EXTNAME/tests/*" \ + "--ignore=phpBB/ext/$EXTNAME/vendor/*" \ + "phpBB/ext/$EXTNAME" +fi |