aboutsummaryrefslogtreecommitdiff
path: root/actions/disable_languages.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
commit2d9b20157957a55bd83875775085ed31c9062577 (patch)
treef051d6d805a3448ea243379a2457be8d67dcfa5f /actions/disable_languages.php
downloadelgg-2d9b20157957a55bd83875775085ed31c9062577.tar.gz
elgg-2d9b20157957a55bd83875775085ed31c9062577.tar.bz2
Squashed 'mod/translation_editor/' content from commit 9d86955
git-subtree-dir: mod/translation_editor git-subtree-split: 9d86955e6d8b6807578f5a9da0346ac1a146881c
Diffstat (limited to 'actions/disable_languages.php')
-rw-r--r--actions/disable_languages.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/actions/disable_languages.php b/actions/disable_languages.php
new file mode 100644
index 000000000..04c3235f6
--- /dev/null
+++ b/actions/disable_languages.php
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * jQuery call to disable a set of languages
+ */
+
+ if(elgg_is_admin_logged_in()){
+ $disabled_languages = get_input("disabled_languages");
+
+ if(!empty($disabled_languages)){
+ if(is_array($disabled_languages)){
+ $temp_string = implode(",", $disabled_languages);
+ } else {
+ $temp_string = $disabled_languages;
+ }
+
+ elgg_set_plugin_setting(TRANSLATION_EDITOR_DISABLED_LANGUAGE, $temp_string, "translation_editor");
+ } else {
+ elgg_unset_plugin_setting(TRANSLATION_EDITOR_DISABLED_LANGUAGE, "translation_editor");
+ }
+ }
+
+ exit(); \ No newline at end of file