mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-15 05:04:09 +02:00
[ticket/12458] Apply Squiz.WhiteSpace.SuperfluousWhitespace.* to legacy code.
* There MUST NOT be trailing whitespace at the end of lines. * There MUST NOT be whitespace before the first content of a file. * There MUST NOT be whitespace after the last content of a file. * Functions MUST NOT contain multiple empty lines in a row. PHPBB3-12458
This commit is contained in:
@@ -619,7 +619,6 @@ class ucp_main
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $user->lang['UCP_MAIN_' . strtoupper($mode)],
|
||||
|
||||
@@ -691,7 +690,6 @@ class ucp_main
|
||||
AND t.topic_id = tw.topic_id
|
||||
AND ' . $db->sql_in_set('t.forum_id', $forbidden_forum_ary, true, true),
|
||||
|
||||
|
||||
'ORDER_BY' => 't.topic_last_post_time DESC'
|
||||
);
|
||||
|
||||
|
@@ -99,7 +99,7 @@ class ucp_notifications
|
||||
|
||||
meta_refresh(3, $this->u_action);
|
||||
$message = $user->lang['NOTIFICATIONS_MARK_ALL_READ_SUCCESS'];
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new \phpbb\json_response();
|
||||
|
@@ -172,7 +172,6 @@ class ucp_pm
|
||||
trigger_error('NO_AUTH_READ_HOLD_MESSAGE');
|
||||
}
|
||||
|
||||
|
||||
// First Handle Mark actions and moving messages
|
||||
$submit_mark = (isset($_POST['submit_mark'])) ? true : false;
|
||||
$move_pm = (isset($_POST['move_pm'])) ? true : false;
|
||||
|
@@ -586,7 +586,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
);
|
||||
$s_hidden_fields .= build_address_field($address_list);
|
||||
|
||||
|
||||
confirm_box(false, 'SAVE_DRAFT', $s_hidden_fields);
|
||||
}
|
||||
}
|
||||
@@ -748,7 +747,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
$return_box_url = ($action === 'post' || $action === 'edit') ? $outbox_folder_url : $inbox_folder_url;
|
||||
$return_box_lang = ($action === 'post' || $action === 'edit') ? 'PM_OUTBOX' : 'PM_INBOX';
|
||||
|
||||
|
||||
$save_message = ($action === 'edit') ? $user->lang['MESSAGE_EDITED'] : $user->lang['MESSAGE_STORED'];
|
||||
$message = $save_message . '<br /><br />' . $user->lang('VIEW_PRIVATE_MESSAGE', '<a href="' . $return_message_url . '">', '</a>');
|
||||
|
||||
@@ -1006,7 +1004,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
// Build hidden address list
|
||||
$s_hidden_address_field = build_address_field($address_list);
|
||||
|
||||
|
||||
$bbcode_checked = (isset($enable_bbcode)) ? !$enable_bbcode : (($config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode')) ? !$user->optionget('bbcode') : 1);
|
||||
$smilies_checked = (isset($enable_smilies)) ? !$enable_smilies : (($config['allow_smilies'] && $auth->acl_get('u_pm_smilies')) ? !$user->optionget('smilies') : 1);
|
||||
$urls_checked = (isset($enable_urls)) ? !$enable_urls : 0;
|
||||
|
@@ -65,7 +65,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
trigger_error($message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Add Folder
|
||||
if (isset($_POST['addfolder']))
|
||||
{
|
||||
@@ -226,7 +226,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
// Move Messages
|
||||
case 1:
|
||||
$num_moved = move_pm($user->data['user_id'], $user->data['message_limit'], $msg_ids, $move_to, $remove_folder_id);
|
||||
|
||||
|
||||
// Something went wrong, only partially moved?
|
||||
if ($num_moved != $folder_row['pm_count'])
|
||||
{
|
||||
@@ -418,7 +418,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
$result = $db->sql_query($sql);
|
||||
$num_messages = (int) $db->sql_fetchfield('num_messages');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$folder[PRIVMSGS_INBOX] = array(
|
||||
'folder_name' => $user->lang['PM_INBOX'],
|
||||
'message_status' => $user->lang('FOLDER_MESSAGE_STATUS', $user->lang('MESSAGES_COUNT', (int) $user->data['message_limit']), $num_messages),
|
||||
@@ -691,7 +691,7 @@ function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
|
||||
function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule_conditions)
|
||||
{
|
||||
global $db, $template, $auth, $user;
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_COND_DEFINED' => true,
|
||||
'S_COND_SELECT' => (!$hardcoded && isset($global_rule_conditions[$rule_option])) ? true : false)
|
||||
@@ -715,7 +715,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
||||
{
|
||||
case 'text':
|
||||
$rule_string = utf8_normalize_nfc(request_var('rule_string', '', true));
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_TEXT_CONDITION' => true,
|
||||
'CURRENT_STRING' => $rule_string,
|
||||
@@ -729,7 +729,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
||||
case 'user':
|
||||
$rule_user_id = request_var('rule_user_id', 0);
|
||||
$rule_string = utf8_normalize_nfc(request_var('rule_string', '', true));
|
||||
|
||||
|
||||
if ($rule_string && !$rule_user_id)
|
||||
{
|
||||
$sql = 'SELECT user_id
|
||||
@@ -791,10 +791,10 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
||||
{
|
||||
$sql .= 'WHERE';
|
||||
}
|
||||
|
||||
$sql .= " (g.group_name NOT IN ('GUESTS', 'BOTS') OR g.group_type <> " . GROUP_SPECIAL . ')
|
||||
|
||||
$sql .= " (g.group_name NOT IN ('GUESTS', 'BOTS') OR g.group_type <> " . GROUP_SPECIAL . ')
|
||||
ORDER BY g.group_type DESC, g.group_name ASC';
|
||||
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$s_group_options = '';
|
||||
@@ -807,7 +807,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
||||
|
||||
$s_class = ($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '';
|
||||
$s_selected = ($row['group_id'] == $rule_group_id) ? ' selected="selected"' : '';
|
||||
|
||||
|
||||
$s_group_options .= '<option value="' . $row['group_id'] . '"' . $s_class . $s_selected . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
@@ -845,7 +845,7 @@ function show_defined_rules($user_id, $check_lang, $rule_lang, $action_lang, $fo
|
||||
WHERE user_id = ' . $user_id . '
|
||||
ORDER BY rule_id ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
||||
$count = 0;
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
|
@@ -274,7 +274,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
{
|
||||
$template->assign_block_vars('dl_method', $method);
|
||||
}
|
||||
|
||||
|
||||
foreach ($attachments as $attachment)
|
||||
{
|
||||
$template->assign_block_vars('attachment', array(
|
||||
|
@@ -224,15 +224,15 @@ class ucp_zebra
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$message = ($updated) ? $user->lang[$l_mode . '_UPDATED'] : implode('<br />', $error);
|
||||
|
||||
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'success' => $updated,
|
||||
|
||||
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $message,
|
||||
'REFRESH_DATA' => array(
|
||||
|
Reference in New Issue
Block a user