aboutsummaryrefslogtreecommitdiff
path: root/mod/translation_editor/actions/delete.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-15 14:58:52 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-15 14:58:52 -0300
commit323fdcc59e467e6437aad244c475ed0184c7a020 (patch)
tree0dc86b7aeb394ee6d1c3c9106362dea16c982cde /mod/translation_editor/actions/delete.php
parent8d66daa258a58b65c3658b38e99382732c88e017 (diff)
parent2d9b20157957a55bd83875775085ed31c9062577 (diff)
downloadelgg-323fdcc59e467e6437aad244c475ed0184c7a020.tar.gz
elgg-323fdcc59e467e6437aad244c475ed0184c7a020.tar.bz2
Merge commit '2d9b20157957a55bd83875775085ed31c9062577' as 'mod/translation_editor'
Diffstat (limited to 'mod/translation_editor/actions/delete.php')
-rw-r--r--mod/translation_editor/actions/delete.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/mod/translation_editor/actions/delete.php b/mod/translation_editor/actions/delete.php
new file mode 100644
index 000000000..b965150e9
--- /dev/null
+++ b/mod/translation_editor/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);