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

[ticket/15769] Increase default avatar size

PHPBB3-15769
This commit is contained in:
Marc Alexander
2021-08-20 16:10:16 +02:00
parent 7cdd30958d
commit b72379aaab
2 changed files with 45 additions and 5 deletions

View File

@@ -0,0 +1,40 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\db\migration\data\v400;
use phpbb\db\migration\container_aware_migration;
class increase_avatar_size extends container_aware_migration
{
public static function depends_on()
{
return ['\phpbb\db\migration\data\v400\dev'];
}
public function update_data()
{
return [
['custom', [[$this, 'increase_size']]],
];
}
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
}
}