aboutsummaryrefslogtreecommitdiff
path: root/mod/guidtool/actions/delete.php
blob: 36126ee107973f7c39bdf015d8fd4681219fc88e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
	global $CONFIG;
	
	admin_gatekeeper();
	action_gatekeeper();
	
	$guid = (int)get_input('guid');
	$entity = get_entity($guid);
	
	if ($entity)
	{
		if ($entity->delete())
			system_message(sprintf(elgg_echo('guidtool:deleted'), $guid));
		else
			register_error(sprintf(elgg_echo('guidtool:notdeleted'), $guid));
	}
	else
		register_error(sprintf(elgg_echo('guidtool:notdeleted'), $guid));
		
	forward($_SERVER['HTTP_REFERER']);
?>