mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/avatars] Remove trailing whitespace from avatar code
PHPBB3-10018
This commit is contained in:
parent
2302cd7a42
commit
a9e0aea4b1
6 changed files with 16 additions and 17 deletions
|
@ -329,7 +329,7 @@ class acp_groups
|
||||||
{
|
{
|
||||||
$submit_ary['founder_manage'] = isset($_REQUEST['group_founder_manage']) ? 1 : 0;
|
$submit_ary['founder_manage'] = isset($_REQUEST['group_founder_manage']) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($config['allow_avatar'])
|
if ($config['allow_avatar'])
|
||||||
{
|
{
|
||||||
// Handle avatar
|
// Handle avatar
|
||||||
|
@ -343,7 +343,6 @@ class acp_groups
|
||||||
if ($result && empty($avatar_error))
|
if ($result && empty($avatar_error))
|
||||||
{
|
{
|
||||||
$result['avatar_type'] = $driver_name;
|
$result['avatar_type'] = $driver_name;
|
||||||
|
|
||||||
$submit_ary = array_merge($submit_ary, $result);
|
$submit_ary = array_merge($submit_ary, $result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -547,9 +546,9 @@ class acp_groups
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$avatar = phpbb_get_group_avatar($group_row, 'GROUP_AVATAR', true);
|
$avatar = phpbb_get_group_avatar($group_row, 'GROUP_AVATAR', true);
|
||||||
|
|
||||||
// Merge any avatar errors into the primary error array
|
// Merge any avatar errors into the primary error array
|
||||||
$error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
|
$error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
|
||||||
|
|
||||||
|
|
|
@ -1786,7 +1786,7 @@ class acp_users
|
||||||
'user_avatar_width' => 0,
|
'user_avatar_width' => 0,
|
||||||
'user_avatar_height' => 0,
|
'user_avatar_height' => 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
SET ' . $db->sql_build_array('UPDATE', $result) . '
|
SET ' . $db->sql_build_array('UPDATE', $result) . '
|
||||||
WHERE user_id = ' . (int) $user_id;
|
WHERE user_id = ' . (int) $user_id;
|
||||||
|
@ -1843,7 +1843,7 @@ class acp_users
|
||||||
'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
|
'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
|
||||||
|
|
||||||
'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
|
'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
|
||||||
|
|
||||||
'S_AVATARS_ENABLED' => ($config['allow_avatar'] && $avatars_enabled),
|
'S_AVATARS_ENABLED' => ($config['allow_avatar'] && $avatars_enabled),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
|
||||||
'height' => $row['avatar_height'],
|
'height' => $row['avatar_height'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
|
@ -126,7 +126,7 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
|
||||||
$error[] = 'AVATAR_NO_SIZE';
|
$error[] = 'AVATAR_NO_SIZE';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->config['avatar_max_width'] || $this->config['avatar_max_height'])
|
if ($this->config['avatar_max_width'] || $this->config['avatar_max_height'])
|
||||||
{
|
{
|
||||||
if ($row['avatar_width'] > $this->config['avatar_max_width'] || $row['avatar_height'] > $this->config['avatar_max_height'])
|
if ($row['avatar_width'] > $this->config['avatar_max_width'] || $row['avatar_height'] > $this->config['avatar_max_height'])
|
||||||
|
|
|
@ -31,7 +31,7 @@ interface phpbb_avatar_driver_interface
|
||||||
/**
|
/**
|
||||||
* Get the avatar url and dimensions
|
* Get the avatar url and dimensions
|
||||||
*
|
*
|
||||||
* @param array $row User data or group data that has been cleaned with
|
* @param array $row User data or group data that has been cleaned with
|
||||||
* phpbb_avatar_manager::clean_row
|
* phpbb_avatar_manager::clean_row
|
||||||
* @return array Avatar data, must have keys src, width and height, e.g.
|
* @return array Avatar data, must have keys src, width and height, e.g.
|
||||||
* ['src' => '', 'width' => 0, 'height' => 0]
|
* ['src' => '', 'width' => 0, 'height' => 0]
|
||||||
|
@ -42,7 +42,7 @@ interface phpbb_avatar_driver_interface
|
||||||
* Returns custom html if it is needed for displaying this avatar
|
* Returns custom html if it is needed for displaying this avatar
|
||||||
*
|
*
|
||||||
* @param phpbb_user $user phpBB user object
|
* @param phpbb_user $user phpBB user object
|
||||||
* @param array $row User data or group data that has been cleaned with
|
* @param array $row User data or group data that has been cleaned with
|
||||||
* phpbb_avatar_manager::clean_row
|
* phpbb_avatar_manager::clean_row
|
||||||
* @param string $alt Alternate text for avatar image
|
* @param string $alt Alternate text for avatar image
|
||||||
*
|
*
|
||||||
|
@ -56,7 +56,7 @@ interface phpbb_avatar_driver_interface
|
||||||
* @param phpbb_request $request Request object
|
* @param phpbb_request $request Request object
|
||||||
* @param phpbb_template $template Template object
|
* @param phpbb_template $template Template object
|
||||||
* @param phpbb_user $user User object
|
* @param phpbb_user $user User object
|
||||||
* @param array $row User data or group data that has been cleaned with
|
* @param array $row User data or group data that has been cleaned with
|
||||||
* phpbb_avatar_manager::clean_row
|
* phpbb_avatar_manager::clean_row
|
||||||
* @param array &$error Reference to an error array that is filled by this
|
* @param array &$error Reference to an error array that is filled by this
|
||||||
* function. Key values can either be a string with a language key or
|
* function. Key values can either be a string with a language key or
|
||||||
|
@ -84,7 +84,7 @@ interface phpbb_avatar_driver_interface
|
||||||
* @param phpbb_request $request Request object
|
* @param phpbb_request $request Request object
|
||||||
* @param phpbb_template $template Template object
|
* @param phpbb_template $template Template object
|
||||||
* @param phpbb_user $user User object
|
* @param phpbb_user $user User object
|
||||||
* @param array $row User data or group data that has been cleaned with
|
* @param array $row User data or group data that has been cleaned with
|
||||||
* phpbb_avatar_manager::clean_row
|
* phpbb_avatar_manager::clean_row
|
||||||
* @param array &$error Reference to an error array that is filled by this
|
* @param array &$error Reference to an error array that is filled by this
|
||||||
* function. Key values can either be a string with a language key or
|
* function. Key values can either be a string with a language key or
|
||||||
|
@ -99,7 +99,7 @@ interface phpbb_avatar_driver_interface
|
||||||
/**
|
/**
|
||||||
* Delete avatar
|
* Delete avatar
|
||||||
*
|
*
|
||||||
* @param array $row User data or group data that has been cleaned with
|
* @param array $row User data or group data that has been cleaned with
|
||||||
* phpbb_avatar_manager::clean_row
|
* phpbb_avatar_manager::clean_row
|
||||||
*
|
*
|
||||||
* @return bool True if avatar has been deleted or there is no need to delete,
|
* @return bool True if avatar has been deleted or there is no need to delete,
|
||||||
|
|
|
@ -50,7 +50,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
|
||||||
'SELECTED' => ($cat == $category),
|
'SELECTED' => ($cat == $category),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cat != $category)
|
if ($cat != $category)
|
||||||
{
|
{
|
||||||
unset($avatar_list[$cat]);
|
unset($avatar_list[$cat]);
|
||||||
|
|
|
@ -593,7 +593,7 @@ class ucp_profile
|
||||||
WHERE user_id = ' . (int) $user->data['user_id'];
|
WHERE user_id = ' . (int) $user->data['user_id'];
|
||||||
|
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
meta_refresh(3, $this->u_action);
|
meta_refresh(3, $this->u_action);
|
||||||
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
|
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
|
||||||
trigger_error($message);
|
trigger_error($message);
|
||||||
|
@ -618,7 +618,7 @@ class ucp_profile
|
||||||
WHERE user_id = ' . (int) $user->data['user_id'];
|
WHERE user_id = ' . (int) $user->data['user_id'];
|
||||||
|
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
meta_refresh(3, $this->u_action);
|
meta_refresh(3, $this->u_action);
|
||||||
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
|
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
|
||||||
trigger_error($message);
|
trigger_error($message);
|
||||||
|
@ -670,7 +670,7 @@ class ucp_profile
|
||||||
'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
|
'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
|
||||||
|
|
||||||
'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
|
'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
|
||||||
|
|
||||||
'S_AVATARS_ENABLED' => ($config['allow_avatar'] && $avatars_enabled),
|
'S_AVATARS_ENABLED' => ($config['allow_avatar'] && $avatars_enabled),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue