aboutsummaryrefslogtreecommitdiff
path: root/actions/disable_languages.php
blob: 04c3235f622ce1ca53966713fda0ac8d54b98e97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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();