1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 23:11:45 +02:00

[ticket/16345] Small improvements

PHPBB3-16346
This commit is contained in:
rubencm
2020-06-07 02:15:35 +00:00
parent 3cceeb45bf
commit 774c609c4a
284 changed files with 1380 additions and 835 deletions

View File

@@ -80,7 +80,7 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
* @param string $phpbb_root_path Path to the phpBB root
* @param string $php_ext PHP file extension
* @param \phpbb\path_helper $path_helper phpBB path helper
* @param \phpbb\cache\driver\driver_interface $cache Cache driver
* @param \phpbb\cache\driver\driver_interface|null $cache Cache driver
*/
public function __construct(\phpbb\config\config $config, \FastImageSize\FastImageSize $imagesize, $phpbb_root_path, $php_ext, \phpbb\path_helper $path_helper, \phpbb\cache\driver\driver_interface $cache = null)
{

View File

@@ -114,7 +114,7 @@ class gravatar extends \phpbb\avatar\driver\driver
return false;
}
if (!empty($image_data) && ($image_data['width'] <= 0 || $image_data['width'] <= 0))
if (!empty($image_data) && ($image_data['width'] <= 0 || $image_data['height'] <= 0))
{
$error[] = 'AVATAR_NO_SIZE';
return false;

View File

@@ -40,7 +40,7 @@ class local extends \phpbb\avatar\driver\driver
$avatar_list = $this->get_avatar_list($user);
$category = $request->variable('avatar_local_cat', key($avatar_list));
foreach ($avatar_list as $cat => $null)
foreach (array_keys($avatar_list) as $cat)
{
if (!empty($avatar_list[$cat]))
{
@@ -63,7 +63,7 @@ class local extends \phpbb\avatar\driver\driver
));
$table_cols = isset($row['avatar_gallery_cols']) ? $row['avatar_gallery_cols'] : 4;
$row_count = $col_count = $avatar_pos = 0;
$col_count = $avatar_pos = 0;
$avatar_count = count($avatar_list[$category]);
reset($avatar_list[$category]);
@@ -75,7 +75,6 @@ class local extends \phpbb\avatar\driver\driver
if ($col_count == 0)
{
++$row_count;
$template->assign_block_vars('avatar_local_row', array(
));
}