diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 14:58:52 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 14:58:52 -0300 |
commit | 323fdcc59e467e6437aad244c475ed0184c7a020 (patch) | |
tree | 0dc86b7aeb394ee6d1c3c9106362dea16c982cde /mod/translation_editor/actions/disable_languages.php | |
parent | 8d66daa258a58b65c3658b38e99382732c88e017 (diff) | |
parent | 2d9b20157957a55bd83875775085ed31c9062577 (diff) | |
download | elgg-323fdcc59e467e6437aad244c475ed0184c7a020.tar.gz elgg-323fdcc59e467e6437aad244c475ed0184c7a020.tar.bz2 |
Merge commit '2d9b20157957a55bd83875775085ed31c9062577' as 'mod/translation_editor'
Diffstat (limited to 'mod/translation_editor/actions/disable_languages.php')
-rw-r--r-- | mod/translation_editor/actions/disable_languages.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mod/translation_editor/actions/disable_languages.php b/mod/translation_editor/actions/disable_languages.php new file mode 100644 index 000000000..04c3235f6 --- /dev/null +++ b/mod/translation_editor/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 |