[ticket/16604] Adjust code logic

PHPBB3-16604
This commit is contained in:
rxu 2020-09-25 22:08:18 +07:00
parent d80367c5fc
commit 36554f3ce8
No known key found for this signature in database
GPG key ID: 955F0567380E586A

View file

@ -518,7 +518,7 @@ class acp_board
{ {
$error[] = $language->lang('AVATAR_NO_UPLOAD_PATH'); $error[] = $language->lang('AVATAR_NO_UPLOAD_PATH');
} }
else else if (!$submit)
{ {
$filesystem = $phpbb_container->get('filesystem'); $filesystem = $phpbb_container->get('filesystem');
$avatar_path_exists = $filesystem->exists($phpbb_root_path . $cfg_array['avatar_path']); $avatar_path_exists = $filesystem->exists($phpbb_root_path . $cfg_array['avatar_path']);
@ -526,7 +526,7 @@ class acp_board
// Not existing or writable path will be caught on submit by validate_config_vars(). // 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
if (!$submit && (!$avatar_path_exists || !$avatar_path_writable)) if (!$avatar_path_exists || !$avatar_path_writable)
{ {
$error[] = $language->lang('AVATAR_NO_UPLOAD_DIR'); $error[] = $language->lang('AVATAR_NO_UPLOAD_DIR');
} }