From: Evan Prodromou Date: Mon, 9 Nov 2009 22:41:51 +0000 (-0500) Subject: broadcast profile changes from updateavatarurl.php X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=499b3555df2a3c27f56f2931b3add15192fef1fc;p=quix0rs-gnu-social.git broadcast profile changes from updateavatarurl.php --- diff --git a/scripts/updateavatarurl.php b/scripts/updateavatarurl.php index acafa74b06..dfcfc118cf 100644 --- a/scripts/updateavatarurl.php +++ b/scripts/updateavatarurl.php @@ -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"; }