diff options
author | Andrew Dolgov <[email protected]> | 2021-02-12 21:43:38 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-12 21:43:38 +0300 |
commit | 6af83e3881b3f38104027275913f7fc55251d020 (patch) | |
tree | 9fd5747220b0137243e2f5b9c0c0ec4ced797069 /classes/pref/system.php | |
parent | e6624cf631f772f2a1eac9412e7a96d6545e91e6 (diff) |
drop ENABLE_GZIP_OUTPUT; system prefs: load php info only if needed
Diffstat (limited to 'classes/pref/system.php')
-rw-r--r-- | classes/pref/system.php | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/classes/pref/system.php b/classes/pref/system.php index d91339698..a7512915a 100644 --- a/classes/pref/system.php +++ b/classes/pref/system.php @@ -25,6 +25,15 @@ class Pref_System extends Handler_Protected { $this->pdo->query("DELETE FROM ttrss_error_log"); } + function getphpinfo() { + ob_start(); + phpinfo(); + $info = ob_get_contents(); + ob_end_clean(); + + print preg_replace( '%^.*<body>(.*)</body>.*$%ms','$1', $info); + } + private function log_viewer(int $page, int $severity) { $errno_values = []; @@ -167,14 +176,11 @@ class Pref_System extends Handler_Protected { print "<div dojoType='dijit.layout.AccordionPane' title='<i class=\"material-icons\">info</i> ".__('PHP Information')."'>"; - ob_start(); - phpinfo(); - $info = ob_get_contents(); - ob_end_clean(); + print "<script type='dojo/method' event='onSelected' args='evt'> + Helpers.System.getPHPInfo(this); + </script>"; - print "<div class='phpinfo'>"; - print preg_replace( '%^.*<body>(.*)</body>.*$%ms','$1', $info); - print "</div>"; + print "<div class='phpinfo'>" . __("Loading, please wait...") . "</div>"; print "</div>"; # accordion pane |