getSubtype(), array("job_offering", "job_wanted_ad")) && $poster->canEdit()) { // Get owning user $owner = get_entity($poster->getOwner()); // Delete it! $rowsaffected = $poster->delete(); if ($rowsaffected > 0) { // Remove from Calendar db //delete_data("DELETE from {$CONFIG->dbprefix}koolielu_calendar_objects where guid=".$guid); /*translation:Job advertisement was successfully deleted.*/ system_message(elgg_echo('koolielu:job_ad_deleted')); } else { /*translation:Sorry; we could not delete this job advertisement.*/ register_error(elgg_echo('koolielu:job_ad_not_deleted')); } forward("mod/poster"); } ?>