1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/15769] Make basic upload, refresh, and errors work

PHPBB3-15769
This commit is contained in:
Marc Alexander
2021-08-20 16:57:36 +02:00
parent b72379aaab
commit 1933a8ab47
4 changed files with 27 additions and 14 deletions

View File

@@ -107,7 +107,7 @@ class upload extends \phpbb\avatar\driver\driver
$template->assign_vars([
'AVATAR_ALLOWED_EXTENSIONS' => implode(',', preg_replace('/^/', '.', $this->allowed_extensions)),
'AVATAR_UPLOAD_SIZE' => $this->config['avatar_filesize'],
'S_CROPPING_AVAILABLE' => image_cropper::is_available(),
'S_CROPPING_AVAILABLE' => true,
'T_ASSETS_PATH' => $web_path . '/assets',
]);

View File

@@ -31,10 +31,10 @@ class increase_avatar_size extends container_aware_migration
public function increase_size(): void
{
$this->config['avatar_filesize'] = max(262144, $this->config['avatar_filesize']); // Increase to 256 KiB
$this->config['avatar_max_height'] = max('120', $this->config['avatar_max_height']); // Increase to max 120px height
$this->config['avatar_max_width'] = max('120', $this->config['avatar_max_width']); // Increase to max 120px width
$this->config['avatar_min_height'] = max('40', $this->config['avatar_min_height']); // Increase to min 40px height
$this->config['avatar_min_width'] = max('40', $this->config['avatar_min_width']); // Increase to max 40px width
$this->config->set('avatar_filesize', max(262144, $this->config['avatar_filesize'])); // Increase to 256 KiB
$this->config->set('avatar_max_height', max('120', $this->config['avatar_max_height'])); // Increase to max 120px height
$this->config->set('avatar_max_width', max('120', $this->config['avatar_max_width'])); // Increase to max 120px width
$this->config->set('avatar_min_height', max('40', $this->config['avatar_min_height'])); // Increase to min 40px height
$this->config->set('avatar_min_width', max('40', $this->config['avatar_min_width'])); // Increase to max 40px width
}
}