diff options
Diffstat (limited to 'actions/delete.php')
-rw-r--r-- | actions/delete.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actions/delete.php b/actions/delete.php new file mode 100644 index 000000000..b965150e9 --- /dev/null +++ b/actions/delete.php @@ -0,0 +1,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); |