| @@ 48-52 (lines=5) @@ | ||
| 45 | $message_return = 'missions:declination_has_been_sent'; |
|
| 46 | remove_entity_relationship($mission->guid, 'mission_offered', $applicant->guid); |
|
| 47 | } |
|
| 48 | if(check_entity_relationship($mission->guid, 'mission_accepted', $applicant->guid)) { |
|
| 49 | $message_return = 'missions:withdrawal_has_been_sent'; |
|
| 50 | remove_entity_relationship($mission->guid, 'mission_accepted', $applicant->guid); |
|
| 51 | mm_complete_mission_inprogress_reports($mission, true); |
|
| 52 | } |
|
| 53 | ||
| 54 | // Object which stores the reason for declining a mission. |
|
| 55 | $ia = elgg_set_ignore_access(true); |
|
| @@ 523-527 (lines=5) @@ | ||
| 520 | $message_return = 'missions:declination_has_been_sent'; |
|
| 521 | remove_entity_relationship($entity->guid, 'mission_offered', $user_entity->guid); |
|
| 522 | } |
|
| 523 | if(check_entity_relationship($entity->guid, 'mission_accepted', $user_entity->guid)) { |
|
| 524 | $message_return = 'missions:withdrawal_has_been_sent'; |
|
| 525 | remove_entity_relationship($entity->guid, 'mission_accepted', $user_entity->guid); |
|
| 526 | mm_complete_mission_inprogress_reports($entity, true); |
|
| 527 | } |
|
| 528 | return elgg_echo($message_return, array($entity->job_title)); |
|
| 529 | ||
| 530 | ||
| @@ 555-559 (lines=5) @@ | ||
| 552 | return "Invalid opportunity. Please try a different GUID"; |
|
| 553 | } |
|
| 554 | ||
| 555 | if(check_entity_relationship($entity->guid, 'mission_offered', $user_entity->guid)) { |
|
| 556 | ||
| 557 | remove_entity_relationship($entity->guid, 'mission_offered', $user_entity->guid); |
|
| 558 | add_entity_relationship($entity->guid, 'mission_accepted', $user_entity->guid); |
|
| 559 | } |
|
| 560 | ||
| 561 | return elgg_echo('missions:now_participating_in_mission', array($entity->job_title)); |
|
| 562 | } |
|