getOwner()); if ($poster->getSubtype() == "job_offering" && $poster->canEdit()) { if ($approve) { // Prepare message content /*translation:Job offer approved notification*/ $msg_title = elgg_echo('koolielu:job_offer_approved_msg_title'); /*translation:Your job offering %s has been approved.*/ $msg_desc = sprintf(elgg_echo('koolielu:job_offer_approved_msg_body'), $poster->getURL(), $poster->title); if ($comment) { /*translation:Message from moderator: %s*/ $msg_desc .= "

" . sprintf(elgg_echo('koolielu:msg_from_mod'), $comment); } $messages = array('title' => $msg_title, 'description' => $msg_desc); // Send message accept_object_review($poster, $messages, $owner->getGUID()); // river add_to_river('river/object/job_offering/create','create',$poster->getOwner(),$poster->guid); } else { // Prepare message content /*translation:Job offer disapproved notification*/ $msg_title = elgg_echo('koolielu:job_offer_disapproved_msg_title'); /*translation:Your job offering %s has been disapproved.*/ $msg_desc = sprintf(elgg_echo('koolielu:job_offer_disapproved_msg_body'), $poster->title); if ($comment) { /*translation:Message from moderator: %s*/ $msg_desc .= "

" . sprintf(elgg_echo('koolielu:msg_from_mod'), $comment); } /*translation:This job offer has been deleted.*/ $msg_desc .= elgg_echo('koolielu:job_offer_deleted_msg'); $messages = array('title' => $msg_title, 'description' => $msg_desc); reject_object_review($poster, $messages, $owner->getGUID()); } //forward("mod/poster/labour_market.php"); } if ($poster->getSubtype() == "job_wanted_ad" && $poster->canEdit()) { if ($approve) { // Prepare message content /*translation:Job search approved notification*/ $msg_title = elgg_echo('koolielu:job_search_approved_msg_title'); /*translation:Your job search %s has been approved.*/ $msg_desc = sprintf(elgg_echo('koolielu:job_search_approved_msg_body'), $poster->getURL(), $poster->title); if ($comment) { /*translation:Message from moderator: %s*/ $msg_desc .= "

" . sprintf(elgg_echo('koolielu:msg_from_mod'), $comment); } $messages = array('title' => $msg_title, 'description' => $msg_desc); // Send message accept_object_review($poster, $messages, $owner->getGUID()); // river add_to_river('river/object/job_wanted_ad/create','create',$poster->getOwner(),$poster->guid); } else { // Prepare message content /*translation:Job search disapproved notification*/ $msg_title = elgg_echo('koolielu:job_search_disapproved_msg_title'); /*translation:Your job search %s has been disapproved.*/ $msg_desc = sprintf(elgg_echo('koolielu:job_search_disapproved_msg_body'), $poster->title); if ($comment) { /*translation:Message from moderator: %s*/ $msg_desc .= "

" . sprintf(elgg_echo('koolielu:msg_from_mod'), $comment); } /*translation:This job search has been deleted.*/ $msg_desc .= elgg_echo('koolielu:job_search_deleted_msg'); $messages = array('title' => $msg_title, 'description' => $msg_desc); reject_object_review($poster, $messages, $owner->getGUID()); } //forward("mod/poster/labour_market.php"); } if ($poster->getSubtype() == "course" && $poster->canEdit()) { if ($approve) { // Prepare message content /*translation:Course approved notification*/ $msg_title = elgg_echo('koolielu:course_approved_msg_title'); /*translation:Your course %s has been approved.*/ $msg_desc = sprintf(elgg_echo('koolielu:course_approved_msg_body'), $poster->getURL(), $poster->title); if ($comment) { /*translation:Message from moderator: %s*/ $msg_desc .= "

" . sprintf(elgg_echo('koolielu:msg_from_mod'), $comment); } $messages = array('title' => $msg_title, 'description' => $msg_desc); // Send message accept_object_review($poster, $messages, $owner->getGUID()); // river add_to_river('river/object/course/create','create',$poster->getOwner(),$poster->guid); } else { // Prepare message content /*translation:Course disapproved notification*/ $msg_title = elgg_echo('koolielu:course_disapproved_msg_title'); /*translation:Your course %s has been disapproved.*/ $msg_desc = sprintf(elgg_echo('koolielu:course_disapproved_msg_body'), $poster->title); if ($comment) { /*translation:Message from moderator: %s*/ $msg_desc .= "

" . sprintf(elgg_echo('koolielu:msg_from_mod'), $comment); } /*translation:This course has been deleted.*/ $msg_desc .= elgg_echo('koolielu:course_deleted_msg'); $messages = array('title' => $msg_title, 'description' => $msg_desc); reject_object_review($poster, $messages, $owner->getGUID()); } //forward("mod/poster/courses.php"); } forward("mod/poster/unapproved_ads.php") ?>