delete file for elgg_notify plugin: Revision

Last updated by mariano

copy in start.php:

function notify_removeNew($guid) {

delete_entities("object", "notification", $guid);

}

function notify_removeNotify($guid) {

{

return delete_entity($guid);

}

 

copy in actions/delete.php:

<?php

 

gatekeeper();

 

$user = $_SESSION['user'];

$guid = get_input('guid');

$ajax = get_input('ajax');

if(!empty($guid)){

if(!super_notify_removeNotify($guid)) {

system_message(elgg_echo('notifications:delete:fail'));

}

// Just in case, remove the new notifies object

super_notify_removeNewNotifies($guid);

}

if(empty($ajax)) {

forward($_SERVER['HTTP_REFERER']);

}

?>