summaryrefslogtreecommitdiff
path: root/classes/pref/system.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-14 12:29:08 +0300
committerAndrew Dolgov <[email protected]>2021-02-14 12:29:08 +0300
commit1c7e4782aa426dd1a003948756c51cf9d61f2163 (patch)
treec4d6c30b9dcc2c905dacdd33f3c0376da0379070 /classes/pref/system.php
parent6b5c9c781b082c116538c313038f6d9c3ebdb757 (diff)
prefs system: load phpinfo using inline method
Diffstat (limited to 'classes/pref/system.php')
-rw-r--r--classes/pref/system.php13
1 files changed, 9 insertions, 4 deletions
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") ?>