mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge branch 'prep-release-3.2.5' into 3.2.x
This commit is contained in:
@@ -20,6 +20,13 @@ var phpbbAlertTimer = null;
|
||||
|
||||
phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined');
|
||||
|
||||
// Add ajax pre-filter to prevent cross-domain script execution
|
||||
$.ajaxPrefilter(function(s) {
|
||||
if (s.crossDomain) {
|
||||
s.contents.script = false;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Display a loading screen
|
||||
*
|
||||
|
9
phpBB/assets/javascript/jquery.min.js
vendored
9
phpBB/assets/javascript/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -50,6 +50,7 @@
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ul>
|
||||
<li><a href="#v325rc1">Changes since 3.2.5-RC1</a></li>
|
||||
<li><a href="#v324">Changes since 3.2.4</a></li>
|
||||
<li><a href="#v324rc1">Changes since 3.2.4-RC1</a></li>
|
||||
<li><a href="#v323">Changes since 3.2.3</a></li>
|
||||
@@ -134,6 +135,18 @@
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<a name="v325rc1"></a><h3>Changes since 3.2.5-RC1</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15888">PHPBB3-15888</a>] - Update link to user guide</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15893">PHPBB3-15893</a>] - Call to undefined $user in phpbb_format_quote() when BBCodes are disabled</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15911">PHPBB3-15911</a>] - SQL general error on DB update from 3.0 branch</li>
|
||||
</ul>
|
||||
<h4>Hardening</h4>
|
||||
<ul>
|
||||
<li>[SECURITY-229] - Update to latest version of jQuery 1.x and add ajax prefilter</li>
|
||||
</ul>
|
||||
|
||||
<a name="v324"></a><h3>Changes since 3.2.4</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
|
@@ -1762,13 +1762,14 @@ class bitfield
|
||||
/**
|
||||
* Formats the quote according to the given BBCode status setting
|
||||
*
|
||||
* @param bool $bbcode_status The status of the BBCode setting
|
||||
* @param array $quote_attributes The attributes of the quoted post
|
||||
* @param phpbb\textformatter\utils $text_formatter_utils Text formatter utilities
|
||||
* @param parse_message $message_parser Message parser class
|
||||
* @param string $message_link Link of the original quoted post
|
||||
* @param phpbb\language\language $language Language class
|
||||
* @param parse_message $message_parser Message parser class
|
||||
* @param phpbb\textformatter\utils_interface $text_formatter_utils Text formatter utilities
|
||||
* @param bool $bbcode_status The status of the BBCode setting
|
||||
* @param array $quote_attributes The attributes of the quoted post
|
||||
* @param string $message_link Link of the original quoted post
|
||||
*/
|
||||
function phpbb_format_quote($bbcode_status, $quote_attributes, $text_formatter_utils, $message_parser, $message_link = '')
|
||||
function phpbb_format_quote($language, $message_parser, $text_formatter_utils, $bbcode_status, $quote_attributes, $message_link = '')
|
||||
{
|
||||
if ($bbcode_status)
|
||||
{
|
||||
@@ -1794,7 +1795,7 @@ function phpbb_format_quote($bbcode_status, $quote_attributes, $text_formatter_u
|
||||
$message = $quote_string . $message;
|
||||
$message = str_replace("\n", "\n" . $quote_string, $message);
|
||||
|
||||
$message_parser->message = $quote_attributes['author'] . " " . $user->lang['WROTE'] . ":\n" . $message . "\n";
|
||||
$message_parser->message = $quote_attributes['author'] . " " . $language->lang('WROTE') . ":\n" . $message . "\n";
|
||||
}
|
||||
|
||||
if ($message_link)
|
||||
|
@@ -666,8 +666,29 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
delete_posts('poster_id', $user_ids);
|
||||
}
|
||||
|
||||
$table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE, PRIVMSGS_FOLDER_TABLE, PRIVMSGS_RULES_TABLE, $phpbb_container->getParameter('tables.auth_provider_oauth_token_storage'), $phpbb_container->getParameter('tables.auth_provider_oauth_states'), $phpbb_container->getParameter('tables.auth_provider_oauth_account_assoc'));
|
||||
$table_ary = [
|
||||
USERS_TABLE,
|
||||
USER_GROUP_TABLE,
|
||||
TOPICS_WATCH_TABLE,
|
||||
FORUMS_WATCH_TABLE,
|
||||
ACL_USERS_TABLE,
|
||||
TOPICS_TRACK_TABLE,
|
||||
TOPICS_POSTED_TABLE,
|
||||
FORUMS_TRACK_TABLE,
|
||||
PROFILE_FIELDS_DATA_TABLE,
|
||||
MODERATOR_CACHE_TABLE,
|
||||
DRAFTS_TABLE,
|
||||
BOOKMARKS_TABLE,
|
||||
SESSIONS_KEYS_TABLE,
|
||||
PRIVMSGS_FOLDER_TABLE,
|
||||
PRIVMSGS_RULES_TABLE,
|
||||
$phpbb_container->getParameter('tables.auth_provider_oauth_token_storage'),
|
||||
$phpbb_container->getParameter('tables.auth_provider_oauth_states'),
|
||||
$phpbb_container->getParameter('tables.auth_provider_oauth_account_assoc')
|
||||
];
|
||||
|
||||
// Ignore errors on deleting from non-existent tables, e.g. when migrating
|
||||
$db->sql_return_on_error(true);
|
||||
// Delete the miscellaneous (non-post) data for the user
|
||||
foreach ($table_ary as $table)
|
||||
{
|
||||
@@ -675,6 +696,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
WHERE " . $user_id_sql;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
$db->sql_return_on_error();
|
||||
|
||||
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
|
||||
|
||||
|
@@ -986,7 +986,11 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
$quote_attributes['post_id'] = $post['msg_id'];
|
||||
}
|
||||
|
||||
phpbb_format_quote($bbcode_status, $quote_attributes, $phpbb_container->get('text_formatter.utils'), $message_parser, $message_link);
|
||||
/** @var \phpbb\language\language $language */
|
||||
$language = $phpbb_container->get('language');
|
||||
/** @var \phpbb\textformatter\utils_interface $text_formatter_utils */
|
||||
$text_formatter_utils = $phpbb_container->get('text_formatter.utils');
|
||||
phpbb_format_quote($language, $message_parser, $text_formatter_utils, $bbcode_status, $quote_attributes, $message_link);
|
||||
}
|
||||
|
||||
if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh)
|
||||
|
@@ -23,7 +23,7 @@ if (php_sapi_name() !== 'cli')
|
||||
define('IN_PHPBB', true);
|
||||
define('IN_INSTALL', true);
|
||||
define('PHPBB_ENVIRONMENT', 'production');
|
||||
define('PHPBB_VERSION', '3.2.5-RC1');
|
||||
define('PHPBB_VERSION', '3.2.5');
|
||||
$phpbb_root_path = __DIR__ . '/../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
|
@@ -54,7 +54,7 @@ $lang = array_merge($lang, array(
|
||||
|
||||
<br />
|
||||
|
||||
<p>For further information on setting up and managing permissions on your phpBB3 board, please see the section on <a href="https://www.phpbb.com/support/docs/en/3.1/ug/quickstart/permissions/">Setting permissions of our Quick Start Guide</a>.</p>
|
||||
<p>For further information on setting up and managing permissions on your phpBB3 board, please see the section on <a href="https://www.phpbb.com/support/docs/en/3.2/ug/quickstart/permissions/">Setting permissions of our Quick Start Guide</a>.</p>
|
||||
',
|
||||
|
||||
'ACL_NEVER' => 'Never',
|
||||
|
@@ -58,9 +58,14 @@ class release_3_0_8_rc1 extends \phpbb\db\migration\migration
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
$extension_groups_updated = array();
|
||||
while ($lang_dir = $this->db->sql_fetchfield('lang_dir'))
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$lang_dir = basename($lang_dir);
|
||||
if (empty($row['lang_dir']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$lang_dir = basename($row['lang_dir']);
|
||||
|
||||
// The language strings we need are either in language/.../acp/attachments.php
|
||||
// in the update package if we're updating to 3.0.8-RC1 or later,
|
||||
|
37
phpBB/phpbb/db/migration/data/v32x/jquery_update.php
Normal file
37
phpBB/phpbb/db/migration/data/v32x/jquery_update.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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 jquery_update extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return $this->config['load_jquery_url'] === '//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js';
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\phpbb\db\migration\data\v32x\v325rc1',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.update', array('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js')),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
38
phpBB/phpbb/db/migration/data/v32x/v325.php
Normal file
38
phpBB/phpbb/db/migration/data/v32x/v325.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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 v325 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return phpbb_version_compare($this->config['version'], '3.2.5', '>=');
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\phpbb\db\migration\data\v32x\v325rc1',
|
||||
'\phpbb\db\migration\data\v32x\jquery_update',
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.update', array('version', '3.2.5')),
|
||||
);
|
||||
}
|
||||
}
|
@@ -65,7 +65,7 @@ class email extends \phpbb\notification\method\messenger_base
|
||||
*/
|
||||
public function is_available(type_interface $notification_type = null)
|
||||
{
|
||||
return parent::is_available($notification_type) && $this->config['email_enable'] && $this->user->data['user_email'];
|
||||
return parent::is_available($notification_type) && $this->config['email_enable'] && !empty($this->user->data['user_email']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -846,6 +846,7 @@ if ($load && ($mode == 'reply' || $mode == 'quote' || $mode == 'post') && $post_
|
||||
load_drafts($topic_id, $forum_id);
|
||||
}
|
||||
|
||||
/** @var \phpbb\textformatter\utils_interface $bbcode_utils */
|
||||
$bbcode_utils = $phpbb_container->get('text_formatter.utils');
|
||||
|
||||
if ($submit || $preview || $refresh)
|
||||
@@ -1648,7 +1649,9 @@ if ($generate_quote)
|
||||
'user_id' => $post_data['poster_id'],
|
||||
);
|
||||
|
||||
phpbb_format_quote($config['allow_bbcode'], $quote_attributes, $bbcode_utils, $message_parser);
|
||||
/** @var \phpbb\language\language $language */
|
||||
$language = $phpbb_container->get('language');
|
||||
phpbb_format_quote($language, $message_parser, $bbcode_utils, $bbcode_status, $quote_attributes);
|
||||
}
|
||||
|
||||
if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh)
|
||||
|
Reference in New Issue
Block a user