summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Helgeson <erichelgeson@gmail.com>2009-12-10 21:06:54 -0500
committerEric Helgeson <erichelgeson@gmail.com>2009-12-10 21:07:47 -0500
commit08901c98c4129c1d7707acb470e18f1056f2502e (patch)
tree383c1977d655003b931e22c1b37828c6414d9775
parentc10fa99b04ef544e1ea082a694ad714f9246df86 (diff)
Changing avatar should broadcast the profile via OMB.
-rw-r--r--plugins/Gravatar/GravatarPlugin.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/Gravatar/GravatarPlugin.php b/plugins/Gravatar/GravatarPlugin.php
index b18f62726..3c61a682e 100644
--- a/plugins/Gravatar/GravatarPlugin.php
+++ b/plugins/Gravatar/GravatarPlugin.php
@@ -92,11 +92,23 @@ class GravatarPlugin extends Plugin
function onStartAvatarSaveForm($action) {
if ($action->arg('add')) {
$result = $this->gravatar_save();
+
+ if($result['success']===true) {
+ common_broadcast_profile(common_current_user()->getProfile());
+ }
+
$action->showForm($result['message'], $result['success']);
+
return false;
} else if ($action->arg('remove')) {
$result = $this->gravatar_remove();
+
+ if($result['success']===true) {
+ common_broadcast_profile(common_current_user()->getProfile());
+ }
+
$action->showForm($result['message'], $result['success']);
+
return false;
} else {
return true;