aboutsummaryrefslogtreecommitdiff
path: root/mod/translation_editor/actions/delete.php
blob: b965150e94df6cff1a3c455fd9ba29499fb5888a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php 
	admin_gatekeeper();
	
	$lang = get_input("current_language");
	$plugin = get_input("plugin");
	
	if(!empty($lang) && !empty($plugin)){
		if(translation_editor_delete_translation($lang, $plugin)){
			// merge translations
			translation_editor_merge_translations($lang, true);
			
			system_message(elgg_echo("translation_editor:action:delete:success"));
		} else {
			register_error(elgg_echo("translation_editor:action:delete:error:delete"));
		}
	} else {
		register_error(elgg_echo("translation_editor:action:delete:error:input"));
	}

	forward("translation_editor/" . $lang);