aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp/acp_main.php')
-rw-r--r--phpBB/includes/acp/acp_main.php24
1 files changed, 3 insertions, 21 deletions
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index d2b44d553f..3f253b94a7 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -503,26 +503,8 @@ class acp_main
$upload_dir_size = get_formatted_filesize($config['upload_dir_size']);
- $avatar_dir_size = 0;
-
- if ($avatar_dir = @opendir($phpbb_root_path . $config['avatar_path']))
- {
- while (($file = readdir($avatar_dir)) !== false)
- {
- if ($file[0] != '.' && $file != 'CVS' && strpos($file, 'index.') === false)
- {
- $avatar_dir_size += filesize($phpbb_root_path . $config['avatar_path'] . '/' . $file);
- }
- }
- closedir($avatar_dir);
-
- $avatar_dir_size = get_formatted_filesize($avatar_dir_size);
- }
- else
- {
- // Couldn't open Avatar dir.
- $avatar_dir_size = $user->lang['NOT_AVAILABLE'];
- }
+ $storage_avatar = $phpbb_container->get('storage.avatar');
+ $avatar_dir_size = get_formatted_filesize($storage_avatar->get_size());
if ($posts_per_day > $total_posts)
{
@@ -658,7 +640,7 @@ class acp_main
}
// Warn if install is still present
- if (!defined('IN_INSTALL') && !$phpbb_container->getParameter('allow_install_dir') && file_exists($phpbb_root_path . 'install') && !is_file($phpbb_root_path . 'install'))
+ if (!$phpbb_container->getParameter('allow_install_dir') && file_exists($phpbb_root_path . 'install') && !is_file($phpbb_root_path . 'install'))
{
$template->assign_var('S_REMOVE_INSTALL', true);
}