]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
a group's Profile will now correctly update group original avatar
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 27 Jan 2015 12:37:50 +0000 (13:37 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 27 Jan 2015 12:37:50 +0000 (13:37 +0100)
classes/Profile.php

index 12672d21577a7a877c4f0085499e1dfbfaee3f5c..6f839baaea2363da89f1db2755eac670c51f5db2 100644 (file)
@@ -155,6 +155,11 @@ class Profile extends Managed_DataObject
 
     public function setOriginal($filename)
     {
+        if ($this->isGroup()) {
+            // Until Group avatars are handled just like profile avatars.
+            return $this->getGroup()->setOriginal($filename);
+        }
+
         $imagefile = new ImageFile($this->id, Avatar::path($filename));
 
         $avatar = new Avatar();