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