]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
broadcast profile changes from updateavatarurl.php
authorEvan Prodromou <evan@status.net>
Mon, 9 Nov 2009 22:41:51 +0000 (17:41 -0500)
committerEvan Prodromou <evan@status.net>
Mon, 9 Nov 2009 22:41:51 +0000 (17:41 -0500)
scripts/updateavatarurl.php

index acafa74b0654c3ae35b14b69cd25704e81d4033f..dfcfc118cf7f0129d95b8560e0d3a874d78458f2 100644 (file)
@@ -69,6 +69,8 @@ try {
 
 function updateAvatars($user)
 {
+    $touched = false;
+
     if (!have_option('q', 'quiet')) {
         print "Updating avatars for user '".$user->nickname."' (".$user->id.")...";
     }
@@ -108,11 +110,18 @@ function updateAvatars($user)
 
                 if (!$avatar->query($sql)) {
                     throw new Exception("Can't update avatar for user " . $user->nickname . ".");
+                } else {
+                    $touched = true;
                 }
             }
         }
+    }
 
+    if ($touched) {
+        $profile = $user->getProfile();
+        common_broadcast_profile($profile);
     }
+
     if (have_option('v', 'verbose')) {
         print "DONE.\n";
     }