From 0972beea0a22861b5da08b4cfe5aed03cd6dd8b3 Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 29 Sep 2008 13:22:26 +0000 Subject: Notifications get notification stuff in API form. git-svn-id: https://code.elgg.org/elgg/trunk@2145 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/notification.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'engine/lib') 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() { -- cgit v1.2.3