diff options
22 files changed, 355 insertions, 55 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/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/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/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/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/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/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/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/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 8a985f8f8d..bc9e4b3965 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -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; } } diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index a84be4bd99..fce66f7efb 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -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 0fe2ebfd90..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; } } @@ -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/forms.css b/phpBB/styles/prosilver/theme/forms.css index 5552c14376..f0effa01c4 100644 --- a/phpBB/styles/prosilver/theme/forms.css +++ b/phpBB/styles/prosilver/theme/forms.css @@ -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; diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index f24f452b4d..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; @@ -127,14 +131,14 @@ ul.topiclist dd.mark { /* 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 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/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 |