diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-07-06 03:55:10 -0700 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-07-06 03:55:10 -0700 |
commit | e4ad206bfd288463a37cfd4f86e6f343e3a35f77 (patch) | |
tree | 6a7c84a815467fc34d7ce266b682f7816427f50d /mod/developers/actions | |
parent | d15c4bdf3388b7eca709bd81c522ac1ebf087f0a (diff) | |
parent | b3382a41496bee4b66bc69421b9612bedfb77913 (diff) | |
download | elgg-e4ad206bfd288463a37cfd4f86e6f343e3a35f77.tar.gz elgg-e4ad206bfd288463a37cfd4f86e6f343e3a35f77.tar.bz2 |
Merge pull request #54 from cash/dev-tools
Fixes #3564 Adds the inspection tool and logging to the web page
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); |