diff options
author | Andrew Dolgov <[email protected]> | 2021-02-14 12:29:08 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-14 12:29:08 +0300 |
commit | 1c7e4782aa426dd1a003948756c51cf9d61f2163 (patch) | |
tree | c4d6c30b9dcc2c905dacdd33f3c0376da0379070 /classes | |
parent | 6b5c9c781b082c116538c313038f6d9c3ebdb757 (diff) |
prefs system: load phpinfo using inline method
Diffstat (limited to 'classes')
-rw-r--r-- | classes/pref/prefs.php | 2 | ||||
-rw-r--r-- | classes/pref/system.php | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 19f5221eb..6e4deb223 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -1032,7 +1032,6 @@ class Pref_Prefs extends Handler_Protected { if (this.domNode.querySelector('.loading')) window.setTimeout(() => { xhrPost("backend.php", {op: 'pref-prefs', method: 'index_auth'}, (transport) => { - console.log(this); this.attr('content', transport.responseText); }); }, 100); @@ -1047,7 +1046,6 @@ class Pref_Prefs extends Handler_Protected { if (this.domNode.querySelector('.loading')) window.setTimeout(() => { xhrPost("backend.php", {op: 'pref-prefs', method: 'index_plugins'}, (transport) => { - console.log(this); this.attr('content', transport.responseText); }); }, 200); diff --git a/classes/pref/system.php b/classes/pref/system.php index 1adddf116..14df6f8d1 100644 --- a/classes/pref/system.php +++ b/classes/pref/system.php @@ -173,10 +173,15 @@ class Pref_System extends Handler_Protected { </div> <div dojoType='dijit.layout.AccordionPane' title='<i class="material-icons">info</i> <?= __('PHP Information') ?>'> - <script type='dojo/method' event='onSelected' args='evt'> - Helpers.System.getPHPInfo(this); - </script> - <div class='phpinfo'><?= __("Loading, please wait...") ?></div> + <script type='dojo/method' event='onSelected' args='evt'> + if (this.domNode.querySelector('.loading')) + window.setTimeout(() => { + xhrPost("backend.php", {op: 'pref-system', method: 'getphpinfo'}, (transport) => { + this.attr('content', `<div class='phpinfo'>${transport.responseText}</div>`); + }); + }, 200); + </script> + <span class='loading'><?= __("Loading, please wait...") ?></span> </div> <?php PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB, "prefSystem") ?> |