From a641ea9291d3c9654eb8739e71963eddf0e9498b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Thu, 7 Jun 2018 16:13:16 +0200 Subject: [PATCH] [ticket/15371] Add doc PHPBB3-15371 --- phpBB/phpbb/storage/adapter/local.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/phpBB/phpbb/storage/adapter/local.php b/phpBB/phpbb/storage/adapter/local.php index 10739951a4..fb45a38b37 100644 --- a/phpBB/phpbb/storage/adapter/local.php +++ b/phpBB/phpbb/storage/adapter/local.php @@ -63,6 +63,17 @@ class local implements adapter_interface, stream_interface protected $path; /* + * Subdirectories depth + * + * Instead of storing all folders on the same directory, they can be divided + * into smaller directories. This variable means the number of subdirectories of + * depth to store the file. For example: + * depth = 0 -> /images/avatars/upload/my_avatar.jpg + * depth = 2 -> /images/avatars/upload/d9/8c/my_avatar.jpg + * This is for those who have problems storing a large number of files on + * a single directory. + * More info: https://tracker.phpbb.com/browse/PHPBB3-15371 + * * @var int dir_depth */ protected $dir_depth; @@ -251,6 +262,12 @@ class local implements adapter_interface, stream_interface while ($path && @rmdir($dirpath . $path)); } + /** + * Get the path to the file, appending subdirectories for directory depth + * if $dir_depth > 0. + * + * @param string $path The file path + */ protected function get_filepath($path) { $pathinfo = pathinfo($path);