aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/admin.css1
-rw-r--r--phpBB/assets/javascript/core.js1
-rwxr-xr-xphpBB/bin/phpbbcli.php5
-rw-r--r--phpBB/includes/acp/acp_logs.php2
-rw-r--r--phpBB/includes/functions.php40
-rw-r--r--phpBB/includes/ucp/ucp_profile.php2
-rw-r--r--phpBB/language/en/acp/profile.php4
-rw-r--r--phpBB/language/en/common.php4
-rw-r--r--phpBB/language/en/email/newtopic_notify.txt4
-rw-r--r--phpBB/language/en/help/faq.php4
-rw-r--r--phpBB/phpbb/avatar/driver/local.php4
-rw-r--r--phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php5
-rw-r--r--phpBB/phpbb/db/migrator.php2
-rw-r--r--phpBB/phpbb/event/php_exporter.php25
-rw-r--r--phpBB/phpbb/filesystem/filesystem.php2
-rw-r--r--phpBB/phpbb/session.php8
-rw-r--r--phpBB/phpbb/template/twig/extension.php2
-rw-r--r--phpBB/styles/prosilver/template/mcp_ban.html6
-rw-r--r--phpBB/styles/prosilver/template/navbar_header.html12
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html41
-rw-r--r--phpBB/styles/prosilver/template/plupload.html4
-rw-r--r--phpBB/styles/prosilver/template/posting_buttons.html5
-rw-r--r--phpBB/styles/prosilver/template/posting_smilies.html4
-rw-r--r--phpBB/styles/prosilver/template/posting_topic_review.html4
-rw-r--r--phpBB/styles/prosilver/template/simple_footer.html6
-rw-r--r--phpBB/styles/prosilver/template/ucp_agreement.html5
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_history.html4
-rw-r--r--phpBB/styles/prosilver/template/ucp_prefs_personal.html4
-rw-r--r--phpBB/styles/prosilver/template/ucp_register.html4
-rw-r--r--phpBB/styles/prosilver/theme/common.css13
-rw-r--r--phpBB/styles/prosilver/theme/responsive.css1
-rw-r--r--phpBB/viewforum.php2
-rw-r--r--tests/event/fixtures/extra_description.test2
-rw-r--r--tests/event/php_exporter_test.php2
-rw-r--r--tests/migrator/get_callable_from_step_test.php136
35 files changed, 289 insertions, 81 deletions
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index efdd6f1e22..7cf6c22236 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -840,6 +840,7 @@ table.zebra-table tbody tr:nth-child(odd) {
}
.row2 {
+ word-break: break-all;
background-color: #DCEBFE;
}
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index bd1925baf6..752dfa4ab2 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -1332,7 +1332,6 @@ phpbb.toggleDropdown = function() {
marginLeft: 0,
left: 0,
marginRight: 0,
- right: 0,
maxWidth: (windowWidth - 4) + 'px'
});
diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php
index 3061fee817..5ae18334d9 100755
--- a/phpBB/bin/phpbbcli.php
+++ b/phpBB/bin/phpbbcli.php
@@ -71,9 +71,12 @@ require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx);
register_compatibility_globals();
+/** @var \phpbb\config\config $config */
+$config = $phpbb_container->get('config');
+
/** @var \phpbb\language\language $language */
$language = $phpbb_container->get('language');
-$language->set_default_language($phpbb_container->get('config')['default_lang']);
+$language->set_default_language($config['default_lang']);
$language->add_lang(array('common', 'acp/common', 'cli'));
/* @var $user \phpbb\user */
diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php
index 8c3fb66a70..f9bb35791c 100644
--- a/phpBB/includes/acp/acp_logs.php
+++ b/phpBB/includes/acp/acp_logs.php
@@ -151,7 +151,7 @@ class acp_logs
{
$data = array();
- $checks = array('viewtopic', 'viewlogs', 'viewforum');
+ $checks = array('viewpost', 'viewtopic', 'viewlogs', 'viewforum');
foreach ($checks as $check)
{
if (isset($row[$check]) && $row[$check])
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 270d513a26..cbea7afe6e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -66,27 +66,29 @@ function set_var(&$result, $var, $type, $multibyte = false)
/**
* Generates an alphanumeric random string of given length
*
-* @param int $num_chars Length of random string, defaults to 8
+* @param int $num_chars Length of random string, defaults to 8.
+* This number should be less or equal than 64.
*
* @return string
*/
function gen_rand_string($num_chars = 8)
{
// [a, z] + [0, 9] = 36
- return substr(strtoupper(base_convert(bin2hex(random_bytes($num_chars)), 16, 36)), 0, $num_chars);
+ return substr(strtoupper(base_convert(bin2hex(random_bytes($num_chars + 1)), 16, 36)), 0, $num_chars);
}
/**
* Generates a user-friendly alphanumeric random string of given length
* We remove 0 and O so users cannot confuse those in passwords etc.
*
-* @param int $num_chars Length of random string, defaults to 8
+* @param int $num_chars Length of random string, defaults to 8.
+* This number should be less or equal than 64.
*
* @return string
*/
function gen_rand_string_friendly($num_chars = 8)
{
- $rand_str = bin2hex(random_bytes($num_chars));
+ $rand_str = bin2hex(random_bytes($num_chars + 1));
// Remove Z and Y from the base_convert(), replace 0 with Z and O with Y
// [a, z] + [0, 9] - {z, y} = [a, z] + [0, 9] - {0, o} = 34
@@ -2467,7 +2469,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
- $template->assign_vars(array(
+ $login_box_template_data = array(
'LOGIN_ERROR' => $err,
'LOGIN_EXPLAIN' => $l_explain,
@@ -2475,6 +2477,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
'U_RESEND_ACTIVATION' => ($config['require_activation'] == USER_ACTIVATION_SELF && $config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '',
'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),
'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
+ 'UA_PRIVACY' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy')),
'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false,
'S_HIDDEN_FIELDS' => $s_hidden_fields,
@@ -2484,7 +2487,29 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
'USERNAME_CREDENTIAL' => 'username',
'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password',
- ));
+ );
+
+ /**
+ * Event to add/modify login box template data
+ *
+ * @event core.login_box_modify_template_data
+ * @var int admin Flag whether user is admin
+ * @var string username User name
+ * @var int autologin Flag whether autologin is enabled
+ * @var string redirect Redirect URL
+ * @var array login_box_template_data Array with the login box template data
+ * @since 3.2.3-RC2
+ */
+ $vars = array(
+ 'admin',
+ 'username',
+ 'autologin',
+ 'redirect',
+ 'login_box_template_data',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.login_box_modify_template_data', compact($vars)));
+
+ $template->assign_vars($login_box_template_data);
page_header($user->lang['LOGIN']);
@@ -4405,9 +4430,10 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'U_SEARCH_ACTIVE_TOPICS'=> append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=active_topics'),
'U_DELETE_COOKIES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=delete_cookies'),
'U_CONTACT_US' => ($config['contact_admin_form_enable'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin') : '',
- 'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'),
+ 'U_TEAM' => (!$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'),
'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),
'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
+ 'UA_PRIVACY' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy')),
'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '',
'U_FEED' => $controller_helper->route('phpbb_feed_index'),
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index beb440ce76..a36bf619f8 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -159,7 +159,7 @@ class ucp_profile
$phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_UPDATE_EMAIL', false, array(
'reportee_id' => $user->data['user_id'],
$user->data['username'],
- $data['user_email'],
+ $user->data['user_email'],
$data['email']
));
}
diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php
index d365aeb183..41cbd9cb93 100644
--- a/phpBB/language/en/acp/profile.php
+++ b/phpBB/language/en/acp/profile.php
@@ -161,8 +161,8 @@ $lang = array_merge($lang, array(
'STEP_2_EXPLAIN_EDIT' => 'Here you are able to change some common options.<br /><strong>Please note that changes to profile fields will not affect existing profile fields entered by your users.</strong>',
'STEP_2_TITLE_CREATE' => 'Profile type specific options',
'STEP_2_TITLE_EDIT' => 'Profile type specific options',
- 'STEP_3_EXPLAIN_CREATE' => 'Since you have more than one board language installed, you have to fill out the remaining language items too. The profile field will work with the default language enabled, you are able to fill out the remaining language items later too.',
- 'STEP_3_EXPLAIN_EDIT' => 'Since you have more than one board language installed, you now can change or add the remaining language items too. The profile field will work with the default language enabled.',
+ 'STEP_3_EXPLAIN_CREATE' => 'Since you have more than one board language installed, you have to fill out the remaining language items too. If you don’t, then default language setting for this custom profile field will be used, you are able to fill out the remaining language items later too.',
+ 'STEP_3_EXPLAIN_EDIT' => 'Since you have more than one board language installed, you now can change or add the remaining language items too. If you don’t, then default language setting for this custom profile field will be used.',
'STEP_3_TITLE_CREATE' => 'Remaining language definitions',
'STEP_3_TITLE_EDIT' => 'Language definitions',
'STRING_DEFAULT_VALUE_EXPLAIN' => 'Enter a default phrase to be displayed, a default value. Leave empty if you want to show it empty at the first place.',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 5140919dad..213563aea0 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -193,7 +193,7 @@ $lang = array_merge($lang, array(
'DAYS' => 'Days',
'DELETE' => 'Delete',
'DELETE_ALL' => 'Delete all',
- 'DELETE_COOKIES' => 'Delete all board cookies',
+ 'DELETE_COOKIES' => 'Delete cookies',
'DELETE_MARKED' => 'Delete marked',
'DELETE_POST' => 'Delete post',
'DELIMITER' => 'Delimiter',
@@ -608,6 +608,7 @@ $lang = array_merge($lang, array(
'PREVIOUS' => 'Previous', // Used in pagination
'PREVIOUS_STEP' => 'Previous',
'PRIVACY' => 'Privacy policy',
+ 'PRIVACY_LINK' => 'Privacy',
'PRIVATE_MESSAGE' => 'Private message',
'PRIVATE_MESSAGES' => 'Private messages',
'PRIVATE_MESSAGING' => 'Private messaging',
@@ -732,6 +733,7 @@ $lang = array_merge($lang, array(
'SUBMIT' => 'Submit',
'TB' => 'TB',
+ 'TERMS_LINK' => 'Terms',
'TERMS_USE' => 'Terms of use',
'TEST_CONNECTION' => 'Test connection',
'THE_TEAM' => 'The team',
diff --git a/phpBB/language/en/email/newtopic_notify.txt b/phpBB/language/en/email/newtopic_notify.txt
index b9416d8e40..12e0bb8393 100644
--- a/phpBB/language/en/email/newtopic_notify.txt
+++ b/phpBB/language/en/email/newtopic_notify.txt
@@ -6,6 +6,10 @@ You are receiving this notification because you are watching the forum "{FORUM_N
{U_FORUM}
+To see new topic directly, visit the following link:
+
+{U_TOPIC}
+
If you no longer wish to watch this forum you can either click the "Unsubscribe forum" link found in the forum above, or by clicking the following link:
{U_STOP_WATCHING_FORUM}
diff --git a/phpBB/language/en/help/faq.php b/phpBB/language/en/help/faq.php
index e59d950948..6b165da0f8 100644
--- a/phpBB/language/en/help/faq.php
+++ b/phpBB/language/en/help/faq.php
@@ -111,8 +111,8 @@ $lang = array_merge($lang, array(
'HELP_FAQ_LOGIN_CANNOT_REGISTER_QUESTION' => 'Why can’t I register?',
'HELP_FAQ_LOGIN_COPPA_ANSWER' => 'COPPA, or the Children’s Online Privacy Protection Act of 1998, is a law in the United States requiring websites which can potentially collect information from minors under the age of 13 to have written parental consent or some other method of legal guardian acknowledgment, allowing the collection of personally identifiable information from a minor under the age of 13. If you are unsure if this applies to you as someone trying to register or to the website you are trying to register on, contact legal counsel for assistance. Please note that phpBB Limited and the owners of this board cannot provide legal advice and is not a point of contact for legal concerns of any kind, except as outlined in question “Who do I contact about abusive and/or legal matters related to this board?”.',
'HELP_FAQ_LOGIN_COPPA_QUESTION' => 'What is COPPA?',
- 'HELP_FAQ_LOGIN_DELETE_COOKIES_ANSWER' => '“Delete all board cookies” deletes the cookies created by phpBB which keep you authenticated and logged into the board. Cookies also provide functions such as read tracking if they have been enabled by a board administrator. If you are having login or logout problems, deleting board cookies may help.',
- 'HELP_FAQ_LOGIN_DELETE_COOKIES_QUESTION' => 'What does the “Delete all board cookies” do?',
+ 'HELP_FAQ_LOGIN_DELETE_COOKIES_ANSWER' => '“Delete cookies” deletes the cookies created by phpBB which keep you authenticated and logged into the board. Cookies also provide functions such as read tracking if they have been enabled by a board administrator. If you are having login or logout problems, deleting board cookies may help.',
+ 'HELP_FAQ_LOGIN_DELETE_COOKIES_QUESTION' => 'What does the “Delete cookies” do?',
'HELP_FAQ_LOGIN_LOST_PASSWORD_ANSWER' => 'Don’t panic! While your password cannot be retrieved, it can easily be reset. Visit the login page and click <em>I forgot my password</em>. Follow the instructions and you should be able to log in again shortly.<br />However, if you are not able to reset your password, contact a board administrator.',
'HELP_FAQ_LOGIN_LOST_PASSWORD_QUESTION' => 'I’ve lost my password!',
'HELP_FAQ_LOGIN_REGISTER_ANSWER' => 'You may not have to, it is up to the administrator of the board as to whether you need to register in order to post messages. However; registration will give you access to additional features not available to guest users such as definable avatar images, private messaging, emailing of fellow users, usergroup subscription, etc. It only takes a few moments to register so it is recommended you do so.',
diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php
index 8b773017c5..4b84e4201c 100644
--- a/phpBB/phpbb/avatar/driver/local.php
+++ b/phpBB/phpbb/avatar/driver/local.php
@@ -158,7 +158,7 @@ class local extends \phpbb\avatar\driver\driver
*/
protected function get_avatar_list($user)
{
- $avatar_list = ($this->cache == null) ? false : $this->cache->get('_avatar_local_list');
+ $avatar_list = ($this->cache == null) ? false : $this->cache->get('_avatar_local_list_' . $user->data['user_lang']);
if ($avatar_list === false)
{
@@ -198,7 +198,7 @@ class local extends \phpbb\avatar\driver\driver
if ($this->cache != null)
{
- $this->cache->put('_avatar_local_list', $avatar_list, 86400);
+ $this->cache->put('_avatar_local_list_' . $user->data['user_lang'], $avatar_list, 86400);
}
}
diff --git a/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php b/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php
index a52067f484..804adc4490 100644
--- a/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php
+++ b/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php
@@ -32,10 +32,7 @@ class add_help_phpbb extends \phpbb\db\migration\migration
return array(
array('config.add', array('help_send_statistics', true)),
array('config.add', array('help_send_statistics_time', 0)),
- array('if', array(
- array('module.exists', array('acp', false, 'ACP_SEND_STATISTICS')),
- array('module.remove', array('acp', false, 'ACP_SEND_STATISTICS')),
- )),
+ array('module.remove', array('acp', false, 'ACP_SEND_STATISTICS')),
array('module.add', array(
'acp',
'ACP_SERVER_CONFIGURATION',
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index a425df56e8..2b0c66fc58 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -760,7 +760,7 @@ class migrator
$condition = $parameters[0];
- if (!$condition)
+ if (!$condition || (is_array($condition) && !$this->run_step($condition, $last_result, $reverse)))
{
return false;
}
diff --git a/phpBB/phpbb/event/php_exporter.php b/phpBB/phpbb/event/php_exporter.php
index 64d1e429b7..71c94a681d 100644
--- a/phpBB/phpbb/event/php_exporter.php
+++ b/phpBB/phpbb/event/php_exporter.php
@@ -264,7 +264,30 @@ class php_exporter
// Find event description line
$description_line_num = $this->find_description();
- $description = substr(trim($this->file_lines[$description_line_num]), strlen('* '));
+ $description_lines = array();
+
+ while (true)
+ {
+ $description_line = substr(trim($this->file_lines[$description_line_num]), strlen('*'));
+ $description_line = trim(str_replace("\t", " ", $description_line));
+
+ // Reached end of description if line is a tag
+ if (strlen($description_line) && $description_line[0] == '@')
+ {
+ break;
+ }
+
+ $description_lines[] = $description_line;
+ $description_line_num++;
+ }
+
+ // If there is an empty line between description and first tag, remove it
+ if (!strlen(end($description_lines)))
+ {
+ array_pop($description_lines);
+ }
+
+ $description = trim(implode('<br/>', $description_lines));
if (isset($this->events[$this->current_event]))
{
diff --git a/phpBB/phpbb/filesystem/filesystem.php b/phpBB/phpbb/filesystem/filesystem.php
index 3f39448f05..bfafdf5ddd 100644
--- a/phpBB/phpbb/filesystem/filesystem.php
+++ b/phpBB/phpbb/filesystem/filesystem.php
@@ -367,7 +367,7 @@ class filesystem implements filesystem_interface
$common_php_group = @filegroup(__FILE__);
// And the owner and the groups PHP is running under.
- $php_uid = (function_exists('posic_getuid')) ? @posix_getuid() : false;
+ $php_uid = (function_exists('posix_getuid')) ? @posix_getuid() : false;
$php_gids = (function_exists('posix_getgroups')) ? @posix_getgroups() : false;
// If we are unable to get owner/group, then do not try to set them by guessing
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index de9345ca85..80934dc411 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -1614,13 +1614,15 @@ class session
return;
}
+ // Do not update the session page for ajax requests, so the view online still works as intended
+ $page_changed = $this->update_session_page && $this->data['session_page'] != $this->page['page'] && !$request->is_ajax();
+
// Only update session DB a minute or so after last update or if page changes
- if ($this->time_now - ((isset($this->data['session_time'])) ? $this->data['session_time'] : 0) > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page']))
+ if ($this->time_now - (isset($this->data['session_time']) ? $this->data['session_time'] : 0) > 60 || $page_changed)
{
$sql_ary = array('session_time' => $this->time_now);
- // Do not update the session page for ajax requests, so the view online still works as intended
- if ($this->update_session_page && !$request->is_ajax())
+ if ($page_changed)
{
$sql_ary['session_page'] = substr($this->page['page'], 0, 199);
$sql_ary['session_forum_id'] = $this->page['forum'];
diff --git a/phpBB/phpbb/template/twig/extension.php b/phpBB/phpbb/template/twig/extension.php
index 1aa7717470..f6f8e03ca2 100644
--- a/phpBB/phpbb/template/twig/extension.php
+++ b/phpBB/phpbb/template/twig/extension.php
@@ -172,7 +172,7 @@ class extension extends \Twig_Extension
$context_vars = $this->context->get_root_ref();
- if (isset($context_vars['L_' . $key]))
+ if (is_string($key) && isset($context_vars['L_' . $key]))
{
return $context_vars['L_' . $key];
}
diff --git a/phpBB/styles/prosilver/template/mcp_ban.html b/phpBB/styles/prosilver/template/mcp_ban.html
index 5b798d9b6c..f6e4620ad8 100644
--- a/phpBB/styles/prosilver/template/mcp_ban.html
+++ b/phpBB/styles/prosilver/template/mcp_ban.html
@@ -1,8 +1,6 @@
<!-- INCLUDE mcp_header.html -->
-<script type="text/javascript">
-// <![CDATA[
-
+<script>
var ban_length = new Array();
ban_length[-1] = '';
var ban_reason = new Array();
@@ -34,8 +32,6 @@
document.getElementById('unbangivereason').innerHTML = '';
}
}
-
-// ]]>
</script>
<form id="mcp_ban" method="post" action="{U_ACTION}">
diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html
index b8080a6be3..2d33849cf0 100644
--- a/phpBB/styles/prosilver/template/navbar_header.html
+++ b/phpBB/styles/prosilver/template/navbar_header.html
@@ -123,11 +123,13 @@
<i class="icon fa-sliders fa-fw" aria-hidden="true"></i><span>{L_PROFILE}</span>
</a>
</li>
- <li>
- <a href="{U_USER_PROFILE}" title="{L_READ_PROFILE}" role="menuitem">
- <i class="icon fa-user fa-fw" aria-hidden="true"></i><span>{L_READ_PROFILE}</span>
- </a>
- </li>
+ <!-- IF U_USER_PROFILE -->
+ <li>
+ <a href="{U_USER_PROFILE}" title="{L_READ_PROFILE}" role="menuitem">
+ <i class="icon fa-user fa-fw" aria-hidden="true"></i><span>{L_READ_PROFILE}</span>
+ </a>
+ </li>
+ <!-- ENDIF -->
<!-- EVENT navbar_header_profile_list_after -->
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index b01b0bb213..5bad7baeb1 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -8,11 +8,34 @@
<div class="copyright">
<!-- EVENT overall_footer_copyright_prepend -->
- {CREDIT_LINE}
- <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
+ <p class="footer-row">
+ <span class="footer-copyright">{{ CREDIT_LINE }}</span>
+ </p>
+ <!-- IF TRANSLATION_INFO -->
+ <p class="footer-row">
+ <span class="footer-copyright">{{ TRANSLATION_INFO }}</span>
+ </p>
+ <!-- ENDIF -->
<!-- EVENT overall_footer_copyright_append -->
- <!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF -->
- <!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->
+ <p class="footer-row">
+ <a class="footer-link" href="{{ U_PRIVACY }}" title="{{ lang('PRIVACY_LINK') }}" role="menuitem">
+ <span class="footer-link-text">Privacy</span>
+ </a>
+ |
+ <a class="footer-link" href="{{ U_TERMS_USE }}" title="{{ lang('TERMS_LINK') }}" role="menuitem">
+ <span class="footer-link-text">Terms</span>
+ </a>
+ </p>
+ <!-- IF DEBUG_OUTPUT -->
+ <p class="footer-row">
+ <span class="footer-info">{{ DEBUG_OUTPUT }}</span>
+ </p>
+ <!-- ENDIF -->
+ <!-- IF U_ACP -->
+ <p class="footer-row">
+ <a class="footer-link text-strong" href="{{ U_ACP }}">{{ lang('ACP') }}</a>
+ </p>
+ <!-- ENDIF -->
</div>
<div id="darkenwrapper" class="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}">
@@ -40,13 +63,13 @@
<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
</div>
-<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
-<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
-<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
+<script src="{T_JQUERY_LINK}"></script>
+<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
+<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS forum_fn.js -->
<!-- INCLUDEJS ajax.js -->
<!-- IF S_ALLOW_CDN -->
- <script type="text/javascript">
+ <script>
(function($){
var $fa_cdn = $('head').find('link[rel="stylesheet"]').first(),
$span = $('<span class="fa" style="display:none"></span>').appendTo('body');
@@ -78,7 +101,7 @@
"message": "{LA_COOKIE_CONSENT_MSG}",
"dismiss": "{LA_COOKIE_CONSENT_OK}",
"link": "{LA_COOKIE_CONSENT_INFO}",
- "href": "{LA_COOKIE_CONSENT_HREF}"
+ "href": "{UA_PRIVACY}"
}
});
});
diff --git a/phpBB/styles/prosilver/template/plupload.html b/phpBB/styles/prosilver/template/plupload.html
index fc663118c1..1eb84372e8 100644
--- a/phpBB/styles/prosilver/template/plupload.html
+++ b/phpBB/styles/prosilver/template/plupload.html
@@ -1,5 +1,4 @@
-<script type="text/javascript">
-//<![CDATA[
+<script>
phpbb.plupload = {
i18n: {
'b': '{LA_BYTES_SHORT}',
@@ -63,7 +62,6 @@ phpbb.plupload = {
maxFiles: {MAX_ATTACHMENTS},
data: {S_ATTACH_DATA},
}
-//]]>
</script>
<!-- INCLUDEJS {T_ASSETS_PATH}/plupload/plupload.full.min.js -->
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/plupload.js -->
diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html
index 14185ed66b..122afdf978 100644
--- a/phpBB/styles/prosilver/template/posting_buttons.html
+++ b/phpBB/styles/prosilver/template/posting_buttons.html
@@ -1,6 +1,5 @@
-<script type="text/javascript">
-// <![CDATA[
+<script>
var form_name = 'postform';
var text_name = <!-- IF $SIG_EDIT -->'signature'<!-- ELSE -->'message'<!-- ENDIF -->;
var load_draft = false;
@@ -46,8 +45,6 @@
document.getElementById('bbpalette').value = '{LA_FONT_COLOR}';
}
}
-
-// ]]>
</script>
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
diff --git a/phpBB/styles/prosilver/template/posting_smilies.html b/phpBB/styles/prosilver/template/posting_smilies.html
index 54e82a58bc..b5794d5aff 100644
--- a/phpBB/styles/prosilver/template/posting_smilies.html
+++ b/phpBB/styles/prosilver/template/posting_smilies.html
@@ -1,10 +1,8 @@
<!-- INCLUDE simple_header.html -->
-<script type="text/javascript">
-// <![CDATA[
+<script>
var form_name = opener.form_name;
var text_name = opener.text_name;
-// ]]>
</script>
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
diff --git a/phpBB/styles/prosilver/template/posting_topic_review.html b/phpBB/styles/prosilver/template/posting_topic_review.html
index 857c686774..55739070ae 100644
--- a/phpBB/styles/prosilver/template/posting_topic_review.html
+++ b/phpBB/styles/prosilver/template/posting_topic_review.html
@@ -5,10 +5,8 @@
</h3>
<div id="topicreview" class="topicreview">
-<script type="text/javascript">
-// <![CDATA[
+<script>
bbcodeEnabled = {S_BBCODE_ALLOWED};
-// ]]>
</script>
<!-- BEGIN topic_review_row -->
diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html
index 614c137835..907ddd97ba 100644
--- a/phpBB/styles/prosilver/template/simple_footer.html
+++ b/phpBB/styles/prosilver/template/simple_footer.html
@@ -24,9 +24,9 @@
</div>
</div>
-<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
-<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
-<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
+<script src="{T_JQUERY_LINK}"></script>
+<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
+<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS forum_fn.js -->
<!-- INCLUDEJS ajax.js -->
diff --git a/phpBB/styles/prosilver/template/ucp_agreement.html b/phpBB/styles/prosilver/template/ucp_agreement.html
index 943774c6ec..ace65254d7 100644
--- a/phpBB/styles/prosilver/template/ucp_agreement.html
+++ b/phpBB/styles/prosilver/template/ucp_agreement.html
@@ -3,8 +3,7 @@
<!-- IF S_SHOW_COPPA or S_REGISTRATION -->
<!-- IF S_LANG_OPTIONS -->
-<script type="text/javascript">
-// <![CDATA[
+<script>
/**
* Change language
*/
@@ -14,8 +13,6 @@
document.forms['register'].change_lang.value = lang_iso;
document.forms['register'].submit();
}
-
-// ]]>
</script>
<form method="post" action="{S_UCP_ACTION}" id="register">
diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html
index e97befc552..6362a0b824 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_history.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_history.html
@@ -6,10 +6,8 @@
<!-- EVENT ucp_pm_history_review_before -->
<div id="topicreview" class="topicreview">
- <script type="text/javascript">
- // <![CDATA[
+ <script>
bbcodeEnabled = {S_BBCODE_ALLOWED};
- // ]]>
</script>
<!-- BEGIN history_row -->
<div class="post <!-- IF history_row.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html
index 4cd9f6655b..1650705d4b 100644
--- a/phpBB/styles/prosilver/template/ucp_prefs_personal.html
+++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html
@@ -85,8 +85,7 @@
</fieldset>
</form>
-<script type="text/javascript">
-// <![CDATA[
+<script>
var date_format = '{A_DATE_FORMAT}';
var default_dateformat = '{A_DEFAULT_DATEFORMAT}';
@@ -118,7 +117,6 @@
}
window.onload = customDates;
-// ]]>
</script>
<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html
index 38413addba..bf39990c35 100644
--- a/phpBB/styles/prosilver/template/ucp_register.html
+++ b/phpBB/styles/prosilver/template/ucp_register.html
@@ -1,7 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<script type="text/javascript">
-// <![CDATA[
+<script>
/**
* Change language
*/
@@ -11,7 +10,6 @@
document.forms['register'].change_lang.value = lang_iso;
document.forms['register'].submit.click();
}
-// ]]>
</script>
<form id="register" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 348355e8c4..a0dc5e043b 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -981,8 +981,15 @@ fieldset.fields1 dl.pmlist dd.recipients {
/* Miscellaneous styles
---------------------------------------- */
.copyright {
- padding: 5px;
+ font-size: 10px;
text-align: center;
+ padding: 10px;
+}
+
+.footer-row {
+ font-size: 10px;
+ line-height: 1.8;
+ margin: 0;
}
.small {
@@ -1267,6 +1274,10 @@ ul.linklist:after,
width: 50px;
}
+.dropdown .clone.hidden {
+ display: none;
+}
+
.dropdown .clone.hidden + li.separator {
display: none;
}
diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css
index fcc11f1fc2..ca4054c27f 100644
--- a/phpBB/styles/prosilver/theme/responsive.css
+++ b/phpBB/styles/prosilver/theme/responsive.css
@@ -421,6 +421,7 @@
.column1, .column2, .left-box.profile-details {
float: none;
width: auto;
+ clear: both;
}
/* Polls
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 04a39e83d5..416ffe3d90 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -506,7 +506,7 @@ if ($forum_data['forum_type'] == FORUM_POST)
'WHERE' => '(t.forum_id = ' . $forum_id . '
AND t.topic_type = ' . POST_ANNOUNCE . ') OR
- (' . $db->sql_in_set('t.forum_id', $g_forum_ary) . '
+ (' . $db->sql_in_set('t.forum_id', $g_forum_ary, false, true) . '
AND t.topic_type = ' . POST_GLOBAL . ')',
'ORDER_BY' => 't.topic_time DESC',
diff --git a/tests/event/fixtures/extra_description.test b/tests/event/fixtures/extra_description.test
index ce8f97ce89..e93a1044ac 100644
--- a/tests/event/fixtures/extra_description.test
+++ b/tests/event/fixtures/extra_description.test
@@ -3,7 +3,7 @@
/**
* Description
*
-* NOTE: This will not be exported
+* NOTE: This will also be exported
*
* @event extra_description.dispatch
* @since 3.1.0-b2
diff --git a/tests/event/php_exporter_test.php b/tests/event/php_exporter_test.php
index 21dbb1e1d4..c6670e1340 100644
--- a/tests/event/php_exporter_test.php
+++ b/tests/event/php_exporter_test.php
@@ -57,7 +57,7 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
'file' => 'extra_description.test',
'arguments' => array(),
'since' => '3.1.0-b2',
- 'description' => 'Description',
+ 'description' => 'Description<br/><br/>NOTE: This will also be exported',
),
),
),
diff --git a/tests/migrator/get_callable_from_step_test.php b/tests/migrator/get_callable_from_step_test.php
new file mode 100644
index 0000000000..af636f5d21
--- /dev/null
+++ b/tests/migrator/get_callable_from_step_test.php
@@ -0,0 +1,136 @@
+<?php
+/**
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+class get_callable_from_step_test extends phpbb_database_test_case
+{
+ public function setUp()
+ {
+ global $phpbb_root_path, $php_ext, $table_prefix, $phpbb_log;
+
+ parent::setUp();
+
+ $phpbb_log = $this->getMockBuilder('\phpbb\log\log')->disableOriginalConstructor()->getMock();
+ $db = $this->new_dbal();
+ $factory = new \phpbb\db\tools\factory();
+ $cache_service = $this->getMockBuilder('\phpbb\cache\service')->disableOriginalConstructor()->getMock();
+ $user = $this->getMockBuilder('\phpbb\user')->disableOriginalConstructor()->getMock();
+ $module_manager = new \phpbb\module\module_manager(
+ $this->getMockBuilder('\phpbb\cache\driver\dummy')->disableOriginalConstructor()->getMock(),
+ $db,
+ new phpbb_mock_extension_manager($phpbb_root_path),
+ 'phpbb_modules',
+ $phpbb_root_path,
+ $php_ext
+ );
+ $module_tools = new \phpbb\db\migration\tool\module($db, $cache_service, $user, $module_manager, $phpbb_root_path, $php_ext, 'phpbb_modules');
+ $this->migrator = new \phpbb\db\migrator(
+ new phpbb_mock_container_builder(),
+ new \phpbb\config\config(array()),
+ $db,
+ $factory->get($db),
+ 'phpbb_migrations',
+ $phpbb_root_path,
+ $php_ext,
+ $table_prefix,
+ array($module_tools),
+ new \phpbb\db\migration\helper()
+ );
+
+ if (!$module_tools->exists('acp', 0, 'new_module_langname'))
+ {
+ $module_tools->add('acp', 0, array(
+ 'module_basename' => 'new_module_basename',
+ 'module_langname' => 'new_module_langname',
+ 'module_mode' => 'settings',
+ 'module_auth' => '',
+ 'module_display' => true,
+ 'before' => false,
+ 'after' => false,
+ ));
+ $this->module_added = true;
+ }
+ }
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/../dbal/fixtures/migrator.xml');
+ }
+
+ public function get_callable_from_step_provider()
+ {
+ return array(
+ array(
+ array('if', array(
+ false,
+ array('permission.add', array('some_data')),
+ )),
+ true, // expects false
+ ),
+ array(
+ array('if', array(
+ array('module.exists', array(
+ 'mcp',
+ 'RANDOM_PARENT',
+ 'RANDOM_MODULE'
+ )),
+ array('permission.add', array('some_data')),
+ )),
+ true, // expects false
+ ),
+ array(
+ array('if', array(
+ array('module.exists', array(
+ 'acp',
+ 0,
+ 'new_module_langname'
+ )),
+ array('module.add', array(
+ 'acp',
+ 0,
+ 'module_basename' => 'new_module_basename2',
+ 'module_langname' => 'new_module_langname2',
+ 'module_mode' => 'settings',
+ 'module_auth' => '',
+ 'module_display' => true,
+ 'before' => false,
+ 'after' => false,
+ )),
+ )),
+ false, // expects false
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider get_callable_from_step_provider
+ */
+ public function test_get_callable_from_step($step, $expects_false)
+ {
+ if ($expects_false)
+ {
+ $this->assertFalse($this->call_get_callable_from_step($step));
+ }
+ else
+ {
+ $this->assertNotFalse($this->call_get_callable_from_step($step));
+ }
+ }
+
+ protected function call_get_callable_from_step($step)
+ {
+ $class = new ReflectionClass($this->migrator);
+ $method = $class->getMethod('get_callable_from_step');
+ $method->setAccessible(true);
+ return $method->invokeArgs($this->migrator, array($step));
+ }
+}