getSubtype() == "task" && $task->canEdit()) { // Get owning user $owner_guid = $task->getOwner(); // Delete it! $rowsaffected = $task->delete(); if ($rowsaffected > 0) { /*translation:Task was successfully deleted.*/ system_message(elgg_echo('task_manager:task_deleted')); } else { /*translation:Sorry; we could not delete this task.*/ register_error(elgg_echo('task_manager:task_not_deleted')); } forward("mod/task_manager"); } ?>