]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
better deletion of old avatars
authorEvan Prodromou <evan@prodromou.name>
Sun, 18 May 2008 19:39:51 +0000 (15:39 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sun, 18 May 2008 19:39:51 +0000 (15:39 -0400)
darcs-hash:20080518193951-84dde-cc45fbfba1f11a4ae2f629cc862e02a14743f2c1.gz

actions/avatar.php

index 374cef41327317b5723e42456ae40f437a649999..16a3dd48cfaa4b1412b1e10bc2ed7697eece81bc 100644 (file)
@@ -205,8 +205,10 @@ class AvatarAction extends SettingsAction {
                $avatar->profile_id = $user->id;
                $avatar->find();
                while ($avatar->fetch()) {
+                       unlink(common_avatar_path($avatar->filename));
                        $avatar->delete();
                }
+               return true;
        }
 }