Merge branch 'avatar-folder-perms' into 'nightly'
Display error if wrong perms on 'avatar' dir If the 'avatar' folder isn't writeable, don't let users try to upload/delete one (and fail). Instead, print an error message about the misconfigured folder permission. Ref. #196 See merge request !126
This commit is contained in:
commit
a6390007b7
@ -49,6 +49,20 @@ class AvatarsettingsAction extends SettingsAction
|
|||||||
var $imagefile = null;
|
var $imagefile = null;
|
||||||
var $filename = null;
|
var $filename = null;
|
||||||
|
|
||||||
|
function prepare(array $args=array())
|
||||||
|
{
|
||||||
|
$avatarpath = Avatar::path('');
|
||||||
|
|
||||||
|
if (!is_writable($avatarpath)) {
|
||||||
|
throw new Exception(_("The administrator of your site needs to
|
||||||
|
add write permissions on the avatar upload folder before
|
||||||
|
you're able to set one."));
|
||||||
|
}
|
||||||
|
|
||||||
|
parent::prepare($args);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Title of the page
|
* Title of the page
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user