aboutsummaryrefslogtreecommitdiff
path: root/mod/developers/actions/developers/settings.php
blob: 5a7f97cd3163b1f0b53942314efba4a0f1d9187c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
 * Save the developer settings
 */

$site = elgg_get_site_entity();

if (get_input('simple_cache')) {
	elgg_enable_simplecache();
} else {
	elgg_disable_simplecache();
}

if (get_input('view_path_cache')) {
	elgg_enable_filepath_cache();
} else {
	elgg_disable_filepath_cache();
}

$debug = get_input('debug_level');
if ($debug) {
	set_config('debug', $debug, $site->getGUID());
} else {
	unset_config('debug', $site->getGUID());
}

$simple_settings = array('display_errors', 'screen_log', 'show_strings');
foreach ($simple_settings as $setting) {
	elgg_set_plugin_setting($setting, get_input($setting), 'developers');
}

system_message(elgg_echo('developers:settings:success'));

forward(REFERER);