diff options
Diffstat (limited to 'mod/developers/actions')
-rw-r--r-- | mod/developers/actions/developers/inspect.php | 16 | ||||
-rw-r--r-- | mod/developers/actions/developers/settings.php | 10 |
2 files changed, 24 insertions, 2 deletions
diff --git a/mod/developers/actions/developers/inspect.php b/mod/developers/actions/developers/inspect.php new file mode 100644 index 000000000..6fd9e90f9 --- /dev/null +++ b/mod/developers/actions/developers/inspect.php @@ -0,0 +1,16 @@ +<?php +/** + * Ajax endpoint for inspection + * + */ + +$inspect_type = get_input('inspect_type'); +$method = 'get' . str_replace(' ', '', $inspect_type); + +$inspector = new ElggInspector(); +if ($inspector && method_exists($inspector, $method)) { + $tree = $inspector->$method(); + echo elgg_view('developers/tree', array('tree' => $tree)); +} else { + echo 'error'; +} diff --git a/mod/developers/actions/developers/settings.php b/mod/developers/actions/developers/settings.php index d8be34866..811fd22c0 100644 --- a/mod/developers/actions/developers/settings.php +++ b/mod/developers/actions/developers/settings.php @@ -17,8 +17,6 @@ if (get_input('view_path_cache')) { elgg_disable_filepath_cache(); } -elgg_set_plugin_setting('display_errors', get_input('display_errors'), 'developers'); - $debug = get_input('debug_level'); if ($debug) { set_config('debug', $debug, $site->getGUID()); @@ -26,4 +24,12 @@ if ($debug) { unset_config('debug', $site->getGUID()); } +$simple_settings = array('display_errors', 'screen_log', 'show_strings', + 'wrap_views', 'log_events',); +foreach ($simple_settings as $setting) { + elgg_set_plugin_setting($setting, get_input($setting), 'developers'); +} + +system_message(elgg_echo('developers:settings:success')); + forward(REFERER); |