| @@ 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 | ||
| @@ 1009-1021 (lines=13) @@ | ||
| 1006 | ); |
|
| 1007 | ||
| 1008 | // cyu - work order #323 TFS |
|
| 1009 | if (elgg_is_active_plugin('cp_notifications')) { |
|
| 1010 | $message = array( |
|
| 1011 | 'cp_msg_type' => 'cp_grp_admin_transfer', |
|
| 1012 | 'cp_group_name' => $group->name, |
|
| 1013 | 'cp_group_url' => $group->getURL(), |
|
| 1014 | 'cp_new_owner' => $new_owner->name, |
|
| 1015 | 'cp_appointer' => $loggedin_user->name, |
|
| 1016 | 'cp_new_owner_user' => $new_owner, |
|
| 1017 | ); |
|
| 1018 | $result = elgg_trigger_plugin_hook('cp_overwrite_notification','all',$message); |
|
| 1019 | } else { |
|
| 1020 | notify_user($new_owner->getGUID(), $group->getGUID(), $subject, $message); |
|
| 1021 | } |
|
| 1022 | } |
|
| 1023 | ||
| 1024 | $result = true; |
|
| @@ 1125-1136 (lines=12) @@ | ||
| 1122 | ); |
|
| 1123 | ||
| 1124 | // cyu - 04/04/2016: use new notification system hook instead (if activated) |
|
| 1125 | if (elgg_is_active_plugin('cp_notifications')) { |
|
| 1126 | $message = array( |
|
| 1127 | 'object' => $user_entity, |
|
| 1128 | 'cp_request_guid' => $friend->getGUID(), |
|
| 1129 | 'cp_approver' => $user_entity->name, |
|
| 1130 | 'cp_approver_profile' => $user_entity->getURL(), |
|
| 1131 | 'cp_msg_type' => 'cp_friend_approve' |
|
| 1132 | ); |
|
| 1133 | $result = elgg_trigger_plugin_hook('cp_overwrite_notification', 'all', $message); |
|
| 1134 | } else { |
|
| 1135 | notify_user($friend->getGUID(), $user_entity->getGUID(), $subject, $message, $params); |
|
| 1136 | } |
|
| 1137 | ||
| 1138 | // add to river |
|
| 1139 | elgg_create_river_item(array( |
|