diff options
26 files changed, 228 insertions, 56 deletions
diff --git a/.travis.yml b/.travis.yml index fa2a86c0db..4cef1af10e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,4 +53,4 @@ script: - sh -c "if [ '$SLOWTESTS' != '1' -a '$DB' = 'mysqli' ]; then phpBB/vendor/bin/phpunit tests/lint_test.php; fi" - sh -c "if [ '$NOTESTS' != '1' -a '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --verbose --stop-on-error; fi" - sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi" - - sh -c "set -x;if [ '$NOTESTS' = '1' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi" + - sh -c "set -x;if [ '$NOTESTS' = '1' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git remote set-branches --add origin $TRAVIS_BRANCH && git fetch && git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..$TRAVIS_PULL_REQUEST_SHA; fi" diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 41d0ae8d42..eafe11ee89 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -525,7 +525,6 @@ li { padding: 0; border-right: 1px solid #CCCFD3; position: relative; - z-index: 1; } .rtl #menu { @@ -1891,7 +1890,6 @@ li.pagination ul { color: #000; text-align: center; border: 1px solid #AAA; - opacity: .95; } .tooltip span.top { diff --git a/phpBB/adm/style/installer_form.html b/phpBB/adm/style/installer_form.html index a38f33c7c2..592d361d1e 100644 --- a/phpBB/adm/style/installer_form.html +++ b/phpBB/adm/style/installer_form.html @@ -1,3 +1,4 @@ +<!-- IF FORM_TITLE --><h1>{FORM_TITLE}</h1><!-- ENDIF --> <form id="<!-- IF FORM_ID -->{FORM_ID}<!-- ELSE -->install_install<!-- ENDIF -->" method="POST" action="{U_ACTION}"> <!-- IF .options --> <!-- IF S_NOT_ONLY_BUTTON_FORM --> @@ -8,9 +9,9 @@ <!-- IF options.S_LEGEND --> <!-- IF not options.S_FIRST_ROW --> </fieldset> - - <fieldset> <!-- ENDIF --> + <fieldset> + <legend>{options.LEGEND}</legend> <!-- ELSE --> <dl> @@ -49,7 +50,7 @@ <fieldset class="submit-buttons"> <legend>{L_SUBMIT}</legend> <!-- BEGIN submit_buttons --> - <input class="button1<!-- IF submit_buttons.DISABLED --> disabled<!-- ENDIF -->" type="submit" name="{submit_buttons.KEY}" value="{submit_buttons.TITLE}"<!-- IF submit_buttons.DISABLED --> disabled="disabled"<!-- ENDIF --> /> + <input class="<!-- IF not submit_buttons.IS_SECONDARY -->button1<!-- ELSE -->button2<!-- ENDIF --><!-- IF submit_buttons.DISABLED --> disabled<!-- ENDIF -->" type="submit" name="{submit_buttons.KEY}" value="{submit_buttons.TITLE}"<!-- IF submit_buttons.DISABLED --> disabled="disabled"<!-- ENDIF --> /> <!-- END submit_buttons --> </fieldset> <!-- ENDIF --> diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html index 017d29d832..8b3121bfa0 100644 --- a/phpBB/adm/style/permission_mask.html +++ b/phpBB/adm/style/permission_mask.html @@ -41,7 +41,7 @@ <dt style="width: 20%"><label for="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">{L_ROLE}{L_COLON}</label></dt> {% if p_mask.f_mask.role_options %} <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 20%"> - <div class="dropdown-container dropdown-button-control roles-options" data-alt-text="{LA_ROLE_DESCRIPTION}"> + <div class="dropdown-container dropdown-right dropdown-button-control roles-options" data-alt-text="{LA_ROLE_DESCRIPTION}"> <select id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" name="role[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]">{p_mask.f_mask.S_ROLE_OPTIONS}</select> <span title="Roles" class="button icon-button tools-icon dropdown-trigger dropdown-select">{L_NO_ROLE_ASSIGNED}</span> <div class="dropdown hidden"> diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 359afb1ec4..069f9089c2 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -27,9 +27,9 @@ phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined'); */ phpbb.loadingIndicator = function() { if (!$loadingIndicator) { - $loadingIndicator = $('<div />', { - id: 'loading_indicator', - class: 'loading_indicator', + $loadingIndicator = $('<div />', { + 'id': 'loading_indicator', + 'class': 'loading_indicator' }); $loadingIndicator.appendTo('#page-footer'); } diff --git a/phpBB/docs/CREDITS.txt b/phpBB/docs/CREDITS.txt index 2df7543ce1..cb42779641 100644 --- a/phpBB/docs/CREDITS.txt +++ b/phpBB/docs/CREDITS.txt @@ -26,9 +26,11 @@ phpBB Lead Developer: Marc (Marc Alexander) phpBB Developers: bantu (Andreas Fischer) CHItA (Máté Bartus) + Derky (Derk Ruitenbeek) Elsensee (Oliver Schramm) + Hanakin (Michael Miday) + MichaelC (Michael Cullum) Nicofuma (Tristan Darricau) - prototech (Cesar Gallegos) For a list of phpBB Team members, please see: http://www.phpbb.com/about/team/ @@ -61,6 +63,7 @@ phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010] kellanved (Henry Sudhof) [04/2007 - 03/2011] nickvergessen (Joas Schilling)[04/2010 - 12/2015] Oleg (Oleg Pudeyev) [01/2011 - 05/2013] + prototech (Cesar Gallegos) [01/2014 - 12/2016] rxu (Ruslan Uzdenov) [04/2010 - 12/2012] TerraFrost (Jim Wigginton) [04/2009 - 01/2011] ToonArmy (Chris Smith) [06/2008 - 11/2011] diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index f958ae93c7..18d574081a 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -553,10 +553,10 @@ class acp_bbcodes } // Lowercase tags - $bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+=?).*/i', '$1', $bbcode_match); - $bbcode_search = preg_replace('/.*?\[([a-z0-9_-]+)=?.*/i', '$1', $bbcode_match); + $bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+).*/i', '$1', $bbcode_match); + $bbcode_search = preg_replace('/.*?\[([a-z0-9_-]+).*/i', '$1', $bbcode_match); - if (!preg_match('/^[a-zA-Z0-9_-]+=?$/', $bbcode_tag)) + if (!preg_match('/^[a-zA-Z0-9_-]+$/', $bbcode_tag)) { global $user; trigger_error($user->lang['BBCODE_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 5b31417b83..4c390c5f0e 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -1355,18 +1355,18 @@ class acp_styles } // Hardcoded template bitfield to add for new templates + $default_bitfield = '1111111111111'; + $bitfield = new bitfield(); - $bitfield->set(0); - $bitfield->set(1); - $bitfield->set(2); - $bitfield->set(3); - $bitfield->set(4); - $bitfield->set(8); - $bitfield->set(9); - $bitfield->set(11); - $bitfield->set(12); - $value = $bitfield->get_base64(); - return $value; + for ($i = 0; $i < strlen($default_bitfield); $i++) + { + if ($default_bitfield[$i] == '1') + { + $bitfield->set($i); + } + } + + return $bitfield->get_base64(); } } diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 090cb32ebb..beaa1d11f1 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -2497,7 +2497,7 @@ class acp_users 'U_DELETE' => $this->u_action . "&action=delete&u=$user_id&g=" . $data['group_id'], 'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&action=approve&u=$user_id&g=" . $data['group_id'] : '', - 'GROUP_NAME' => ($group_type == 'special') ? $user->lang['G_' . $data['group_name']] : $data['group_name'], + 'GROUP_NAME' => $group_helper->get_name($data['group_name']), 'L_DEMOTE_PROMOTE' => ($data['group_leader']) ? $user->lang['GROUP_DEMOTE'] : $user->lang['GROUP_PROMOTE'], 'S_IS_MEMBER' => ($group_type != 'pending') ? true : false, diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 594100ac65..a7a93d6115 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -166,7 +166,7 @@ class ucp_register ->format($user->lang['DATE_FORMAT'], true); unset($now); - $template->assign_vars(array( + $template_vars = array( 'S_LANG_OPTIONS' => (sizeof($lang_row) > 1) ? language_select($user_lang) : '', 'L_COPPA_NO' => sprintf($user->lang['UCP_COPPA_BEFORE'], $coppa_birthday), 'L_COPPA_YES' => sprintf($user->lang['UCP_COPPA_ON_AFTER'], $coppa_birthday), @@ -180,11 +180,11 @@ class ucp_register 'COOKIE_NAME' => $config['cookie_name'], 'COOKIE_PATH' => $config['cookie_path'], - )); + ); } else { - $template->assign_vars(array( + $template_vars = array( 'S_LANG_OPTIONS' => (sizeof($lang_row) > 1) ? language_select($user_lang) : '', 'L_TERMS_OF_USE' => sprintf($user->lang['TERMS_OF_USE_CONTENT'], $config['sitename'], generate_board_url()), @@ -195,11 +195,32 @@ class ucp_register 'COOKIE_NAME' => $config['cookie_name'], 'COOKIE_PATH' => $config['cookie_path'], - ) ); } + + $tpl_name = 'ucp_agreement'; + + /** + * Allows to modify the agreements. + * + * @event core.ucp_register_agreement_modify_template_data + * @var string tpl_name Template file + * @var array template_vars Array with data about to be assigned to the template + * @var array s_hidden_fields Array with hidden form elements + * @var array lang_row Array with available languages, read only + * @since 3.2.2-RC1 + */ + $vars = array('tpl_name', 'template_vars', 's_hidden_fields', 'lang_row'); + extract($phpbb_dispatcher->trigger_event('core.ucp_register_agreement_modify_template_data', compact($vars))); + unset($lang_row); + $template_vars = array_merge($template_vars, array( + 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields), + )); + + $template->assign_vars($template_vars); + /** * Allows to modify the agreements. * @@ -207,10 +228,11 @@ class ucp_register * * @event core.ucp_register_agreement * @since 3.1.6-RC1 + * @deprecated 3.2.2-RC1 Replaced by core.ucp_register_agreement_modify_template_data and to be removed in 3.3.0-RC1 */ $phpbb_dispatcher->dispatch('core.ucp_register_agreement'); - $this->tpl_name = 'ucp_agreement'; + $this->tpl_name = $tpl_name; return; } @@ -505,7 +527,6 @@ class ucp_register { $s_hidden_fields = array_merge($s_hidden_fields, $captcha->get_hidden_fields()); } - $s_hidden_fields = build_hidden_fields($s_hidden_fields); // Visual Confirmation - Show images if ($config['enable_confirm']) @@ -531,8 +552,7 @@ class ucp_register // Assign template vars for timezone select phpbb_timezone_select($template, $user, $data['tz'], true); - $template->assign_vars(array( - 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '', + $template_vars = array( 'USERNAME' => $data['username'], 'PASSWORD' => $data['new_password'], 'PASSWORD_CONFIRM' => $data['password_confirm'], @@ -547,13 +567,41 @@ class ucp_register 'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh']) ? true : false, 'S_REGISTRATION' => true, 'S_COPPA' => $coppa, - 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'), 'COOKIE_NAME' => $config['cookie_name'], 'COOKIE_PATH' => $config['cookie_path'], + ); + + $tpl_name = 'ucp_register'; + + /** + * Modify template data on the registration page + * + * @event core.ucp_register_modify_template_data + * @var array template_vars Array with template data + * @var array data Array with user data, read only + * @var array error Array with errors + * @var array s_hidden_fields Array with hidden field elements + * @var string tpl_name Template name + * @since 3.2.2-RC1 + */ + $vars = array( + 'template_vars', + 'data', + 'error', + 's_hidden_fields', + 'tpl_name', + ); + extract($phpbb_dispatcher->trigger_event('core.ucp_register_modify_template_data', compact($vars))); + + $template_vars = array_merge($template_vars, array( + 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '', + 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields), )); + $template->assign_vars($template_vars); + // $user->profile_fields = array(); @@ -561,8 +609,7 @@ class ucp_register $cp->generate_profile_fields('register', $user->get_iso_lang_id()); // - $this->tpl_name = 'ucp_register'; - $this->page_title = 'UCP_REGISTRATION'; + $this->tpl_name = $tpl_name; } /** diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index fa61f45366..f97ba7ac07 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -478,7 +478,7 @@ INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NEW_MEMBER', 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER', 'f_', 10); # -- phpbb_styles -INSERT INTO phpbb_styles (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '© phpBB Limited', 1, 'prosilver', 'kNg=', 0, ''); +INSERT INTO phpbb_styles (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '© phpBB Limited', 1, 'prosilver', '//g=', 0, ''); # -- Forums INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, ''); diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php index 1655855edb..505d12e8ff 100644 --- a/phpBB/language/en/cli.php +++ b/phpBB/language/en/cli.php @@ -117,6 +117,7 @@ $lang = array_merge($lang, array( 'CLI_EXTENSION_ENABLE_FAILURE' => 'Could not enable extension %s', 'CLI_EXTENSION_ENABLE_SUCCESS' => 'Successfully enabled extension %s', 'CLI_EXTENSION_ENABLED' => 'Extension %s is already enabled', + 'CLI_EXTENSION_NOT_EXIST' => 'Extension %s does not exist', 'CLI_EXTENSION_NAME' => 'Name of the extension', 'CLI_EXTENSION_PURGE_FAILURE' => 'Could not purge extension %s', 'CLI_EXTENSION_PURGE_SUCCESS' => 'Successfully purged extension %s', diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php index f92de0069c..a6f5b10e86 100644 --- a/phpBB/phpbb/console/command/extension/enable.php +++ b/phpBB/phpbb/console/command/extension/enable.php @@ -37,6 +37,13 @@ class enable extends command $io = new SymfonyStyle($input, $output); $name = $input->getArgument('extension-name'); + + if (!$this->manager->is_available($name)) + { + $io->error($this->user->lang('CLI_EXTENSION_NOT_EXIST', $name)); + return 1; + } + $extension = $this->manager->get_extension($name); if (!$extension->is_enableable()) diff --git a/phpBB/phpbb/db/migration/data/v32x/update_prosilver_bitfield.php b/phpBB/phpbb/db/migration/data/v32x/update_prosilver_bitfield.php new file mode 100644 index 0000000000..6e51a01834 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v32x/update_prosilver_bitfield.php @@ -0,0 +1,39 @@ +<?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\data\v32x; + +class update_prosilver_bitfield extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v32x\v321', + ); + } + + public function update_data() + { + return array( + array('custom', array(array($this, 'update_bbcode_bitfield'))), + ); + } + + public function update_bbcode_bitfield() + { + $sql = 'UPDATE ' . STYLES_TABLE . " + SET bbcode_bitfield = '//g=' + WHERE style_path = 'prosilver'"; + $this->sql_query($sql); + } +} diff --git a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php index bce0149890..dd584eff30 100644 --- a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php @@ -187,6 +187,7 @@ class ajax_iohandler extends iohandler_base $tpl_ary['KEY'] = $input_name; $tpl_ary['S_EXPLAIN'] = false; $tpl_ary['DISABLED'] = isset($input_options['disabled']) ? $input_options['disabled'] : false; + $tpl_ary['IS_SECONDARY'] = isset($input_options['is_secondary']) ? $input_options['is_secondary'] : false; if (isset($input_options['default'])) { @@ -218,6 +219,11 @@ class ajax_iohandler extends iohandler_base $this->template->assign_block_vars($block_name, $tpl_ary); } + if (isset($form['database_update_submit']) && !$form['database_update_submit']['disabled']) + { + $this->template->assign_var('FORM_TITLE', $this->language->lang('UPDATE_CONTINUE_UPDATE_PROCESS')); + } + $this->template->assign_var('S_NOT_ONLY_BUTTON_FORM', $not_button_form); if (!$not_button_form) diff --git a/phpBB/phpbb/install/module/update_filesystem/task/diff_files.php b/phpBB/phpbb/install/module/update_filesystem/task/diff_files.php index 1792a3b723..8151a24f2d 100644 --- a/phpBB/phpbb/install/module/update_filesystem/task/diff_files.php +++ b/phpBB/phpbb/install/module/update_filesystem/task/diff_files.php @@ -103,8 +103,8 @@ class diff_files extends task_base $old_path = $this->update_helper->get_path_to_old_update_files(); $new_path = $this->update_helper->get_path_to_new_update_files(); - $files_to_diff = $this->installer_config->get('update_files', array()); - $files_to_diff = $files_to_diff['update_with_diff']; + $update_files = $this->installer_config->get('update_files', array()); + $files_to_diff = $update_files['update_with_diff']; // Set progress bar $this->iohandler->set_task_count(count($files_to_diff), true); @@ -154,7 +154,6 @@ class diff_files extends task_base } $diff = new \diff3($file_contents[0], $file_contents[1], $file_contents[2]); - unset($file_contents); // Handle conflicts if ($diff->get_num_conflicts() !== 0) @@ -162,12 +161,20 @@ class diff_files extends task_base $merge_conflicts[] = $filename; } - // Save merged output - $this->cache->put( - '_file_' . md5($filename), - base64_encode(implode("\n", $diff->merged_output())) - ); + if ($diff->merged_output() !== $file_contents[1]) + { + // Save merged output + $this->cache->put( + '_file_' . md5($filename), + base64_encode(implode("\n", $diff->merged_output())) + ); + } + else + { + unset($update_files['update_with_diff'][$key]); + } + unset($file_contents); unset($diff); } else @@ -199,6 +206,16 @@ class diff_files extends task_base $this->installer_config->set('merge_conflict_list', $merge_conflicts); $this->installer_config->set('file_diff_update_count', $progress_count); + foreach ($update_files as $type => $files) + { + if (empty($files)) + { + unset($update_files[$type]); + } + } + + $this->installer_config->set('update_files', $update_files); + // Request refresh throw new resource_limit_reached_exception(); } @@ -206,6 +223,16 @@ class diff_files extends task_base $this->iohandler->finish_progress('ALL_FILES_DIFFED'); $this->installer_config->set('merge_conflict_list', $merge_conflicts); + + foreach ($update_files as $type => $files) + { + if (empty($files)) + { + unset($update_files[$type]); + } + } + + $this->installer_config->set('update_files', $update_files); } /** diff --git a/phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php b/phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php index 21aa93b7ea..0b83e9a79d 100644 --- a/phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php +++ b/phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php @@ -99,13 +99,14 @@ class download_updated_files extends task_base // Add form to continue update $this->iohandler->add_user_form_group('UPDATE_CONTINUE_UPDATE_PROCESS', array( 'update_recheck_files_submit' => array( - 'label' => 'UPDATE_RECHECK_UPDATE_FILES', - 'type' => 'submit', + 'label' => 'UPDATE_RECHECK_UPDATE_FILES', + 'type' => 'submit', + 'is_secondary' => empty($file_update_info), ), 'database_update_submit' => array( 'label' => 'UPDATE_CONTINUE_UPDATE_PROCESS', 'type' => 'submit', - 'disabled' => count($file_update_info) > 0, + 'disabled' => !empty($file_update_info), ), )); diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php index d5ad8283d9..15d0a5e3e5 100644 --- a/phpBB/phpbb/textformatter/s9e/factory.php +++ b/phpBB/phpbb/textformatter/s9e/factory.php @@ -78,7 +78,7 @@ class factory implements \phpbb\textformatter\cache_interface 'b' => '[B]{TEXT}[/B]', 'code' => '[CODE lang={IDENTIFIER;optional}]{TEXT}[/CODE]', 'color' => '[COLOR={COLOR}]{TEXT}[/COLOR]', - 'email' => '[EMAIL={EMAIL;useContent} subject={TEXT;optional;postFilter=rawurlencode} body={TEXT;optional;postFilter=rawurlencode}]{TEXT}[/EMAIL]', + 'email' => '[EMAIL={EMAIL;useContent} subject={TEXT1;optional;postFilter=rawurlencode} body={TEXT2;optional;postFilter=rawurlencode}]{TEXT}[/EMAIL]', 'flash' => '[FLASH={NUMBER1},{NUMBER2} width={NUMBER1;postFilter=#flashwidth} height={NUMBER2;postFilter=#flashheight} url={URL;useContent} /]', 'i' => '[I]{TEXT}[/I]', 'img' => '[IMG src={IMAGEURL;useContent}]', diff --git a/phpBB/phpbb/textreparser/base.php b/phpBB/phpbb/textreparser/base.php index 27d7bc1f27..2ee6ea2cb3 100644 --- a/phpBB/phpbb/textreparser/base.php +++ b/phpBB/phpbb/textreparser/base.php @@ -153,8 +153,8 @@ abstract class base implements reparser_interface { // Look for the closing tag inside of a e element, in an element of the same name, e.g. // <e>[/url]</e></URL> - $match = '<e>[/' . $bbcode . ']</e></' . strtoupper($bbcode) . '>'; - if (strpos($record['text'], $match) !== false) + $match = '<e>[/' . $bbcode . ']</e></' . $bbcode . '>'; + if (stripos($record['text'], $match) !== false) { return true; } diff --git a/phpBB/search.php b/phpBB/search.php index 0d9b2bbfe8..eabb1fc96e 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -932,6 +932,26 @@ if ($keywords || $author || $author_id || $search_id || $submit) while ($row = $db->sql_fetchrow($result)) { + /** + * Modify the row of a post result before the post_text is trimmed + * + * @event core.search_modify_post_row + * @var string hilit String to highlight + * @var array row Array with the post data + * @var string u_hilit Highlight string to be injected into URL + * @var string view Search results view mode + * @var array zebra Array with zebra data for the current user + * @since 3.2.2-RC1 + */ + $vars = array( + 'hilit', + 'row', + 'u_hilit', + 'view', + 'zebra', + ); + extract($phpbb_dispatcher->trigger_event('core.search_modify_post_row', compact($vars))); + // We pre-process some variables here for later usage $row['post_text'] = censor_text($row['post_text']); diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg index 2deceef788..ea4e899109 100644 --- a/phpBB/styles/prosilver/style.cfg +++ b/phpBB/styles/prosilver/style.cfg @@ -25,7 +25,7 @@ style_version = 3.2.1 phpbb_version = 3.2.1 # Defining a different template bitfield -# template_bitfield = lNg= +# template_bitfield = //g= # Parent style # Set value to empty or to this style's name if this style does not have a parent style diff --git a/phpBB/styles/prosilver/template/ucp_footer.html b/phpBB/styles/prosilver/template/ucp_footer.html index f2f1a68db3..eb07f52e05 100644 --- a/phpBB/styles/prosilver/template/ucp_footer.html +++ b/phpBB/styles/prosilver/template/ucp_footer.html @@ -9,6 +9,4 @@ </form> <!-- ENDIF --> -<!-- INCLUDE jumpbox.html --> - <!-- INCLUDE overall_footer.html --> diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index cd420b7614..807633864c 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -529,6 +529,7 @@ blockquote .codebox { /* Attachments ----------------------------------------*/ .attachbox { + font-size: 13px; float: left; width: auto; max-width: 100%; diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php index 8e6328d1d3..764376a945 100644 --- a/tests/functional/posting_test.php +++ b/tests/functional/posting_test.php @@ -235,7 +235,7 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case )); $crawler = self::submit($form); $this->assertContains( - '<span style="font-weight: bold">My signature</span>', + '<strong class="text-strong">My signature</strong>', $crawler->filter('#preview .signature')->html() ); } diff --git a/tests/text_reparser/base_test.php b/tests/text_reparser/base_test.php index af2d56ea51..2c6844b063 100644 --- a/tests/text_reparser/base_test.php +++ b/tests/text_reparser/base_test.php @@ -66,4 +66,19 @@ class phpbb_textreparser_base_test extends phpbb_database_test_case $this->get_rows(array(1)) ); } + + public function test_reparse_case_insensitive() + { + $this->get_reparser()->reparse_range(2, 2); + + $this->assertEquals( + [ + [ + 'id' => '2', + 'text' => '<r><IMG src="img.png"><s>[IMG]</s>img.png<e>[/IMG]</e></IMG></r>' + ] + ], + $this->get_rows([2]) + ); + } } diff --git a/tests/text_reparser/fixtures/base.xml b/tests/text_reparser/fixtures/base.xml index a4921a8823..532a19a8a9 100644 --- a/tests/text_reparser/fixtures/base.xml +++ b/tests/text_reparser/fixtures/base.xml @@ -15,5 +15,13 @@ <value></value> <value>abcd1234</value> </row> + <row> + <value>2</value> + <value>1</value> + <value>1</value> + <value>1</value> + <value><![CDATA[<r><IMG src="img.png"><s>[IMG]</s>img.png<e>[/IMG]</e></IMG></r>]]></value> + <value></value> + </row> </table> </dataset> |