mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00:00
[ticket/16604] Improve code readability
PHPBB3-16604
This commit is contained in:
parent
5e351dad53
commit
0d68cebea8
1 changed files with 10 additions and 5 deletions
|
@ -520,14 +520,19 @@ class acp_board
|
||||||
{
|
{
|
||||||
$error[] = $language->lang('AVATAR_NO_UPLOAD_PATH');
|
$error[] = $language->lang('AVATAR_NO_UPLOAD_PATH');
|
||||||
}
|
}
|
||||||
// Not existing or writable path will be caught on submit by config vars validation
|
else
|
||||||
|
{
|
||||||
|
$avatar_path_exists = $filesystem->exists($phpbb_root_path . $cfg_array['avatar_path']);
|
||||||
|
$avatar_path_writable = $filesystem->is_writable($phpbb_root_path . $cfg_array['avatar_path']);
|
||||||
|
|
||||||
|
// Not existing or writable path will be caught on submit by validate_config_vars().
|
||||||
// Display the warning if the directory was changed on the server afterwards
|
// Display the warning if the directory was changed on the server afterwards
|
||||||
else if (!$submit &&
|
if (!$submit && (!$avatar_path_exists || !$avatar_path_writable))
|
||||||
(!$filesystem->exists($phpbb_root_path . $cfg_array['avatar_path']) || !$filesystem->is_writable($phpbb_root_path . $cfg_array['avatar_path'])))
|
|
||||||
{
|
{
|
||||||
$error[] = $language->lang('AVATAR_NO_UPLOAD_DIR');
|
$error[] = $language->lang('AVATAR_NO_UPLOAD_DIR');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// We validate the complete config if wished
|
// We validate the complete config if wished
|
||||||
validate_config_vars($display_vars['vars'], $cfg_array, $error);
|
validate_config_vars($display_vars['vars'], $cfg_array, $error);
|
||||||
|
|
Loading…
Add table
Reference in a new issue