mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-08 15:20:44 +02:00
Compare commits
22 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
2fdd46b364 | ||
|
4f39da4343 | ||
|
a2a0038368 | ||
|
cb833db5fb | ||
|
4f007321e1 | ||
|
3aa4b67173 | ||
|
25c80df156 | ||
|
e7a6ed20e8 | ||
|
502407a1dd | ||
|
03757a0663 | ||
|
36c370947c | ||
|
fa099867a8 | ||
|
88277e2d21 | ||
|
48eb74cfcd | ||
|
693d008851 | ||
|
97e9357153 | ||
|
706a10d4cf | ||
|
ec694bf8bd | ||
|
803ed6050f | ||
|
48d038ead4 | ||
|
6320da67e4 | ||
|
c44c398626 |
@@ -2,9 +2,9 @@
|
||||
|
||||
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
|
||||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="3.2.9-RC1" />
|
||||
<property name="newversion" value="3.2.9" />
|
||||
<property name="prevversion" value="3.2.8" />
|
||||
<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" />
|
||||
<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.9-RC1" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
|
@@ -156,6 +156,7 @@ $u_permissions = array(
|
||||
'u_download' => array(0, 1),
|
||||
'u_attach' => array(0, 1),
|
||||
'u_sig' => array(0, 1),
|
||||
'u_emoji' => array(0, 1),
|
||||
'u_pm_attach' => array(0, 1),
|
||||
'u_pm_bbcode' => array(0, 1),
|
||||
'u_pm_smilies' => array(0, 1),
|
||||
|
@@ -50,6 +50,7 @@
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ul>
|
||||
<li><a href="#v329rc1">Changes since 3.2.9-RC1</a></li>
|
||||
<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="#v327">Changes since 3.2.7</a></li>
|
||||
@@ -141,6 +142,30 @@
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<a name="v329rc1"></a><h3>Changes since 3.2.9-RC1</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15592">PHPBB3-15592</a>] - "Place inline" button appears when BBcode is disabled (Post settings)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16269">PHPBB3-16269</a>] - Sphinx backend indexes HTML markup as keywords</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16282">PHPBB3-16282</a>] - Default jQuery CDN URL is outdated on new installs</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16271">PHPBB3-16271</a>] - Add support for 3.3.x API documentation</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16279">PHPBB3-16279</a>] - Add permission for Emojii in topic title</li>
|
||||
</ul>
|
||||
<h4>Security</h4>
|
||||
<ul>
|
||||
<li>[SECURITY-249] - Group avatar overwrite on invalid submit</li>
|
||||
<li>[SECURITY-250] - Group leader can be tricked into approving user</li>
|
||||
</ul>
|
||||
<h4>Hardening</h4>
|
||||
<ul>
|
||||
<li>[SECURITY-251] - Unwanted move of PMs to folders</li>
|
||||
<li>[SECURITY-252] - PMs of unsuspecting users can be marked as important</li>
|
||||
<li>[SECURITY-253] - PM export without proper validation</li>
|
||||
</ul>
|
||||
|
||||
<a name="v328"></a><h3>Changes since 3.2.8</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
|
@@ -74,6 +74,7 @@ index index_phpbb_{SPHINX_ID}_main
|
||||
charset_table = U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF
|
||||
min_prefix_len = 0
|
||||
min_infix_len = 0
|
||||
html_strip = 1
|
||||
}
|
||||
index index_phpbb_{SPHINX_ID}_delta : index_phpbb_{SPHINX_ID}_main
|
||||
{
|
||||
|
@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
@define('PHPBB_VERSION', '3.2.9-RC1');
|
||||
@define('PHPBB_VERSION', '3.2.9');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@@ -534,7 +534,12 @@ class ucp_groups
|
||||
'teampage' => $group_row['group_teampage'],
|
||||
);
|
||||
|
||||
if ($config['allow_avatar'])
|
||||
if (!check_form_key('ucp_groups'))
|
||||
{
|
||||
$error[] = $user->lang['FORM_INVALID'];
|
||||
}
|
||||
|
||||
if (!count($error) && $config['allow_avatar'])
|
||||
{
|
||||
// Handle avatar
|
||||
$driver_name = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', ''));
|
||||
@@ -556,11 +561,6 @@ class ucp_groups
|
||||
$error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
|
||||
}
|
||||
|
||||
if (!check_form_key('ucp_groups'))
|
||||
{
|
||||
$error[] = $user->lang['FORM_INVALID'];
|
||||
}
|
||||
|
||||
// Validate submitted colour value
|
||||
if ($colour_error = validate_data($submit_ary, array('colour' => array('hex_colour', true))))
|
||||
{
|
||||
@@ -875,6 +875,11 @@ class ucp_groups
|
||||
trigger_error($user->lang['NO_GROUP'] . $return_page);
|
||||
}
|
||||
|
||||
if (!check_form_key('ucp_groups'))
|
||||
{
|
||||
trigger_error($user->lang('FORM_INVALID') . $return_page);
|
||||
}
|
||||
|
||||
if (!($row = group_memberships($group_id, $user->data['user_id'])))
|
||||
{
|
||||
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
|
||||
|
@@ -193,6 +193,8 @@ class ucp_pm
|
||||
trigger_error('NO_AUTH_READ_HOLD_MESSAGE');
|
||||
}
|
||||
|
||||
add_form_key('ucp_pm_view');
|
||||
|
||||
// First Handle Mark actions and moving messages
|
||||
$submit_mark = (isset($_POST['submit_mark'])) ? true : false;
|
||||
$move_pm = (isset($_POST['move_pm'])) ? true : false;
|
||||
@@ -207,6 +209,11 @@ 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)
|
||||
{
|
||||
|
@@ -32,6 +32,8 @@ 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');
|
||||
|
||||
if (!$submit_export)
|
||||
{
|
||||
$user->add_lang('viewforum');
|
||||
@@ -197,6 +199,11 @@ function view_folder($id, $mode, $folder_id, $folder)
|
||||
$enclosure = $request->variable('enclosure', '');
|
||||
$delimiter = $request->variable('delimiter', '');
|
||||
|
||||
if (!check_form_key('ucp_pm_view_folder'))
|
||||
{
|
||||
trigger_error('FORM_INVALID');
|
||||
}
|
||||
|
||||
if ($export_type == 'CSV' && ($delimiter === '' || $enclosure === ''))
|
||||
{
|
||||
$template->assign_var('PROMPT', true);
|
||||
|
@@ -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.9-RC1');
|
||||
define('PHPBB_VERSION', '3.2.9');
|
||||
$phpbb_root_path = __DIR__ . '/../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
|
@@ -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_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_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_moderators', '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_path', 'files');
|
||||
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-RC1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.9');
|
||||
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');
|
||||
|
||||
@@ -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_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_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_ignoreflood', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_masspm', 1);
|
||||
|
@@ -79,6 +79,7 @@ $lang = array_merge($lang, array(
|
||||
'ACL_U_SAVEDRAFTS' => 'Can save drafts',
|
||||
'ACL_U_CHGCENSORS' => 'Can disable word censors',
|
||||
'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_MASSPM' => 'Can send private messages to multiple users',
|
||||
|
44
phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php
Normal file
44
phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php
Normal 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']],
|
||||
];
|
||||
}
|
||||
}
|
37
phpBB/phpbb/db/migration/data/v32x/v329.php
Normal file
37
phpBB/phpbb/db/migration/data/v32x/v329.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 v329 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return phpbb_version_compare($this->config['version'], '3.2.9', '>=');
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\phpbb\db\migration\data\v32x\v329rc1',
|
||||
'\phpbb\db\migration\data\v32x\user_emoji_permission',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.update', array('version', '3.2.9')),
|
||||
);
|
||||
}
|
||||
}
|
@@ -234,6 +234,7 @@ class permissions
|
||||
'u_savedrafts' => array('lang' => 'ACL_U_SAVEDRAFTS', 'cat' => 'post'),
|
||||
'u_chgcensors' => array('lang' => 'ACL_U_CHGCENSORS', '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_masspm' => array('lang' => 'ACL_U_MASSPM', 'cat' => 'pm'),
|
||||
|
@@ -335,6 +335,7 @@ class fulltext_sphinx
|
||||
array('charset_table', 'U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF'),
|
||||
array('min_prefix_len', '0'),
|
||||
array('min_infix_len', '0'),
|
||||
array('html_strip', '1'),
|
||||
),
|
||||
'index index_phpbb_' . $this->id . '_delta : index_phpbb_' . $this->id . '_main' => array(
|
||||
array('path', $this->config['fulltext_sphinx_data_path'] . 'index_phpbb_' . $this->id . '_delta'),
|
||||
|
@@ -1184,21 +1184,24 @@ if ($submit || $preview || $refresh)
|
||||
/**
|
||||
* Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR.
|
||||
* 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']);
|
||||
|
||||
/**
|
||||
* 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))
|
||||
if ($auth->acl_get('u_emoji'))
|
||||
{
|
||||
$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;
|
||||
|
@@ -38,7 +38,7 @@
|
||||
<td class="attach-name">
|
||||
<span class="file-name ellipsis-text"></span>
|
||||
<span class="attach-controls">
|
||||
<input type="button" value="{L_PLACE_INLINE}" class="button2 hidden file-inline-bbcode" />
|
||||
{% if S_BBCODE_ALLOWED %}<input type="button" value="{{ lang('PLACE_INLINE') }}" class="button2 hidden file-inline-bbcode" /> {% endif %}
|
||||
<input type="button" value="{L_DELETE_FILE}" class="button2 file-delete" />
|
||||
</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>
|
||||
{% EVENT posting_attach_body_attach_row_controls_prepend %}
|
||||
<span class="attach-controls">
|
||||
<!-- IF S_INLINE_ATTACHMENT_OPTIONS --><input type="button" value="{L_PLACE_INLINE}" class="button2 file-inline-bbcode" /> <!-- ENDIF -->
|
||||
{% if S_BBCODE_ALLOWED and S_INLINE_ATTACHMENT_OPTIONS %}<input type="button" value="{{ lang('PLACE_INLINE') }}" class="button2 file-inline-bbcode" /> {% endif %}
|
||||
<input type="submit" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" class="button2 file-delete" />
|
||||
</span>
|
||||
{% EVENT posting_attach_body_attach_row_controls_append %}
|
||||
|
@@ -54,4 +54,72 @@ class phpbb_functional_ucp_groups_test extends phpbb_functional_common_groups_te
|
||||
$this->assertContains($this->lang('GROUP_UPDATED'), $crawler->text());
|
||||
$this->assertEquals($teampage_settings, $this->get_teampage_settings());
|
||||
}
|
||||
|
||||
public function test_create_request_group()
|
||||
{
|
||||
$this->login();
|
||||
$this->admin_login();
|
||||
$this->add_lang('acp/groups');
|
||||
|
||||
$crawler = self::request('GET', 'adm/index.php?i=acp_groups&mode=manage&sid=' . $this->sid);
|
||||
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
|
||||
$crawler = self::submit($form, array('group_name' => 'request-group'));
|
||||
|
||||
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
|
||||
$crawler = self::submit($form, array('group_name' => 'request-group'));
|
||||
|
||||
$this->assertContainsLang('GROUP_CREATED', $crawler->filter('#main')->text());
|
||||
|
||||
$group_id = $this->get_group_id('request-group');
|
||||
|
||||
// Make admin group leader
|
||||
$crawler = self::request('GET', 'adm/index.php?i=acp_groups&mode=manage&action=list&g=' . $group_id . '&sid=' . $this->sid);
|
||||
$form = $crawler->filter('input[name=addusers]')->selectButton($this->lang('SUBMIT'))->form();
|
||||
$crawler = self::submit($form, [
|
||||
'leader' => 1,
|
||||
'usernames' => 'admin',
|
||||
]);
|
||||
|
||||
$this->assertContainsLang('GROUP_MODS_ADDED', $crawler->filter('#main')->text());
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends test_create_request_group
|
||||
*/
|
||||
public function test_request_group_membership()
|
||||
{
|
||||
$this->create_user('request-group-user');
|
||||
$this->login('request-group-user');
|
||||
$this->add_lang('groups');
|
||||
|
||||
$group_id = $this->get_group_id('request-group');
|
||||
|
||||
$crawler = self::request('GET', 'ucp.php?i=ucp_groups&mode=membership&sid=' . $this->sid);
|
||||
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
|
||||
$crawler = self::submit($form, ['selected' => $group_id, 'action' => 'join']);
|
||||
$this->assertContainsLang('GROUP_JOIN_PENDING_CONFIRM', $crawler->text());
|
||||
|
||||
$form = $crawler->selectButton($this->lang('YES'))->form();
|
||||
$crawler = self::submit($form);
|
||||
$this->assertContainsLang('GROUP_JOINED_PENDING', $crawler->text());
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends test_request_group_membership
|
||||
*/
|
||||
public function test_approve_group_membership()
|
||||
{
|
||||
$this->login();
|
||||
$this->add_lang('acp/groups');
|
||||
|
||||
$group_id = $this->get_group_id('request-group');
|
||||
$crawler = self::request('GET', 'ucp.php?i=ucp_groups&mode=manage&action=list&g=' . $group_id . '&sid=' . $this->sid);
|
||||
$form = $crawler->filter('input[name=update]')->selectButton($this->lang('SUBMIT'))->form();
|
||||
$crawler = self::submit($form, [
|
||||
'mark' => [$crawler->filter('input[name="mark[]"]')->first()->attr('value')],
|
||||
'action' => 'approve',
|
||||
]);
|
||||
|
||||
$this->assertContainsLang('USERS_APPROVED', $crawler->text());
|
||||
}
|
||||
}
|
||||
|
@@ -623,6 +623,25 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
return user_add($user_row);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get group ID
|
||||
*
|
||||
* @param string $group_name Group name
|
||||
* @return int Group id of specified group name
|
||||
*/
|
||||
protected function get_group_id($group_name)
|
||||
{
|
||||
$db = $this->get_db();
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_name = '" . $db->sql_escape($group_name) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_id = (int) $db->sql_fetchfield('group_id');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $group_id;
|
||||
}
|
||||
|
||||
protected function remove_user_group($group_name, $usernames)
|
||||
{
|
||||
global $db, $cache, $auth, $config, $phpbb_dispatcher, $phpbb_log, $phpbb_container, $phpbb_root_path, $phpEx;
|
||||
@@ -655,12 +674,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
require_once(__DIR__ . '/../../phpBB/includes/functions_user.php');
|
||||
}
|
||||
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_name = '" . $db->sql_escape($group_name) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_id = (int) $db->sql_fetchfield('group_id');
|
||||
$db->sql_freeresult($result);
|
||||
$group_id = $this->get_group_id($group_name);
|
||||
|
||||
return group_user_del($group_id, false, $usernames, $group_name);
|
||||
}
|
||||
@@ -700,12 +714,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
require_once(__DIR__ . '/../../phpBB/includes/functions_user.php');
|
||||
}
|
||||
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_name = '" . $db->sql_escape($group_name) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_id = (int) $db->sql_fetchfield('group_id');
|
||||
$db->sql_freeresult($result);
|
||||
$group_id = $this->get_group_id($group_name);
|
||||
|
||||
return group_user_add($group_id, false, $usernames, $group_name, $default, $leader);
|
||||
}
|
||||
|
Reference in New Issue
Block a user