aboutsummaryrefslogtreecommitdiff
path: root/mod/developers/actions/developers/settings.php
blob: 9fa96fa912c71234fbedea4b8c9197d897346aaf (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
<?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();
}

elgg_set_plugin_setting('display_errors', get_input('display_errors'), 'developers');
elgg_set_plugin_setting('screen_log', get_input('screen_log'), 'developers');

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

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

forward(REFERER);