aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/acp_attachments.html2
-rw-r--r--phpBB/adm/style/acp_ban.html2
-rw-r--r--phpBB/adm/style/acp_contact.html2
-rw-r--r--phpBB/adm/style/acp_database.html2
-rw-r--r--phpBB/adm/style/acp_forums.html8
-rw-r--r--phpBB/adm/style/acp_icons.html2
-rw-r--r--phpBB/adm/style/acp_modules.html2
-rw-r--r--phpBB/adm/style/acp_permission_roles.html4
-rw-r--r--phpBB/adm/style/acp_posting_buttons.html2
-rw-r--r--phpBB/adm/style/acp_ranks.html2
-rw-r--r--phpBB/adm/style/acp_search.html2
-rw-r--r--phpBB/adm/style/acp_users_overview.html2
-rw-r--r--phpBB/adm/style/acp_users_prefs.html2
-rw-r--r--phpBB/adm/style/acp_users_signature.html2
-rw-r--r--phpBB/adm/style/installer_footer.html8
-rw-r--r--phpBB/adm/style/overall_footer.html6
-rw-r--r--phpBB/adm/style/overall_header.html2
-rw-r--r--phpBB/adm/style/permission_mask.html4
-rw-r--r--phpBB/adm/style/progress_bar.html4
-rw-r--r--phpBB/adm/style/simple_footer.html6
-rw-r--r--phpBB/adm/style/simple_header.html2
-rw-r--r--phpBB/docs/events.md7
-rw-r--r--phpBB/includes/functions_display.php4
-rw-r--r--phpBB/includes/functions_posting.php16
-rw-r--r--phpBB/language/en/common.php2
-rw-r--r--phpBB/phpbb/plupload/plupload.php37
-rw-r--r--phpBB/phpbb/session.php28
-rw-r--r--phpBB/phpbb/user.php36
-rw-r--r--phpBB/styles/prosilver/template/navbar_header.html6
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_profile_info.html2
-rw-r--r--phpBB/viewforum.php2
-rw-r--r--tests/plupload/plupload_test.php73
-rw-r--r--tests/test_framework/phpbb_ui_test_case.php21
34 files changed, 247 insertions, 57 deletions
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html
index 6129d6a1a5..7a66f170ac 100644
--- a/phpBB/adm/style/acp_attachments.html
+++ b/phpBB/adm/style/acp_attachments.html
@@ -110,7 +110,7 @@
<!-- ELSEIF S_EXTENSION_GROUPS -->
<!-- IF S_EDIT_GROUP -->
- <script type="text/javascript" defer="defer">
+ <script>
// <![CDATA[
function update_image(newimage)
{
diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html
index f2249941a5..d0eab75ad8 100644
--- a/phpBB/adm/style/acp_ban.html
+++ b/phpBB/adm/style/acp_ban.html
@@ -8,7 +8,7 @@
<p>{L_EXPLAIN}</p>
-<script type="text/javascript">
+<script>
// <![CDATA[
var ban_length = new Array();
diff --git a/phpBB/adm/style/acp_contact.html b/phpBB/adm/style/acp_contact.html
index 828fd4b659..d63fd08a3a 100644
--- a/phpBB/adm/style/acp_contact.html
+++ b/phpBB/adm/style/acp_contact.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<script type="text/javascript">
+<script>
// <![CDATA[
var form_name = 'acp_contact';
diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html
index cc0b57b411..d3433a8aa6 100644
--- a/phpBB/adm/style/acp_database.html
+++ b/phpBB/adm/style/acp_database.html
@@ -35,7 +35,7 @@
<p>{L_ACP_BACKUP_EXPLAIN}</p>
- <script type="text/javascript">
+ <script>
// <![CDATA[
function selector(bool)
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index 965438ff67..20bcd2e9f9 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -4,7 +4,7 @@
<!-- IF S_EDIT_FORUM -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
/**
* Handle displaying/hiding several options based on the forum type
@@ -405,7 +405,7 @@
<!-- ELSEIF S_CONTINUE_SYNC -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
var close_waitscreen = 0;
// no scrollbars...
@@ -421,7 +421,7 @@
<!-- ELSE -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
/**
* Popup search progress bar
@@ -447,7 +447,7 @@
<!-- ENDIF -->
<!-- IF S_RESYNCED -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
var close_waitscreen = 1;
// ]]>
diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html
index 5493cbde0a..45fe7f8ebc 100644
--- a/phpBB/adm/style/acp_icons.html
+++ b/phpBB/adm/style/acp_icons.html
@@ -4,7 +4,7 @@
<!-- IF S_EDIT -->
- <script type="text/javascript" defer="defer">
+ <script>
// <![CDATA[
<!-- IF S_ADD_CODE -->
diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html
index 3c97706e6a..f4040daaed 100644
--- a/phpBB/adm/style/acp_modules.html
+++ b/phpBB/adm/style/acp_modules.html
@@ -4,7 +4,7 @@
<!-- IF S_EDIT_MODULE -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
function display_options(value)
{
diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html
index b3137f134c..670d5e14c0 100644
--- a/phpBB/adm/style/acp_permission_roles.html
+++ b/phpBB/adm/style/acp_permission_roles.html
@@ -4,7 +4,7 @@
<!-- IF S_EDIT -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
var active_pmask = '0';
var active_fmask = '0';
@@ -20,7 +20,7 @@
// ]]>
</script>
- <script type="text/javascript" src="style/permissions.js"></script>
+ <script src="style/permissions.js"></script>
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
diff --git a/phpBB/adm/style/acp_posting_buttons.html b/phpBB/adm/style/acp_posting_buttons.html
index 36fc285537..614d6fae40 100644
--- a/phpBB/adm/style/acp_posting_buttons.html
+++ b/phpBB/adm/style/acp_posting_buttons.html
@@ -1,4 +1,4 @@
-<script type="text/javascript">
+<script>
// <![CDATA[
// Define the bbCode tags
diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html
index e67c9acd80..d373657114 100644
--- a/phpBB/adm/style/acp_ranks.html
+++ b/phpBB/adm/style/acp_ranks.html
@@ -6,7 +6,7 @@
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
- <script type="text/javascript">
+ <script>
// <![CDATA[
function update_image(newimage)
{
diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html
index f7ad3c5e89..99620058dc 100644
--- a/phpBB/adm/style/acp_search.html
+++ b/phpBB/adm/style/acp_search.html
@@ -69,7 +69,7 @@
<!-- ELSEIF S_INDEX -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
/**
* Popup search progress bar
diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html
index 506101c3f7..2af669a41f 100644
--- a/phpBB/adm/style/acp_users_overview.html
+++ b/phpBB/adm/style/acp_users_overview.html
@@ -79,7 +79,7 @@
<!-- IF not S_USER_FOUNDER or S_FOUNDER -->
- <script type="text/javascript">
+ <script>
// <![CDATA[
function display_reason(option)
diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html
index 484c5b3976..358f3d5248 100644
--- a/phpBB/adm/style/acp_users_prefs.html
+++ b/phpBB/adm/style/acp_users_prefs.html
@@ -1,4 +1,4 @@
-<script type="text/javascript">
+<script>
// <![CDATA[
var default_dateformat = '{A_DEFAULT_DATEFORMAT}';
// ]]>
diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html
index c7ec5cc0eb..180c24c96d 100644
--- a/phpBB/adm/style/acp_users_signature.html
+++ b/phpBB/adm/style/acp_users_signature.html
@@ -1,4 +1,4 @@
-<script type="text/javascript">
+<script>
// <![CDATA[
var form_name = 'user_signature';
diff --git a/phpBB/adm/style/installer_footer.html b/phpBB/adm/style/installer_footer.html
index 54e6951a12..8b3b04d8a5 100644
--- a/phpBB/adm/style/installer_footer.html
+++ b/phpBB/adm/style/installer_footer.html
@@ -13,7 +13,7 @@
</div>
</div>
-<script type="text/javascript">
+<script>
<!--
installLang = {
title: '{LA_TIMEOUT_DETECTED_TITLE}',
@@ -22,9 +22,9 @@ installLang = {
//-->
</script>
-<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">\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">\x3C/script>');</script><!-- ENDIF -->
+<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS admin.js -->
{$SCRIPTS}
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html
index 8745286d64..3ab633e04b 100644
--- a/phpBB/adm/style/overall_footer.html
+++ b/phpBB/adm/style/overall_footer.html
@@ -33,9 +33,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 ajax.js -->
<!-- INCLUDEJS admin.js -->
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index 8279ac34dc..fa361d6016 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -10,7 +10,7 @@
<link href="{T_FONT_AWESOME_LINK}" rel="stylesheet">
<link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" />
-<script type="text/javascript">
+<script>
// <![CDATA[
var jump_page = '{LA_JUMP_PAGE}{L_COLON}';
var on_page = '{CURRENT_PAGE}';
diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html
index 23294d60df..26aa5e098f 100644
--- a/phpBB/adm/style/permission_mask.html
+++ b/phpBB/adm/style/permission_mask.html
@@ -1,5 +1,5 @@
-<script type="text/javascript">
+<script>
// <![CDATA[
var active_pmask = '0';
var active_fmask = '0';
@@ -16,7 +16,7 @@
<!-- ENDIF -->
// ]]>
</script>
-<script type="text/javascript" src="style/permissions.js"></script>
+<script src="style/permissions.js"></script>
<!-- BEGIN p_mask -->
<div class="clearfix"></div>
diff --git a/phpBB/adm/style/progress_bar.html b/phpBB/adm/style/progress_bar.html
index 1822675c15..1e58257ff0 100644
--- a/phpBB/adm/style/progress_bar.html
+++ b/phpBB/adm/style/progress_bar.html
@@ -1,6 +1,6 @@
<!-- INCLUDE simple_header.html -->
-<script type="text/javascript">
+<script>
// <![CDATA[
/**
* Close previously opened popup
@@ -31,7 +31,7 @@
<p>{L_PROGRESS_EXPLAIN}</p>
</div>
-<script type="text/javascript">
+<script>
// <![CDATA[
close_popup();
// ]]>
diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html
index 08ee0a739f..4b54b83373 100644
--- a/phpBB/adm/style/simple_footer.html
+++ b/phpBB/adm/style/simple_footer.html
@@ -16,9 +16,9 @@
</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>
<!-- EVENT acp_simple_footer_after -->
{$SCRIPTS}
diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html
index 439645a211..a8a32bf768 100644
--- a/phpBB/adm/style/simple_header.html
+++ b/phpBB/adm/style/simple_header.html
@@ -9,7 +9,7 @@
<link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" />
-<script type="text/javascript">
+<script>
// <![CDATA[
var jump_page = '{LA_JUMP_PAGE}{L_COLON}';
var on_page = '{CURRENT_PAGE}';
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index 4be1725090..bfe26b4951 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -2646,6 +2646,13 @@ ucp_profile_profile_info_before
* Since: 3.1.4-RC1
* Purpose: Add options in profile page fieldset - before jabber field.
+ucp_profile_profile_info_birthday_label_append
+===
+* Locations:
+ + styles/prosilver/template/ucp_profile_profile_info.html
+* Since: 3.2.9-RC1
+* Purpose: Add more text to birthday label, such as required asterisk
+
ucp_profile_register_details_after
===
* Locations:
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index ea42b1916d..3d45648ea1 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -70,7 +70,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$data = array(
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
- 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time()) : '',
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time(), false) : '',
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']
);
@@ -355,7 +355,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$data = array(
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
- 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums&mark_time=' . time()) : '',
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums&mark_time=' . time(), false) : '',
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']
);
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 2cce77e092..ed4b573cc2 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -114,6 +114,22 @@ function generate_smilies($mode, $forum_id)
}
$db->sql_freeresult($result);
+ /**
+ * Modify smilies before they are assigned to the template
+ *
+ * @event core.generate_smilies_modify_rowset
+ * @var string mode Smiley mode, either window or inline
+ * @var int forum_id Forum where smilies are generated
+ * @var array smilies Smiley rows fetched from the database
+ * @since 3.2.9-RC1
+ */
+ $vars = [
+ 'mode',
+ 'forum_id',
+ 'smilies',
+ ];
+ extract($phpbb_dispatcher->trigger_event('core.generate_smilies_modify_rowset', compact($vars)));
+
if (count($smilies))
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 68fe6523a2..3ba63746c8 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -519,7 +519,7 @@ $lang = array_merge($lang, array(
'NO_POSTS_TIME_FRAME' => 'No posts exist inside this topic for the selected time frame.',
'NO_FEED_ENABLED' => 'Feeds are not available on this board.',
'NO_FEED' => 'The requested feed is not available.',
- 'NO_STYLE_DATA' => 'Could not get style data',
+ 'NO_STYLE_DATA' => 'Could not get style data for user_style %s and set for user_id %s',
'NO_STYLE_CFG' => 'Could not get the style configuration file for: %s',
'NO_SUBJECT' => 'No subject specified', // Used for posts having no subject defined but displayed within management pages.
'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn’t exist.',
diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php
index 9ad12b1082..5a5b8a1874 100644
--- a/phpBB/phpbb/plupload/plupload.php
+++ b/phpBB/phpbb/plupload/plupload.php
@@ -274,22 +274,37 @@ class plupload
}
/**
- * Checks various php.ini values and the maximum file size to determine
- * the maximum size chunks a file can be split up into for upload
- *
- * @return int
- */
+ * Checks various php.ini values to determine the maximum chunk
+ * size a file should be split into for upload.
+ *
+ * The intention is to calculate a value which reflects whatever
+ * the most restrictive limit is set to. And to then set the chunk
+ * size to half that value, to ensure any required transfer overhead
+ * and POST data remains well within the limit. Or, if all of the
+ * limits are set to unlimited, the chunk size will also be unlimited.
+ *
+ * @return int
+ *
+ * @access public
+ */
public function get_chunk_size()
{
- $max = min(
+ $max = 0;
+
+ $limits = [
+ $this->php_ini->getBytes('memory_limit'),
$this->php_ini->getBytes('upload_max_filesize'),
$this->php_ini->getBytes('post_max_size'),
- max(1, $this->php_ini->getBytes('memory_limit')),
- $this->config['max_filesize']
- );
+ ];
+
+ foreach ($limits as $limit_type)
+ {
+ if ($limit_type > 0)
+ {
+ $max = ($max !== 0) ? min($limit_type, $max) : $limit_type;
+ }
+ }
- // Use half of the maximum possible to leave plenty of room for other
- // POST data.
return floor($max / 2);
}
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index 31f32af7c4..cc5a1b8f8f 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -1077,7 +1077,7 @@ class session
*/
function set_cookie($name, $cookiedata, $cookietime, $httponly = true)
{
- global $config;
+ global $config, $phpbb_dispatcher;
// If headers are already set, we just return
if (headers_sent())
@@ -1085,6 +1085,32 @@ class session
return;
}
+ $disable_cookie = false;
+ /**
+ * Event to modify or disable setting cookies
+ *
+ * @event core.set_cookie
+ * @var bool disable_cookie Set to true to disable setting this cookie
+ * @var string name Name of the cookie
+ * @var string cookiedata The data to hold within the cookie
+ * @var int cookietime The expiration time as UNIX timestamp
+ * @var bool httponly Use HttpOnly?
+ * @since 3.2.9-RC1
+ */
+ $vars = array(
+ 'disable_cookie',
+ 'name',
+ 'cookiedata',
+ 'cookietime',
+ 'httponly',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.set_cookie', compact($vars)));
+
+ if ($disable_cookie)
+ {
+ return;
+ }
+
$name_data = rawurlencode($config['cookie_name'] . '_' . $name) . '=' . rawurlencode($cookiedata);
$expire = gmdate('D, d-M-Y H:i:s \\G\\M\\T', $cookietime);
$domain = (!$config['cookie_domain'] || $config['cookie_domain'] == '127.0.0.1' || strpos($config['cookie_domain'], '.') === false) ? '' : '; domain=' . $config['cookie_domain'];
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index 7363290e11..9817e40edb 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -281,9 +281,43 @@ class user extends \phpbb\session
$db->sql_freeresult($result);
}
+ // Fallback to board's default style
if (!$this->style)
{
- trigger_error('NO_STYLE_DATA', E_USER_ERROR);
+ // Verify default style exists in the database
+ $sql = 'SELECT style_id
+ FROM ' . STYLES_TABLE . '
+ WHERE style_id = ' . (int) $config['default_style'];
+ $result = $db->sql_query($sql);
+ $style_id = (int) $db->sql_fetchfield('style_id');
+ $db->sql_freeresult($result);
+
+ if ($style_id > 0)
+ {
+ $db->sql_transaction('begin');
+
+ // Update $user row
+ $sql = 'SELECT *
+ FROM ' . STYLES_TABLE . '
+ WHERE style_id = ' . (int) $config['default_style'];
+ $result = $db->sql_query($sql);
+ $this->style = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Update user style preference
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_style = ' . (int) $style_id . '
+ WHERE user_id = ' . (int) $this->data['user_id'];
+ $db->sql_query($sql);
+
+ $db->sql_transaction('commit');
+ }
+ }
+
+ // This should never happen
+ if (!$this->style)
+ {
+ trigger_error($this->language->lang('NO_STYLE_DATA', $this->data['user_style'], $this->data['user_id']), E_USER_ERROR);
}
// Now parse the cfg file and cache it
diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html
index d34123adfc..77f5dae0c0 100644
--- a/phpBB/styles/prosilver/template/navbar_header.html
+++ b/phpBB/styles/prosilver/template/navbar_header.html
@@ -183,14 +183,14 @@
<!-- EVENT overall_header_breadcrumbs_before -->
<li class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
<!-- IF U_SITE_HOME -->
- <span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" itemtype="https://schema.org/Thing" itemprop="item" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="name">{L_SITE_HOME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
+ <span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" itemtype="https://schema.org/Thing" itemscope itemprop="item" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="name">{L_SITE_HOME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
<!-- ENDIF -->
<!-- EVENT overall_header_breadcrumb_prepend -->
- <span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemtype="https://schema.org/Thing" itemprop="item" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="name">{L_INDEX}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
+ <span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemtype="https://schema.org/Thing" itemscope itemprop="item" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="name">{L_INDEX}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
<!-- BEGIN navlinks -->
<!-- EVENT overall_header_navlink_prepend -->
- <span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{navlinks.U_VIEW_FORUM}" itemtype="https://schema.org/Thing" itemprop="item"><span itemprop="name">{navlinks.FORUM_NAME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
+ <span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{navlinks.U_VIEW_FORUM}" itemtype="https://schema.org/Thing" itemscope itemprop="item"><span itemprop="name">{navlinks.FORUM_NAME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
<!-- EVENT overall_header_navlink_append -->
<!-- END navlinks -->
<!-- EVENT overall_header_breadcrumb_append -->
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index bdff1a0c05..cd245decc4 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -17,7 +17,7 @@
</p>
<!-- ENDIF -->
<!-- EVENT overall_footer_copyright_append -->
- <p class="footer-row">
+ <p class="footer-row" role="menu">
<a class="footer-link" href="{{ U_PRIVACY }}" title="{{ lang('PRIVACY_LINK') }}" role="menuitem">
<span class="footer-link-text">{{ lang('PRIVACY_LINK') }}</span>
</a>
diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
index 69eda8c42c..ac0cd153c2 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
@@ -13,7 +13,7 @@
<!-- EVENT ucp_profile_profile_info_before -->
<!-- IF S_BIRTHDAYS_ENABLED -->
<dl>
- <dt><label for="bday_day">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
+ <dt><label for="bday_day">{L_BIRTHDAY}{L_COLON}{% EVENT ucp_profile_profile_info_birthday_label_append %}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
<dd>
<label for="bday_day">{L_DAY}{L_COLON} <select name="bday_day" id="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select></label>
<label for="bday_month">{L_MONTH}{L_COLON} <select name="bday_month" id="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select></label>
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 0a5484cdf2..4691512cbd 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -222,7 +222,7 @@ if ($mark_read == 'topics')
$data = array(
'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
- 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics&mark_time=" . time()) : '',
+ 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics&mark_time=" . time(), false) : '',
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
'MESSAGE_TEXT' => $user->lang['TOPICS_MARKED']
);
diff --git a/tests/plupload/plupload_test.php b/tests/plupload/plupload_test.php
index 46bebb8d35..eb4657afbc 100644
--- a/tests/plupload/plupload_test.php
+++ b/tests/plupload/plupload_test.php
@@ -54,4 +54,77 @@ class phpbb_plupload_test extends phpbb_test_case
$this->assertEquals($expected, $plupload->generate_resize_string());
}
+
+ public function data_get_chunk_size()
+ {
+ return [
+ [[
+ 'memory_limit' => -1,
+ 'upload_max_filesize' => 0,
+ 'post_max_size' => 0,
+ ], 0],
+ [[
+ 'memory_limit' => -1,
+ 'upload_max_filesize' => 500,
+ 'post_max_size' => 400,
+ ], 200],
+ [[
+ 'memory_limit' => 100,
+ 'upload_max_filesize' => 0,
+ 'post_max_size' => 300,
+ ], 50],
+ [[
+ 'memory_limit' => 300,
+ 'upload_max_filesize' => 200,
+ 'post_max_size' => 0,
+ ], 100],
+ [[
+ 'memory_limit' => 3000,
+ 'upload_max_filesize' => 800,
+ 'post_max_size' => 900,
+ ], 400],
+ [[
+ 'memory_limit' => 2000,
+ 'upload_max_filesize' => 1000,
+ 'post_max_size' => 600,
+ ], 300],
+ [[
+ 'memory_limit' => 1000,
+ 'upload_max_filesize' => 2000,
+ 'post_max_size' => 3000,
+ ], 500],
+ ];
+ }
+
+ /**
+ * @dataProvider data_get_chunk_size
+ */
+ public function test_get_chunk_size($limits_ary, $expected)
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $lang = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
+ $config = new \phpbb\config\config([]);
+
+ $ini_wrapper = $this->getMockBuilder('\bantu\IniGetWrapper\IniGetWrapper')
+ ->setMethods(['getBytes'])
+ ->getMock();
+ $ini_wrapper->method('getBytes')
+ ->will($this->returnValueMap([
+ ['memory_limit', $limits_ary['memory_limit']],
+ ['upload_max_filesize', $limits_ary['upload_max_filesize']],
+ ['post_max_size', $limits_ary['post_max_size']]
+ ]));
+
+ $plupload = new \phpbb\plupload\plupload(
+ '',
+ $config,
+ new phpbb_mock_request,
+ new \phpbb\user($lang, '\phpbb\datetime'),
+ $ini_wrapper,
+ new \phpbb\mimetype\guesser(array(new \phpbb\mimetype\extension_guesser))
+ );
+
+ $this->assertEquals($expected, $plupload->get_chunk_size());
+ }
}
diff --git a/tests/test_framework/phpbb_ui_test_case.php b/tests/test_framework/phpbb_ui_test_case.php
index 4d88d7d9cb..48e510abe3 100644
--- a/tests/test_framework/phpbb_ui_test_case.php
+++ b/tests/test_framework/phpbb_ui_test_case.php
@@ -158,7 +158,26 @@ class phpbb_ui_test_case extends phpbb_test_case
public function visit($path)
{
- $this->getDriver()->get(self::$root_url . $path);
+ // Retry three times on curl issues, e.g. timeout
+ $attempts = 0;
+ $retries = 3;
+
+ while (true)
+ {
+ $attempts++;
+ try
+ {
+ $this->getDriver()->get(self::$root_url . $path);
+ break;
+ }
+ catch (Facebook\WebDriver\Exception\WebDriverCurlException $exception)
+ {
+ if ($attempts >= $retries)
+ {
+ throw $exception;
+ }
+ }
+ }
}
static protected function recreate_database($config)