aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-09-29 13:22:26 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-09-29 13:22:26 +0000
commit0972beea0a22861b5da08b4cfe5aed03cd6dd8b3 (patch)
tree3c14232afb22c471e0fcc57c04d4043f9ce3f1db
parenteaddae88046f037405757679a1c24461ec0d8dbe (diff)
downloadelgg-0972beea0a22861b5da08b4cfe5aed03cd6dd8b3.tar.gz
elgg-0972beea0a22861b5da08b4cfe5aed03cd6dd8b3.tar.bz2
Notifications get notification stuff in API form.
git-svn-id: https://code.elgg.org/elgg/trunk@2145 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/notification.php9
-rw-r--r--languages/en.php2
2 files changed, 10 insertions, 1 deletions
diff --git a/engine/lib/notification.php b/engine/lib/notification.php
index 192e011fc..b024d00fb 100644
--- a/engine/lib/notification.php
+++ b/engine/lib/notification.php
@@ -150,7 +150,7 @@
{
$name = substr($meta->name, strlen($prefix));
$value = $meta->value;
-
+
if (strpos($meta->name, $prefix) === 0)
$return->$name = $value;
}
@@ -276,6 +276,13 @@
register_plugin_hook('usersettings:save','user','notification_user_settings_save');
//register_action("notifications/settings/usersettings/save");
+
+
+ // Register some APIs
+ expose_function('user.notification.get', 'get_user_notification_settings', array(
+ 'user_guid' => array ('type' => 'int')
+ ), elgg_echo('user.notification.get'));
+
}
function notification_user_settings_save() {
diff --git a/languages/en.php b/languages/en.php
index 7ad046fef..bb3ecf4f6 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -360,6 +360,8 @@ To remove a widget drag it back to the <b>Widget gallery</b>.",
'notifications:usersettings:save:ok' => "Your notification settings were successfully saved.",
'notifications:usersettings:save:fail' => "There was a problem saving your notification settings.",
+
+ 'user.notification.get' => 'Return the notification settings for a given user.',
/**
* Search
*/