]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/avatarsettings.php
Various obvious bug fixes and better PHP 7 support
[quix0rs-gnu-social.git] / actions / avatarsettings.php
index f77339ad70d8a455577510f5c018e31c0dfebc26..6c9f3fc3d0cc19219c52a4c402a7fb6ac8a186a0 100644 (file)
@@ -49,6 +49,20 @@ class AvatarsettingsAction extends SettingsAction
     var $imagefile = 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
      *