diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/acp/acp_bbcodes.php | 6 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_main.php | 4 | ||||
-rw-r--r-- | phpBB/includes/functions_display.php | 3 | ||||
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 5 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm.php | 10 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 12 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewfolder.php | 4 | ||||
-rw-r--r-- | phpBB/language/en/common.php | 4 | ||||
-rw-r--r-- | phpBB/language/en/viewtopic.php | 3 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/driver.php | 6 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/lexer.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/ucp/controller/reset_password.php | 6 | ||||
-rw-r--r-- | phpBB/posting.php | 6 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/mcp_front.html | 2 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/navbar_footer.html | 8 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/navbar_header.html | 47 |
16 files changed, 80 insertions, 48 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index 5e39055f50..28bb18037f 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -240,6 +240,12 @@ class acp_bbcodes trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING); } + /** + * Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR. + * Using their Numeric Character Reference's Hexadecimal notation. + */ + $bbcode_helpline = utf8_encode_ucr($bbcode_helpline); + $sql_ary = array_merge($sql_ary, array( 'bbcode_tag' => $data['bbcode_tag'], 'bbcode_match' => $bbcode_match, diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index 90f5cae383..d2b44d553f 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -430,11 +430,11 @@ class acp_main // Version check $user->add_lang('install'); - if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '5.4.0', '<')) + if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '7.1.3', '<')) { $template->assign_vars(array( 'S_PHP_VERSION_OLD' => true, - 'L_PHP_VERSION_OLD' => sprintf($user->lang['PHP_VERSION_OLD'], PHP_VERSION, '5.4.0', '<a href="https://www.phpbb.com/support/docs/en/3.2/ug/quickstart/requirements">', '</a>'), + 'L_PHP_VERSION_OLD' => sprintf($user->lang['PHP_VERSION_OLD'], PHP_VERSION, '7.1.3', '<a href="https://www.phpbb.com/support/docs/en/3.3/ug/quickstart/requirements">', '</a>'), )); } diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 44478dbe49..f3f57b22f8 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1116,6 +1116,9 @@ function display_custom_bbcodes() $row['bbcode_helpline'] = $user->lang[strtoupper($row['bbcode_helpline'])]; } + // Convert Numeric Character References to UTF-8 chars. + $row['bbcode_helpline'] = utf8_decode_ncr($row['bbcode_helpline']); + $custom_tags = array( 'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'", 'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2), diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index f07512d623..436b437cfa 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -958,6 +958,11 @@ function handle_mark_actions($user_id, $mark_action) { case 'mark_important': + if (!check_form_key('ucp_pm_view')) + { + trigger_error('FORM_INVALID'); + } + $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . " SET pm_marked = 1 - pm_marked WHERE folder_id = $cur_folder_id diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index 6fcc0146df..d8633975a9 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -209,14 +209,14 @@ class ucp_pm $submit_mark = false; } - if (($move_pm || $submit_mark) && !check_form_key('ucp_pm_view')) - { - trigger_error('FORM_INVALID'); - } - // Move PM if ($move_pm) { + if (!check_form_key('ucp_pm_view')) + { + trigger_error('FORM_INVALID'); + } + $move_msg_ids = (isset($_POST['marked_msg_id'])) ? $request->variable('marked_msg_id', array(0)) : array(); $cur_folder_id = $request->variable('cur_folder_id', PRIVMSGS_NO_BOX); diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 87a8c91fd2..2e1ad3fdcf 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -665,6 +665,12 @@ function compose_pm($id, $mode, $action, $user_folders = array()) $subject = (!$subject && $action != 'post') ? $user->lang['NEW_MESSAGE'] : $subject; $message = $request->variable('message', '', true); + /** + * Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR. + * Using their Numeric Character Reference's Hexadecimal notation. + */ + $subject = utf8_encode_ucr($subject); + if ($subject && $message) { if (confirm_box(true)) @@ -870,6 +876,12 @@ function compose_pm($id, $mode, $action, $user_folders = array()) 'address_list' => $address_list ); + /** + * Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR. + * Using their Numeric Character Reference's Hexadecimal notation. + */ + $subject = utf8_encode_ucr($subject); + // ((!$message_subject) ? $subject : $message_subject) $msg_id = submit_pm($action, $subject, $pm_data); diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index ce40a2507d..4b6377e0b7 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -32,7 +32,7 @@ function view_folder($id, $mode, $folder_id, $folder) $folder_info = get_pm_from($folder_id, $folder, $user->data['user_id']); - add_form_key('ucp_pm_view_folder'); + add_form_key('ucp_pm_view'); if (!$submit_export) { @@ -199,7 +199,7 @@ function view_folder($id, $mode, $folder_id, $folder) $enclosure = $request->variable('enclosure', ''); $delimiter = $request->variable('delimiter', ''); - if (!check_form_key('ucp_pm_view_folder')) + if (!check_form_key('ucp_pm_view')) { trigger_error('FORM_INVALID'); } diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 31914cf625..0d83e6787e 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -168,6 +168,7 @@ $lang = array_merge($lang, array( ), 'COLLAPSE_VIEW' => 'Collapse view', 'CLOSE_WINDOW' => 'Close window', + 'CODE' => 'Code', 'COLOUR_SWATCH' => 'Colour swatch', 'COLON' => ':', 'COMMA_SEPARATOR' => ', ', // Comma used to join lists into a single string, use localised comma if appropriate, eg: Ideographic or Arabic @@ -618,6 +619,9 @@ $lang = array_merge($lang, array( 'POST_UNAPPROVED' => 'This post has not been approved.', 'POST_UNAPPROVED_EXPLAIN' => 'This post is not visible to other users until it has been approved by a moderator.', 'POWERED_BY' => 'Powered by %s', + + 'QUOTE' => 'Quote', + 'PREVIEW' => 'Preview', 'PREVIOUS' => 'Previous', // Used in pagination 'PREVIOUS_STEP' => 'Previous', diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php index 5d127acb3d..e5c9be0517 100644 --- a/phpBB/language/en/viewtopic.php +++ b/phpBB/language/en/viewtopic.php @@ -49,8 +49,6 @@ $lang = array_merge($lang, array( 'BUMPED_BY' => 'Last bumped by %1$s on %2$s.', 'BUMP_TOPIC' => 'Bump topic', - 'CODE' => 'Code', - 'DELETE_TOPIC' => 'Delete topic', 'DELETED_INFORMATION' => 'Deleted by %1$s on %2$s', 'DISAPPROVE' => 'Disapprove', @@ -98,7 +96,6 @@ $lang = array_merge($lang, array( 'QUICK_MOD' => 'Quick-mod tools', 'QUICKREPLY' => 'Quick Reply', - 'QUOTE' => 'Quote', 'REPLY_TO_TOPIC' => 'Reply to topic', 'RESTORE' => 'Restore', diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php index 93f0a749e5..2a4150b558 100644 --- a/phpBB/phpbb/db/driver/driver.php +++ b/phpBB/phpbb/db/driver/driver.php @@ -1037,12 +1037,6 @@ abstract class driver implements driver_interface function sql_report($mode, $query = '') { global $cache, $starttime, $phpbb_root_path, $phpbb_path_helper; - global $request; - - if (is_object($request) && !$request->variable('explain', false)) - { - return false; - } if (!$query && $this->query_hold != '') { diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index 6615a46067..10346ac299 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -72,6 +72,8 @@ class lexer extends \Twig_Lexer 'endspaceless', 'verbatim', 'endverbatim', + 'apply', + 'endapply', ); // Fix tokens that may have inline variables (e.g. <!-- DEFINE $TEST = '{FOO}') diff --git a/phpBB/phpbb/ucp/controller/reset_password.php b/phpBB/phpbb/ucp/controller/reset_password.php index 5c27c4f414..d20fafb2a8 100644 --- a/phpBB/phpbb/ucp/controller/reset_password.php +++ b/phpBB/phpbb/ucp/controller/reset_password.php @@ -424,12 +424,8 @@ class reset_password } } - if (!empty($errors)) - { - $this->template->assign_block_vars_array('PASSWORD_RESET_ERRORS', array_map([$this->language, 'lang'], $errors)); - } - $this->template->assign_vars([ + 'PASSWORD_RESET_ERRORS' => !empty($errors) ? array_map([$this->language, 'lang'], $errors) : '', 'S_IS_PASSWORD_RESET' => true, 'U_RESET_PASSWORD_ACTION' => $this->helper->route('phpbb_ucp_reset_password_controller'), 'S_HIDDEN_FIELDS' => build_hidden_fields([ diff --git a/phpBB/posting.php b/phpBB/posting.php index c4042e48e6..cdc19903fd 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -736,6 +736,12 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ( $subject = (!$subject && $mode != 'post') ? $post_data['topic_title'] : $subject; $message = $request->variable('message', '', true); + /** + * Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR. + * Using their Numeric Character Reference's Hexadecimal notation. + */ + $subject = utf8_encode_ucr($subject); + if ($subject && $message) { if (confirm_box(true)) diff --git a/phpBB/styles/prosilver/template/mcp_front.html b/phpBB/styles/prosilver/template/mcp_front.html index 90793d072b..3eba12fe74 100644 --- a/phpBB/styles/prosilver/template/mcp_front.html +++ b/phpBB/styles/prosilver/template/mcp_front.html @@ -91,7 +91,7 @@ </div> </dt> <dd class="moderation"> - <span>{L_REPORTED} {L_POST_BY_AUTHOR} {report.REPORTER_FULL} {L_REPORTED_ON_DATE} <br /> + <span>{L_REPORTED} {L_POST_BY_AUTHOR} {report.REPORTER_FULL} {L_REPORTED_ON_DATE} {{ report.REPORT_TIME }}<br /> {L_FORUM}{L_COLON} <a href="{report.U_FORUM}">{report.FORUM_NAME}</a></span> </dd> </dl> diff --git a/phpBB/styles/prosilver/template/navbar_footer.html b/phpBB/styles/prosilver/template/navbar_footer.html index 4e3d1e295e..1c5031e9b9 100644 --- a/phpBB/styles/prosilver/template/navbar_footer.html +++ b/phpBB/styles/prosilver/template/navbar_footer.html @@ -4,22 +4,22 @@ <ul id="nav-footer" class="nav-footer linklist" role="menubar"> <li class="breadcrumbs"> <!-- IF U_SITE_HOME --> - {% spaceless %} + {% apply spaceless %} <span class="crumb"> <a href="{U_SITE_HOME}" data-navbar-reference="home"> <i class="icon fa-home fa-fw" aria-hidden="true"></i><span>{L_SITE_HOME}</span> </a> </span> - {% endspaceless %} + {% endapply %} <!-- ENDIF --> <!-- EVENT overall_footer_breadcrumb_prepend --> - {% spaceless %} + {% apply spaceless %} <span class="crumb"> <a href="{U_INDEX}" data-navbar-reference="index"> <!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw" aria-hidden="true"></i><!-- ENDIF --><span>{L_INDEX}</span> </a> </span> - {% endspaceless %} + {% endapply %} <!-- EVENT overall_footer_breadcrumb_append --> </li> <!-- IF U_WATCH_FORUM_LINK and not S_IS_BOT --> diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html index 4a1a436d4a..bd54f71d41 100644 --- a/phpBB/styles/prosilver/template/navbar_header.html +++ b/phpBB/styles/prosilver/template/navbar_header.html @@ -178,34 +178,41 @@ </ul> <ul id="nav-breadcrumbs" class="nav-breadcrumbs linklist navlinks" role="menubar"> - <!-- DEFINE $MICRODATA = ' itemtype="http://schema.org/ListItem" itemprop="itemListElement" itemscope' --> + {% set MICRODATA = 'itemtype="https://schema.org/ListItem" itemprop="itemListElement" itemscope' %} {% set navlink_position = 1 %} - <!-- 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" 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" 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_breadcrumbs_before %} + + <li class="breadcrumbs" itemscope itemtype="https://schema.org/BreadcrumbList"> + + {% if U_SITE_HOME %} + <span class="crumb" {{ MICRODATA }}><a itemprop="item" href="{{ U_SITE_HOME }}" 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 itemprop="item" href="{{ U_INDEX }}" 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> + + {% for navlinks in navlinks %} {% set NAVLINK_NAME = navlinks.BREADCRUMB_NAME | default(navlinks.FORUM_NAME) %} {% set NAVLINK_LINK = navlinks.U_BREADCRUMB | default(navlinks.U_VIEW_FORUM) %} - <!-- EVENT overall_header_navlink_prepend --> - <span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{{ NAVLINK_LINK }}" itemtype="https://schema.org/Thing" itemscope itemprop="item"><span itemprop="name">{{ NAVLINK_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 --> + + {% EVENT overall_header_navlink_prepend %} + <span class="crumb" {{ MICRODATA }}{% if navlinks.MICRODATA %} {{ navlinks.MICRODATA }}{% endif %}><a itemprop="item" href="{{ NAVLINK_LINK }}"><span itemprop="name">{{ NAVLINK_NAME }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> + {% EVENT overall_header_navlink_append %} + {% endfor %} + + {% EVENT overall_header_breadcrumb_append %} </li> - <!-- EVENT overall_header_breadcrumbs_after --> - <!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH --> + {% EVENT overall_header_breadcrumbs_after %} + + {% if S_DISPLAY_SEARCH and not S_IN_SEARCH %} <li class="rightside responsive-search"> - <a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}" role="menuitem"> - <i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SEARCH}</span> + <a href="{{ U_SEARCH }}" title="{{ lang('SEARCH_ADV_EXPLAIN') }}" role="menuitem"> + <i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">{{ lang('SEARCH') }}</span> </a> </li> - <!-- ENDIF --> + {% endif %} </ul> </div> |