Merge branch '3.2.x' into ticket/16234

This commit is contained in:
KYPREO 2020-01-04 01:13:41 +11:00 committed by GitHub
commit f0f1cd37dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 202 additions and 38 deletions

View file

@ -2,9 +2,9 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../"> <project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build --> <!-- a few settings for the build -->
<property name="newversion" value="3.2.9-dev" /> <property name="newversion" value="3.2.10-dev" />
<property name="prevversion" value="3.2.7" /> <property name="prevversion" value="3.2.9-RC1" />
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0-a1, 3.2.0-a2, 3.2.0-b1, 3.2.0-b2, 3.2.0-RC1, 3.2.0-RC2, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.8-RC1" /> <property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0-a1, 3.2.0-a2, 3.2.0-b1, 3.2.0-b2, 3.2.0-RC1, 3.2.0-RC2, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8" />
<!-- no configuration should be needed beyond this point --> <!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" /> <property name="oldversions" value="${olderversions}, ${prevversion}" />

View file

@ -26,6 +26,7 @@ $config['versions'] = Sami\Version\GitVersionCollection::create(__DIR__ . '/../'
->add('3.0.x') ->add('3.0.x')
->add('3.1.x') ->add('3.1.x')
->add('3.2.x') ->add('3.2.x')
->add('3.3.x')
->add('master') ->add('master')
; ;

16
phpBB/composer.lock generated
View file

@ -2483,33 +2483,33 @@
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
"version": "1.9.0", "version": "1.10.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpspec/prophecy.git", "url": "https://github.com/phpspec/prophecy.git",
"reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203" "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203", "url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc",
"reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203", "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"doctrine/instantiator": "^1.0.2", "doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0", "php": "^5.3|^7.0",
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
"sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/comparator": "^1.2.3|^2.0|^3.0",
"sebastian/recursion-context": "^1.0|^2.0|^3.0" "sebastian/recursion-context": "^1.0|^2.0|^3.0"
}, },
"require-dev": { "require-dev": {
"phpspec/phpspec": "^2.5|^3.2", "phpspec/phpspec": "^2.5 || ^3.2",
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.8.x-dev" "dev-master": "1.10.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -2542,7 +2542,7 @@
"spy", "spy",
"stub" "stub"
], ],
"time": "2019-10-03T11:07:50+00:00" "time": "2019-12-22T21:05:45+00:00"
}, },
{ {
"name": "phpunit/dbunit", "name": "phpunit/dbunit",

View file

@ -156,6 +156,7 @@ $u_permissions = array(
'u_download' => array(0, 1), 'u_download' => array(0, 1),
'u_attach' => array(0, 1), 'u_attach' => array(0, 1),
'u_sig' => array(0, 1), 'u_sig' => array(0, 1),
'u_emoji' => array(0, 1),
'u_pm_attach' => array(0, 1), 'u_pm_attach' => array(0, 1),
'u_pm_bbcode' => array(0, 1), 'u_pm_bbcode' => array(0, 1),
'u_pm_smilies' => array(0, 1), 'u_pm_smilies' => array(0, 1),

View file

@ -50,6 +50,7 @@
<ol> <ol>
<li><a href="#changelog">Changelog</a> <li><a href="#changelog">Changelog</a>
<ul> <ul>
<li><a href="#v328">Changes since 3.2.8</a></li>
<li><a href="#v328rc1">Changes since 3.2.8-RC1</a></li> <li><a href="#v328rc1">Changes since 3.2.8-RC1</a></li>
<li><a href="#v327">Changes since 3.2.7</a></li> <li><a href="#v327">Changes since 3.2.7</a></li>
<li><a href="#v326">Changes since 3.2.6</a></li> <li><a href="#v326">Changes since 3.2.6</a></li>
@ -140,6 +141,61 @@
<div class="inner"> <div class="inner">
<div class="content"> <div class="content">
<a name="v328"></a><h3>Changes since 3.2.8</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14815">PHPBB3-14815</a>] - The facebook page link is not displayed properly in memberlist.php</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15643">PHPBB3-15643</a>] - $phpbb_filesystem-&gt;resolve_path() may trigger open_basedir restriction</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15902">PHPBB3-15902</a>] - Out of range error with Sphinx search</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16056">PHPBB3-16056</a>] - JPEG dimensions undetectable for some kind of jpeg files</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16076">PHPBB3-16076</a>] - Limit attachment size by extension group</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16141">PHPBB3-16141</a>] - plupload chunk_size calculation incorrect when one or more settings are 'unlimited'</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16150">PHPBB3-16150</a>] - Post title link urls not reliable when shared</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16156">PHPBB3-16156</a>] - Bots see both register and logout links in the navbar</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16157">PHPBB3-16157</a>] - Incorrect FORM_INVALID error message while sending email form</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16181">PHPBB3-16181</a>] - OAuth provider id needs to be quoted</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16184">PHPBB3-16184</a>] - Mark read button only works once</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16199">PHPBB3-16199</a>] - Guest posting CAPTCHA is being generated with no guest posting auth</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16209">PHPBB3-16209</a>] - Nginx example configuration file blocks an image in the ACP</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16210">PHPBB3-16210</a>] - Terms of use should not be skippable</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16211">PHPBB3-16211</a>] - COPPA should not be skippable</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16216">PHPBB3-16216</a>] - Disable xdebug in travis builds</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16217">PHPBB3-16217</a>] - Enable opcache in travis CI builds</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16228">PHPBB3-16228</a>] - BBCode definitions with an optional attribute and a non-TEXT content are not merged correctly</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16242">PHPBB3-16242</a>] - Redirect loop when install folder doesn't exist</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16252">PHPBB3-16252</a>] - Ignore non-BBCodes when looking for unauthorized markup</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16257">PHPBB3-16257</a>] - Typo in Email Settings section</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16258">PHPBB3-16258</a>] - Sample Sphinx configuration file causes delta index to only include the most recent post</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16084">PHPBB3-16084</a>] - Pointless radio button for database backup in 3.2.7 </li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16139">PHPBB3-16139</a>] - Add core.viewtopic_modify_quick_reply_template_vars</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16140">PHPBB3-16140</a>] - Add new event to UCP Edit Profile Page</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16143">PHPBB3-16143</a>] - Add core events for move topics</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16144">PHPBB3-16144</a>] - NO_STYLE_DATA - Provide extra fallback to board's default style for $user.</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16146">PHPBB3-16146</a>] - Add core event for after move the forum</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16148">PHPBB3-16148</a>] - Add template events to acp_groups.html</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16151">PHPBB3-16151</a>] - Enable Emojis and rich text in forum name</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16153">PHPBB3-16153</a>] - Enable Emojis and rich text in topic title</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16159">PHPBB3-16159</a>] - Wrap post times in html time tag</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16174">PHPBB3-16174</a>] - Event for disabling cookie creation</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16182">PHPBB3-16182</a>] - Add core.generate_smilies_modify_rowset</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16183">PHPBB3-16183</a>] - Add core.generate_smilies_count_sql_before</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16203">PHPBB3-16203</a>] - Enable Emojis and rich text in sent Emails</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16247">PHPBB3-16247</a>] - Quote PM has no identifier</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16251">PHPBB3-16251</a>] - Shortened link text shouldn't override custom plugins</li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15422">PHPBB3-15422</a>] - Remove the unnecessary helpline function and help_line variable</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16147">PHPBB3-16147</a>] - Updated tokens legend in BBCodes ACP</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16160">PHPBB3-16160</a>] - Add script for generating package json file</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16172">PHPBB3-16172</a>] - Add &quot;Rank:&quot; or &quot;Group rank:&quot; in the memberlist</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16224">PHPBB3-16224</a>] - Update composer dependencies</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16246">PHPBB3-16246</a>] - Prettify and update README Automated Testing section</li>
</ul>
<a name="v328rc1"></a><h3>Changes since 3.2.8-RC1</h3> <a name="v328rc1"></a><h3>Changes since 3.2.8-RC1</h3>
<h4>Bug</h4> <h4>Bug</h4>
<ul> <ul>

View file

@ -70,7 +70,7 @@ http {
} }
# Deny access to internal phpbb files. # Deny access to internal phpbb files.
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb|store|vendor) { location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb(?!\w+)|store|vendor) {
deny all; deny all;
# deny was ignored before 0.8.40 for connections over IPv6. # deny was ignored before 0.8.40 for connections over IPv6.
# Use internal directive to prohibit access on older versions. # Use internal directive to prohibit access on older versions.

View file

@ -41,7 +41,7 @@ source source_phpbb_{SPHINX_ID}_main
} }
source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main
{ {
sql_query_pre = sql_query_pre = SET NAMES 'utf8'
sql_query_range = sql_query_range =
sql_range_step = sql_range_step =
sql_query = SELECT \ sql_query = SELECT \
@ -61,7 +61,7 @@ source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main
WHERE \ WHERE \
p.topic_id = t.topic_id \ p.topic_id = t.topic_id \
AND p.post_id >= ( SELECT max_doc_id FROM phpbb_sphinx WHERE counter_id=1 ) AND p.post_id >= ( SELECT max_doc_id FROM phpbb_sphinx WHERE counter_id=1 )
sql_query_pre = sql_query_post_index =
} }
index index_phpbb_{SPHINX_ID}_main index index_phpbb_{SPHINX_ID}_main
{ {

View file

@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
*/ */
// phpBB Version // phpBB Version
@define('PHPBB_VERSION', '3.2.9-dev'); @define('PHPBB_VERSION', '3.2.10-dev');
// QA-related // QA-related
// define('PHPBB_QA', 1); // define('PHPBB_QA', 1);

View file

@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms);
$convertor_data = array( $convertor_data = array(
'forum_name' => 'phpBB 2.0.x', 'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.3', 'version' => '1.0.3',
'phpbb_version' => '3.2.8', 'phpbb_version' => '3.2.9',
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>', 'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
'dbms' => $dbms, 'dbms' => $dbms,
'dbhost' => $dbhost, 'dbhost' => $dbhost,

View file

@ -23,7 +23,7 @@ if (php_sapi_name() !== 'cli')
define('IN_PHPBB', true); define('IN_PHPBB', true);
define('IN_INSTALL', true); define('IN_INSTALL', true);
define('PHPBB_ENVIRONMENT', 'production'); define('PHPBB_ENVIRONMENT', 'production');
define('PHPBB_VERSION', '3.2.8'); define('PHPBB_VERSION', '3.2.9-RC1');
$phpbb_root_path = __DIR__ . '/../'; $phpbb_root_path = __DIR__ . '/../';
$phpEx = substr(strrchr(__FILE__, '.'), 1); $phpEx = substr(strrchr(__FILE__, '.'), 1);

View file

@ -185,7 +185,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofi
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_notifications', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_notifications', '1');
@ -279,7 +279,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.9-dev'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.10-dev');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
@ -421,6 +421,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgname', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgpasswd', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgpasswd', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgprofileinfo', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgprofileinfo', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_download', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_download', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_emoji', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_hideonline', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_hideonline', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_ignoreflood', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_ignoreflood', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_masspm', 1); INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_masspm', 1);

View file

@ -590,7 +590,7 @@ $lang = array_merge($lang, array(
'SMTP_PORT' => 'SMTP server port', 'SMTP_PORT' => 'SMTP server port',
'SMTP_PORT_EXPLAIN' => 'Only change this if you know your SMTP server is on a different port.', 'SMTP_PORT_EXPLAIN' => 'Only change this if you know your SMTP server is on a different port.',
'SMTP_SERVER' => 'SMTP server address', 'SMTP_SERVER' => 'SMTP server address',
'SMTP_SERVER_EXPLAIN' => 'Do not provide a protocol (<samp>ssl://</samp> or <samp>tsl://</samp>) unless your mail host tells you to do so.', 'SMTP_SERVER_EXPLAIN' => 'Do not provide a protocol (<samp>ssl://</samp> or <samp>tls://</samp>) unless your mail host tells you to do so.',
'SMTP_SETTINGS' => 'SMTP settings', 'SMTP_SETTINGS' => 'SMTP settings',
'SMTP_USERNAME' => 'SMTP username', 'SMTP_USERNAME' => 'SMTP username',
'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.', 'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.',

View file

@ -79,6 +79,7 @@ $lang = array_merge($lang, array(
'ACL_U_SAVEDRAFTS' => 'Can save drafts', 'ACL_U_SAVEDRAFTS' => 'Can save drafts',
'ACL_U_CHGCENSORS' => 'Can disable word censors', 'ACL_U_CHGCENSORS' => 'Can disable word censors',
'ACL_U_SIG' => 'Can use signature', 'ACL_U_SIG' => 'Can use signature',
'ACL_U_EMOJI' => 'Can use emoji and rich text characters in topic title',
'ACL_U_SENDPM' => 'Can send private messages', 'ACL_U_SENDPM' => 'Can send private messages',
'ACL_U_MASSPM' => 'Can send private messages to multiple users', 'ACL_U_MASSPM' => 'Can send private messages to multiple users',

View file

@ -49,6 +49,8 @@ class remote extends \phpbb\avatar\driver\driver
*/ */
public function process_form($request, $template, $user, $row, &$error) public function process_form($request, $template, $user, $row, &$error)
{ {
global $phpbb_dispatcher;
$url = $request->variable('avatar_remote_url', ''); $url = $request->variable('avatar_remote_url', '');
$width = $request->variable('avatar_remote_width', 0); $width = $request->variable('avatar_remote_width', 0);
$height = $request->variable('avatar_remote_height', 0); $height = $request->variable('avatar_remote_height', 0);
@ -84,6 +86,24 @@ class remote extends \phpbb\avatar\driver\driver
return false; return false;
} }
/**
* Event to make custom validation of avatar upload
*
* @event core.ucp_profile_avatar_upload_validation
* @var string url Image url
* @var string width Image width
* @var string height Image height
* @var array error Error message array
* @since 3.2.9-RC1
*/
$vars = array('url', 'width', 'height', 'error');
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_avatar_upload_validation', compact($vars)));
if (!empty($error))
{
return false;
}
// Check if this url looks alright // Check if this url looks alright
// Do not allow specifying the port (see RFC 3986) or IP addresses // Do not allow specifying the port (see RFC 3986) or IP addresses
if (!preg_match('#^(http|https|ftp)://(?:(.*?\.)*?[a-z0-9\-]+?\.[a-z]{2,4}|(?:\d{1,3}\.){3,5}\d{1,3}):?([0-9]*?).*?\.('. implode('|', $this->allowed_extensions) . ')$#i', $url) || if (!preg_match('#^(http|https|ftp)://(?:(.*?\.)*?[a-z0-9\-]+?\.[a-z]{2,4}|(?:\d{1,3}\.){3,5}\d{1,3}):?([0-9]*?).*?\.('. implode('|', $this->allowed_extensions) . ')$#i', $url) ||

View file

@ -0,0 +1,44 @@
<?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 user_emoji_permission extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
$sql = 'SELECT auth_option_id
FROM ' . ACL_OPTIONS_TABLE . "
WHERE auth_option = 'u_emoji'";
$result = $this->db->sql_query($sql);
$auth_option_id = $this->db->sql_fetchfield('auth_option_id');
$this->db->sql_freeresult($result);
return $auth_option_id !== false;
}
static public function depends_on()
{
return [
'\phpbb\db\migration\data\v32x\v329rc1',
];
}
public function update_data()
{
return [
['permission.add', ['u_emoji']],
['permission.permission_set', ['REGISTERED', 'u_emoji', 'group']],
];
}
}

View file

@ -0,0 +1,36 @@
<?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 v329rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return phpbb_version_compare($this->config['version'], '3.2.9-RC1', '>=');
}
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v32x\v328',
);
}
public function update_data()
{
return array(
array('config.update', array('version', '3.2.9-RC1')),
);
}
}

View file

@ -234,6 +234,7 @@ class permissions
'u_savedrafts' => array('lang' => 'ACL_U_SAVEDRAFTS', 'cat' => 'post'), 'u_savedrafts' => array('lang' => 'ACL_U_SAVEDRAFTS', 'cat' => 'post'),
'u_chgcensors' => array('lang' => 'ACL_U_CHGCENSORS', 'cat' => 'post'), 'u_chgcensors' => array('lang' => 'ACL_U_CHGCENSORS', 'cat' => 'post'),
'u_sig' => array('lang' => 'ACL_U_SIG', 'cat' => 'post'), 'u_sig' => array('lang' => 'ACL_U_SIG', 'cat' => 'post'),
'u_emoji' => array('lang' => 'ACL_U_EMOJI', 'cat' => 'post'),
'u_sendpm' => array('lang' => 'ACL_U_SENDPM', 'cat' => 'pm'), 'u_sendpm' => array('lang' => 'ACL_U_SENDPM', 'cat' => 'pm'),
'u_masspm' => array('lang' => 'ACL_U_MASSPM', 'cat' => 'pm'), 'u_masspm' => array('lang' => 'ACL_U_MASSPM', 'cat' => 'pm'),

View file

@ -698,7 +698,7 @@ class fulltext_sphinx
$this->sphinx->SetFilter('deleted', array(0)); $this->sphinx->SetFilter('deleted', array(0));
$this->sphinx->SetLimits((int) $start, (int) $per_page, SPHINX_MAX_MATCHES); $this->sphinx->SetLimits((int) $start, (int) $per_page, max(SPHINX_MAX_MATCHES, (int) $start + $per_page));
$result = $this->sphinx->Query($search_query_prefix . $this->sphinx->sphinx_clean_search_string(str_replace('&quot;', '"', $this->search_query)), $this->indexes); $result = $this->sphinx->Query($search_query_prefix . $this->sphinx->sphinx_clean_search_string(str_replace('&quot;', '"', $this->search_query)), $this->indexes);
// Could be connection to localhost:9312 failed (errno=111, // Could be connection to localhost:9312 failed (errno=111,
@ -729,7 +729,7 @@ class fulltext_sphinx
{ {
$start = floor(($result_count - 1) / $per_page) * $per_page; $start = floor(($result_count - 1) / $per_page) * $per_page;
$this->sphinx->SetLimits((int) $start, (int) $per_page, SPHINX_MAX_MATCHES); $this->sphinx->SetLimits((int) $start, (int) $per_page, max(SPHINX_MAX_MATCHES, (int) $start + $per_page));
$result = $this->sphinx->Query($search_query_prefix . $this->sphinx->sphinx_clean_search_string(str_replace('&quot;', '"', $this->search_query)), $this->indexes); $result = $this->sphinx->Query($search_query_prefix . $this->sphinx->sphinx_clean_search_string(str_replace('&quot;', '"', $this->search_query)), $this->indexes);
// Could be connection to localhost:9312 failed (errno=111, // Could be connection to localhost:9312 failed (errno=111,

View file

@ -1184,21 +1184,24 @@ if ($submit || $preview || $refresh)
/** /**
* Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR. * Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR.
* Using their Numeric Character Reference's Hexadecimal notation. * Using their Numeric Character Reference's Hexadecimal notation.
* Check the permissions for posting Emojis first.
*/ */
$post_data['post_subject'] = utf8_encode_ucr($post_data['post_subject']); if ($auth->acl_get('u_emoji'))
/**
* This should never happen again.
* Leaving the fallback here just in case there will be the need of it.
*
* Check for out-of-bounds characters that are currently
* not supported by utf8_bin in MySQL
*/
if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $post_data['post_subject'], $matches))
{ {
$character_list = implode('<br>', $matches[0]); $post_data['post_subject'] = utf8_encode_ucr($post_data['post_subject']);
}
else
{
/**
* Check for out-of-bounds characters that are currently
* not supported by utf8_bin in MySQL
*/
if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $post_data['post_subject'], $matches))
{
$character_list = implode('<br>', $matches[0]);
$error[] = $user->lang('UNSUPPORTED_CHARACTERS_SUBJECT', $character_list); $error[] = $user->lang('UNSUPPORTED_CHARACTERS_SUBJECT', $character_list);
}
} }
$post_data['poll_last_vote'] = (isset($post_data['poll_last_vote'])) ? $post_data['poll_last_vote'] : 0; $post_data['poll_last_vote'] = (isset($post_data['poll_last_vote'])) ? $post_data['poll_last_vote'] : 0;

View file

@ -21,8 +21,8 @@
# General Information about this style # General Information about this style
name = prosilver name = prosilver
copyright = © phpBB Limited, 2007 copyright = © phpBB Limited, 2007
style_version = 3.2.8 style_version = 3.2.9
phpbb_version = 3.2.8 phpbb_version = 3.2.9
# Defining a different template bitfield # Defining a different template bitfield
# template_bitfield = //g= # template_bitfield = //g=

View file

@ -38,7 +38,7 @@
<td class="attach-name"> <td class="attach-name">
<span class="file-name ellipsis-text"></span> <span class="file-name ellipsis-text"></span>
<span class="attach-controls"> <span class="attach-controls">
<input type="button" value="{L_PLACE_INLINE}" class="button2 hidden file-inline-bbcode" />&nbsp; {% if S_BBCODE_ALLOWED %}<input type="button" value="{{ lang('PLACE_INLINE') }}" class="button2 hidden file-inline-bbcode" />&nbsp;{% endif %}
<input type="button" value="{L_DELETE_FILE}" class="button2 file-delete" /> <input type="button" value="{L_DELETE_FILE}" class="button2 file-delete" />
</span> </span>
<span class="clear"></span> <span class="clear"></span>
@ -64,7 +64,7 @@
<span class="file-name ellipsis-text"><a href="{attach_row.U_VIEW_ATTACHMENT}">{attach_row.FILENAME}</a></span> <span class="file-name ellipsis-text"><a href="{attach_row.U_VIEW_ATTACHMENT}">{attach_row.FILENAME}</a></span>
{% EVENT posting_attach_body_attach_row_controls_prepend %} {% EVENT posting_attach_body_attach_row_controls_prepend %}
<span class="attach-controls"> <span class="attach-controls">
<!-- IF S_INLINE_ATTACHMENT_OPTIONS --><input type="button" value="{L_PLACE_INLINE}" class="button2 file-inline-bbcode" />&nbsp; <!-- ENDIF --> {% if S_BBCODE_ALLOWED and S_INLINE_ATTACHMENT_OPTIONS %}<input type="button" value="{{ lang('PLACE_INLINE') }}" class="button2 file-inline-bbcode" />&nbsp;{% endif %}
<input type="submit" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" class="button2 file-delete" /> <input type="submit" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" class="button2 file-delete" />
</span> </span>
{% EVENT posting_attach_body_attach_row_controls_append %} {% EVENT posting_attach_body_attach_row_controls_append %}