mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 02:06:32 +02:00
Merge PR #771 branch 'develop-olympus' into develop
* develop-olympus: [ticket/10836] Check if avatar directory is writable after install [ticket/10836] Enable avatars by default at install
This commit is contained in:
@@ -104,6 +104,7 @@ class install_install extends module
|
||||
$this->add_language($mode, $sub);
|
||||
$this->add_bots($mode, $sub);
|
||||
$this->email_admin($mode, $sub);
|
||||
$this->disable_avatars_if_unwritable();
|
||||
|
||||
// Remove the lock file
|
||||
@unlink($phpbb_root_path . 'cache/install_lock');
|
||||
@@ -1874,6 +1875,21 @@ class install_install extends module
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the avatar directory is writable and disable avatars
|
||||
* if it isn't writable.
|
||||
*/
|
||||
function disable_avatars_if_unwritable()
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
if (!phpbb_is_writable($phpbb_root_path . 'images/avatars/upload/'))
|
||||
{
|
||||
set_config('allow_avatar', 0);
|
||||
set_config('allow_avatar_upload', 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a list of available mail server authentication methods
|
||||
*/
|
||||
|
Reference in New Issue
Block a user