Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
.
/**
* Logging store management.
*
* @package tool_log
* @copyright 2013 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
$action = required_param('action', PARAM_ALPHANUMEXT);
$store = required_param('store', PARAM_PLUGIN);
$PAGE->set_url('/admin/tool/log/stores.php');
$PAGE->set_context(context_system::instance());
require_admin();
require_sesskey();
$all = \tool_log\log\manager::get_store_plugins();
$enabled = get_config('tool_log', 'enabled_stores');
if (!$enabled) {
$enabled = array();
} else {
$enabled = array_flip(explode(',', $enabled));
}
$return = new moodle_url('/admin/settings.php', array('section' => 'managelogging'));
$syscontext = context_system::instance();
switch ($action) {
case 'disable':
$class = \core_plugin_manager::resolve_plugininfo_class('logstore');
$class::enable_plugin($store, false);
break;
case 'enable':
$class = \core_plugin_manager::resolve_plugininfo_class('logstore');
$class::enable_plugin($store, true);
break;
case 'up':
if (!isset($enabled[$store])) {
break;
}
$enabled = array_keys($enabled);
$enabled = array_flip($enabled);
$current = $enabled[$store];
if ($current == 0) {
break; // Already at the top.
}
$enabled = array_flip($enabled);
$enabled[$current] = $enabled[$current - 1];
$enabled[$current - 1] = $store;
set_config('enabled_stores', implode(',', $enabled), 'tool_log');
break;
case 'down':
if (!isset($enabled[$store])) {
break;
}
$enabled = array_keys($enabled);
$enabled = array_flip($enabled);
$current = $enabled[$store];
if ($current == count($enabled) - 1) {
break; // Already at the end.
}
$enabled = array_flip($enabled);
$enabled[$current] = $enabled[$current + 1];
$enabled[$current + 1] = $store;
set_config('enabled_stores', implode(',', $enabled), 'tool_log');
break;
}
redirect($return);