mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 10:16:36 +02:00
Merge remote-tracking branch 'phpbb/develop' into feature/softdelete-1-permission
* phpbb/develop: (704 commits) [ticket/11630] Improvements to the PHP lint pre-commit hook [feature/auth-refactor] Move auth providers to separate directory [ticket/11619] Use HTTP/1.0 because of lack of chunked-encoding handling. [ticket/11619] Some tests for get_remote_file(). [ticket/11617] Remove spaces and tabs from empty lines [ticket/11617] Missing U_ACTION in acp_captcha.php [feature/auth-refactor] Fix code style issue [feature/auth-refactor] Fix comment grammar [feature/auth-refactor] Fix the actual cause of test failures [ticket/10838] Fix URL for wiki and remove irrelevant line [ticket/10838] Remove php 5.4 and builtin server references [ticket/10838] Fix missing data [ticket/10838] separate database used mentioned in unit tests [ticket/11585] Make $auth_admin class property [feature/auth-refactor] A possible fix for the functional test failures [ticket/11566] Subsilver template error displayed after table headers [ticket/11566] Remove extra pair of brackets from conditional statement [ticket/11566] Check that guest doesn't have reporting permission by default [ticket/11566] Add captcha to report post template in subsilver [ticket/11566] Use the new constant CONFIRM_REPORT for captcha init ... Conflicts: phpBB/docs/sphinx.sample.conf phpBB/feed.php phpBB/styles/prosilver/template/search_results.html phpBB/styles/prosilver/template/viewforum_body.html
This commit is contained in:
@@ -114,7 +114,7 @@ class ucp_activate
|
||||
|
||||
$messenger->template('admin_welcome_activated', $user_row['user_lang']);
|
||||
|
||||
$messenger->to($user_row['user_email'], $user_row['username']);
|
||||
$messenger->set_addresses($user_row);
|
||||
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
|
@@ -212,8 +212,7 @@ class ucp_groups
|
||||
{
|
||||
$messenger->template('group_request', $row['user_lang']);
|
||||
|
||||
$messenger->to($row['user_email'], $row['username']);
|
||||
$messenger->im($row['user_jabber'], $row['username']);
|
||||
$messenger->set_addresses($row);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($row['username']),
|
||||
@@ -417,9 +416,11 @@ class ucp_groups
|
||||
|
||||
if ($group_id)
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_id = $group_id";
|
||||
$sql = 'SELECT g.*, t.teampage_position AS group_teampage
|
||||
FROM ' . GROUPS_TABLE . ' g
|
||||
LEFT JOIN ' . TEAMPAGE_TABLE . ' t
|
||||
ON (t.group_id = g.group_id)
|
||||
WHERE g.group_id = ' . $group_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$group_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
@@ -515,6 +516,8 @@ class ucp_groups
|
||||
'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0,
|
||||
'message_limit' => request_var('group_message_limit', 0),
|
||||
'max_recipients'=> request_var('group_max_recipients', 0),
|
||||
'legend' => $group_row['group_legend'],
|
||||
'teampage' => $group_row['group_teampage'],
|
||||
);
|
||||
|
||||
if ($config['allow_avatar'])
|
||||
@@ -548,6 +551,9 @@ class ucp_groups
|
||||
$submit_ary['avatar_width'] = 0;
|
||||
$submit_ary['avatar_height'] = 0;
|
||||
}
|
||||
|
||||
// Merge any avatars errors into the primary error array
|
||||
$error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
|
||||
}
|
||||
|
||||
if (!check_form_key('ucp_groups'))
|
||||
@@ -555,11 +561,21 @@ class ucp_groups
|
||||
$error[] = $user->lang['FORM_INVALID'];
|
||||
}
|
||||
|
||||
// Validate submitted colour value
|
||||
if ($colour_error = validate_data($submit_ary, array('colour' => array('hex_colour', true))))
|
||||
{
|
||||
// Replace "error" string with its real, localised form
|
||||
$error = array_merge($error, array_map(array(&$user, 'lang'), $colour_error));
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
// Only set the rank, colour, etc. if it's changed or if we're adding a new
|
||||
// group. This prevents existing group members being updated if no changes
|
||||
// were made.
|
||||
// However there are some attributes that need to be set everytime,
|
||||
// otherwise the group gets removed from the feature.
|
||||
$set_attributes = array('legend', 'teampage');
|
||||
|
||||
$group_attributes = array();
|
||||
$test_variables = array(
|
||||
@@ -571,13 +587,14 @@ class ucp_groups
|
||||
'avatar_height' => 'int',
|
||||
'receive_pm' => 'int',
|
||||
'legend' => 'int',
|
||||
'teampage' => 'int',
|
||||
'message_limit' => 'int',
|
||||
'max_recipients'=> 'int',
|
||||
);
|
||||
|
||||
foreach ($test_variables as $test => $type)
|
||||
{
|
||||
if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test] || isset($group_attributes['group_avatar']) && strpos($test, 'avatar') === 0))
|
||||
if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test] || isset($group_attributes['group_avatar']) && strpos($test, 'avatar') === 0 || in_array($test, $set_attributes)))
|
||||
{
|
||||
settype($submit_ary[$test], $type);
|
||||
$group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];
|
||||
@@ -587,6 +604,7 @@ class ucp_groups
|
||||
if (!($error = group_create($group_id, $group_type, $group_name, $group_desc, $group_attributes, $allow_desc_bbcode, $allow_desc_urls, $allow_desc_smilies)))
|
||||
{
|
||||
$cache->destroy('sql', GROUPS_TABLE);
|
||||
$cache->destroy('sql', TEAMPAGE_TABLE);
|
||||
|
||||
$message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED';
|
||||
trigger_error($user->lang[$message] . $return_page);
|
||||
@@ -673,8 +691,11 @@ class ucp_groups
|
||||
}
|
||||
}
|
||||
|
||||
// Merge any avatars errors into the primary error array
|
||||
$error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
|
||||
if (isset($phpbb_avatar_manager) && !$update)
|
||||
{
|
||||
// Merge any avatars errors into the primary error array
|
||||
$error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_EDIT' => true,
|
||||
|
@@ -200,6 +200,10 @@ class ucp_notifications
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
strtoupper($block) . '_COLS' => sizeof($notification_methods) + 2,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -265,19 +265,16 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
// Passworded forum?
|
||||
if ($post['forum_id'])
|
||||
{
|
||||
$sql = 'SELECT forum_password
|
||||
$sql = 'SELECT forum_id, forum_name, forum_password
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_id = ' . (int) $post['forum_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
$forum_password = (string) $db->sql_fetchfield('forum_password');
|
||||
$forum_data = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($forum_password)
|
||||
if (!empty($forum_data['forum_password']))
|
||||
{
|
||||
login_forum_box(array(
|
||||
'forum_id' => $post['forum_id'],
|
||||
'forum_password' => $forum_password,
|
||||
));
|
||||
login_forum_box($forum_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -94,8 +94,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
// Editing information
|
||||
if ($message_row['message_edit_count'] && $config['display_last_edited'])
|
||||
{
|
||||
$l_edit_time_total = ($message_row['message_edit_count'] == 1) ? $user->lang['EDITED_TIME_TOTAL'] : $user->lang['EDITED_TIMES_TOTAL'];
|
||||
$l_edited_by = '<br /><br />' . sprintf($l_edit_time_total, (!$message_row['message_edit_user']) ? $message_row['username'] : $message_row['message_edit_user'], $user->format_date($message_row['message_edit_time'], false, true), $message_row['message_edit_count']);
|
||||
$l_edited_by = '<br /><br />' . $user->lang('EDITED_TIMES_TOTAL', (int) $message_row['message_edit_count'], (!$message_row['message_edit_user']) ? $message_row['username'] : $message_row['message_edit_user'], $user->format_date($message_row['message_edit_time'], false, true));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -175,8 +175,7 @@ class ucp_profile
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$messenger->template('admin_activate', $row['user_lang']);
|
||||
$messenger->to($row['user_email'], $row['username']);
|
||||
$messenger->im($row['user_jabber'], $row['username']);
|
||||
$messenger->set_addresses($row);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($data['username']),
|
||||
|
@@ -384,8 +384,7 @@ class ucp_register
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$messenger->template('admin_activate', $row['user_lang']);
|
||||
$messenger->to($row['user_email'], $row['username']);
|
||||
$messenger->im($row['user_jabber'], $row['username']);
|
||||
$messenger->set_addresses($row);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($data['username']),
|
||||
@@ -457,6 +456,7 @@ class ucp_register
|
||||
'S_LANG_OPTIONS' => language_select($data['lang']),
|
||||
'S_TZ_OPTIONS' => $timezone_selects['tz_select'],
|
||||
'S_TZ_DATE_OPTIONS' => $timezone_selects['tz_dates'],
|
||||
'S_TZ_PRESELECT' => !$submit,
|
||||
'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh']) ? true : false,
|
||||
'S_REGISTRATION' => true,
|
||||
'S_COPPA' => $coppa,
|
||||
|
@@ -29,6 +29,11 @@ class ucp_remind
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $db, $user, $auth, $template;
|
||||
|
||||
if (!$config['allow_password_reset'])
|
||||
{
|
||||
trigger_error($user->lang('UCP_PASSWORD_RESET_DISABLED', '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>'));
|
||||
}
|
||||
|
||||
$username = request_var('username', '', true);
|
||||
$email = strtolower(request_var('email', ''));
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
@@ -94,8 +99,7 @@ class ucp_remind
|
||||
|
||||
$messenger->template('user_activate_passwd', $user_row['user_lang']);
|
||||
|
||||
$messenger->to($user_row['user_email'], $user_row['username']);
|
||||
$messenger->im($user_row['user_jabber'], $user_row['username']);
|
||||
$messenger->set_addresses($user_row);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($user_row['username']),
|
||||
|
@@ -91,7 +91,7 @@ class ucp_resend
|
||||
if ($config['require_activation'] == USER_ACTIVATION_SELF || $coppa)
|
||||
{
|
||||
$messenger->template(($coppa) ? 'coppa_resend_inactive' : 'user_resend_inactive', $user_row['user_lang']);
|
||||
$messenger->to($user_row['user_email'], $user_row['username']);
|
||||
$messenger->set_addresses($user_row);
|
||||
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
@@ -126,8 +126,7 @@ class ucp_resend
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$messenger->template('admin_activate', $row['user_lang']);
|
||||
$messenger->to($row['user_email'], $row['username']);
|
||||
$messenger->im($row['user_jabber'], $row['username']);
|
||||
$messenger->set_addresses($row);
|
||||
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
|
Reference in New Issue
Block a user