aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/profile/actions/edit.php6
-rw-r--r--mod/profile/actions/iconupload.php4
-rw-r--r--mod/profile/languages/en.php3
-rw-r--r--mod/profile/views/default/river/ElggUser/profileiconupdate.php12
-rw-r--r--mod/profile/views/default/river/ElggUser/profileupdate.php (renamed from mod/profile/views/default/river/ElggUser/update.php)0
5 files changed, 22 insertions, 3 deletions
diff --git a/mod/profile/actions/edit.php b/mod/profile/actions/edit.php
index 7a74535cd..fad257cf5 100644
--- a/mod/profile/actions/edit.php
+++ b/mod/profile/actions/edit.php
@@ -37,7 +37,11 @@
$user->$shortname = $value;
}
$user->save();
-
+
+ // Notify of profile update
+ trigger_elgg_event('profileupdate',$user->type,$user);
+
+
system_message(elgg_echo("profile:saved"));
// Forward to the user's profile
diff --git a/mod/profile/actions/iconupload.php b/mod/profile/actions/iconupload.php
index 967e58d70..e4185809a 100644
--- a/mod/profile/actions/iconupload.php
+++ b/mod/profile/actions/iconupload.php
@@ -56,7 +56,9 @@
$_SESSION['user']->icontime = time();
- system_message(elgg_echo("profile:icon:uploaded"));
+ system_message(elgg_echo("profile:icon:uploaded"));
+
+ trigger_elgg_event('profileiconupdate',$_SESSION['user']->type,$_SESSION['user']);
} else {
system_message(elgg_echo("profile:icon:notfound"));
diff --git a/mod/profile/languages/en.php b/mod/profile/languages/en.php
index be70f4243..2cec031a0 100644
--- a/mod/profile/languages/en.php
+++ b/mod/profile/languages/en.php
@@ -43,7 +43,8 @@
'profile:mobile' => "Mobile phone",
'profile:website' => "Website",
- 'profile:river:update' => "%s updated their profile",
+ 'profile:river:update' => "%s updated their profile",
+ 'profile:river:iconupdate' => "%s updated their profile icon",
/**
* Status messages
diff --git a/mod/profile/views/default/river/ElggUser/profileiconupdate.php b/mod/profile/views/default/river/ElggUser/profileiconupdate.php
new file mode 100644
index 000000000..ce511c40c
--- /dev/null
+++ b/mod/profile/views/default/river/ElggUser/profileiconupdate.php
@@ -0,0 +1,12 @@
+<?php
+
+ $statement = $vars['statement'];
+
+ $performed_by = $statement->getSubject();
+
+ $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+ $string = sprintf(elgg_echo("profile:river:iconupdate"),$url);
+
+?>
+
+<?php echo $string; ?> \ No newline at end of file
diff --git a/mod/profile/views/default/river/ElggUser/update.php b/mod/profile/views/default/river/ElggUser/profileupdate.php
index 36f775991..36f775991 100644
--- a/mod/profile/views/default/river/ElggUser/update.php
+++ b/mod/profile/views/default/river/ElggUser/profileupdate.php