| @@ 30-41 (lines=12) @@ | ||
| 27 | ); |
|
| 28 | ||
| 29 | // cyu - 04/04/2016: use new notification system hook instead (if activated) |
|
| 30 | if (elgg_is_active_plugin('cp_notifications')) { |
|
| 31 | $message = array( |
|
| 32 | 'object' => $user, |
|
| 33 | 'cp_request_guid' => $friend->getGUID(), |
|
| 34 | 'cp_approver' => $user->name, |
|
| 35 | 'cp_approver_profile' => $user->getURL(), |
|
| 36 | 'cp_msg_type' => 'cp_friend_approve' |
|
| 37 | ); |
|
| 38 | $result = elgg_trigger_plugin_hook('cp_overwrite_notification','all',$message); |
|
| 39 | } else { |
|
| 40 | notify_user($friend->getGUID(), $user->getGUID(), $subject, $message, $params); |
|
| 41 | } |
|
| 42 | ||
| 43 | system_message(elgg_echo("friend_request:approve:successful", array($friend->name))); |
|
| 44 | ||
| @@ 1014-1026 (lines=13) @@ | ||
| 1011 | ); |
|
| 1012 | ||
| 1013 | // cyu - work order #323 TFS |
|
| 1014 | if (elgg_is_active_plugin('cp_notifications')) { |
|
| 1015 | $message = array( |
|
| 1016 | 'cp_msg_type' => 'cp_grp_admin_transfer', |
|
| 1017 | 'cp_group_name' => $group->name, |
|
| 1018 | 'cp_group_url' => $group->getURL(), |
|
| 1019 | 'cp_new_owner' => $new_owner->name, |
|
| 1020 | 'cp_appointer' => $loggedin_user->name, |
|
| 1021 | 'cp_new_owner_user' => $new_owner, |
|
| 1022 | ); |
|
| 1023 | $result = elgg_trigger_plugin_hook('cp_overwrite_notification','all',$message); |
|
| 1024 | } else { |
|
| 1025 | notify_user($new_owner->getGUID(), $group->getGUID(), $subject, $message); |
|
| 1026 | } |
|
| 1027 | } |
|
| 1028 | ||
| 1029 | $result = true; |
|
| @@ 1110-1121 (lines=12) @@ | ||
| 1107 | ); |
|
| 1108 | ||
| 1109 | // cyu - 04/04/2016: use new notification system hook instead (if activated) |
|
| 1110 | if (elgg_is_active_plugin('cp_notifications')) { |
|
| 1111 | $message = array( |
|
| 1112 | 'object' => $user_entity, |
|
| 1113 | 'cp_request_guid' => $friend->getGUID(), |
|
| 1114 | 'cp_approver' => $user_entity->name, |
|
| 1115 | 'cp_approver_profile' => $user_entity->getURL(), |
|
| 1116 | 'cp_msg_type' => 'cp_friend_approve' |
|
| 1117 | ); |
|
| 1118 | $result = elgg_trigger_plugin_hook('cp_overwrite_notification', 'all', $message); |
|
| 1119 | } else { |
|
| 1120 | notify_user($friend->getGUID(), $user_entity->getGUID(), $subject, $message, $params); |
|
| 1121 | } |
|
| 1122 | ||
| 1123 | // add to river |
|
| 1124 | elgg_create_river_item(array( |
|