1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[ticket/15371] Split uploaded files into subdirectories

PHPBB3-15371
This commit is contained in:
Rubén Calvo
2017-09-21 20:56:56 +02:00
parent 449b930c5e
commit 5edb8f0b5b
5 changed files with 106 additions and 15 deletions

View File

@@ -0,0 +1,44 @@
<?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\v330;
class storage_adapter_local_depth extends \phpbb\db\migration\migration
{
static public function depends_on()
{
return array(
//'\phpbb\db\migration\data\v330\storage_attachment',
'\phpbb\db\migration\data\v330\storage_avatar',
//'\phpbb\db\migration\data\v330\storage_backup',
);
}
public function update_data()
{
return array(
array('if', array(
($this->config['storage\\attachment\\provider'] == \phpbb\storage\provider\local::class),
array('config.add', array('storage\\attachment\\config\\depth', '0')),
)),
array('if', array(
($this->config['storage\\avatar\\provider'] == \phpbb\storage\provider\local::class),
array('config.add', array('storage\\avatar\\config\\depth', '0')),
)),
array('if', array(
($this->config['storage\\backup\\provider'] == \phpbb\storage\provider\local::class),
array('config.add', array('storage\\backup\\config\\depth', '0')),
)),
);
}
}