Normalizes phpinfo-output

- includes the phpinfo-css style which is normally located in the body
This commit is contained in:
Frank Hochmuth 2024-04-01 16:46:54 +02:00 committed by GitHub
commit 7215f20bfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 70 additions and 1 deletions

View File

@ -196,7 +196,7 @@ class admin_maintain_default extends AdminPanelAction {
$info = ob_get_contents();
ob_end_clean();
$this->smarty->assign('phpinfo', preg_replace('%^.*<body>(.*)</body>.*$%ms', '$1', $info));
$this->smarty->assign('phpinfo', preg_replace('%^.*<body>(.*)</body>.*$%ms', '<div id="phpinfo">$1<div>', $info));
}
return PANEL_NOREDIRECT;

View File

@ -577,3 +577,26 @@ a.link-enable:hover {
}
form { margin: auto }
/* ===== PHP Info ===== */
#phpinfo, #phpinfo h1, #phpinfo tr, #phpinfo td { margin: unset !IMPORTANT ;text-align: unset !IMPORTANT; letter-spacing: unset !IMPORTANT }
#phpinfo body { background-color: #fff; color: #222; font-family: sans-serif }
#phpinfo pre { margin: 0; font-family: monospace }
#phpinfo a:link { color: #009; text-decoration: none; background-color: #fff }
#phpinfo a:hover { text-decoration: underline }
#phpinfo table { border-collapse: collapse; border: 0; width: 100%; box-shadow: 1px 2px 3px #ccc }
#phpinfo .center { text-align: center }
#phpinfo .center table { margin: 1em auto; text-align: left }
#phpinfo .center th { text-align: center !IMPORTANT }
#phpinfo td, th { border: 1px solid #666; font-size: 75%; vertical-align: baseline; padding: 4px 5px }
#phpinfo th { position: sticky; top: 0; background: inherit }
#phpinfo h1 { font-size: 150% }
#phpinfo h2 { font-size: 125% }
#phpinfo .p { text-align: left }
#phpinfo .e { background-color: #ccf; width: 33.33%; font-weight: bold }
#phpinfo .h { background-color: #99c; font-weight: bold }
#phpinfo .v { background-color: #ddd; max-width: 33.33%; overflow-x: auto; word-wrap: break-word }
#phpinfo .v i { color: #999 }
#phpinfo img { float: right; border: 0 }
#phpinfo hr { width: 100%; background-color: #ccc; border: 0; height: 1px }

View File

@ -579,3 +579,26 @@ a.link-general:hover, .main-cell a:hover {
#footer { color: black }
form { margin: auto }
/* ===== PHP Info ===== */
#phpinfo, #phpinfo h1, #phpinfo tr, #phpinfo td { margin: unset !IMPORTANT ;text-align: unset !IMPORTANT; letter-spacing: unset !IMPORTANT }
#phpinfo body { background-color: #fff; color: #222; font-family: sans-serif }
#phpinfo pre { margin: 0; font-family: monospace }
#phpinfo a:link { color: #009; text-decoration: none; background-color: #fff }
#phpinfo a:hover { text-decoration: underline }
#phpinfo table { border-collapse: collapse; border: 0; width: 100%; box-shadow: 1px 2px 3px #ccc }
#phpinfo .center { text-align: center }
#phpinfo .center table { margin: 1em auto; text-align: left }
#phpinfo .center th { text-align: center !IMPORTANT }
#phpinfo td, th { border: 1px solid #666; font-size: 75%; vertical-align: baseline; padding: 4px 5px }
#phpinfo th { position: sticky; top: 0; background: inherit }
#phpinfo h1 { font-size: 150% }
#phpinfo h2 { font-size: 125% }
#phpinfo .p { text-align: left }
#phpinfo .e { background-color: #ccf; width: 33.33%; font-weight: bold }
#phpinfo .h { background-color: #99c; font-weight: bold }
#phpinfo .v { background-color: #ddd; max-width: 33.33%; overflow-x: auto; word-wrap: break-word }
#phpinfo .v i { color: #999 }
#phpinfo img { float: right; border: 0 }
#phpinfo hr { width: 100%; background-color: #ccc; border: 0; height: 1px }

View File

@ -567,3 +567,26 @@ a.link-general:hover, .main-cell a:hover {
#admin-content ul.msgs { margin: 0 }
form { margin: auto }
/* ===== PHP Info ===== */
#phpinfo, #phpinfo h1, #phpinfo tr, #phpinfo td { margin: unset !IMPORTANT ;text-align: unset !IMPORTANT; letter-spacing: unset !IMPORTANT }
#phpinfo body { background-color: #fff; color: #222; font-family: sans-serif }
#phpinfo pre { margin: 0; font-family: monospace }
#phpinfo a:link { color: #009; text-decoration: none; background-color: #fff }
#phpinfo a:hover { text-decoration: underline }
#phpinfo table { border-collapse: collapse; border: 0; width: 100%; box-shadow: 1px 2px 3px #ccc }
#phpinfo .center { text-align: center }
#phpinfo .center table { margin: 1em auto; text-align: left }
#phpinfo .center th { text-align: center !IMPORTANT }
#phpinfo td, th { border: 1px solid #666; font-size: 75%; vertical-align: baseline; padding: 4px 5px }
#phpinfo th { position: sticky; top: 0; background: inherit }
#phpinfo h1 { font-size: 150% }
#phpinfo h2 { font-size: 125% }
#phpinfo .p { text-align: left }
#phpinfo .e { background-color: #ccf; width: 33.33%; font-weight: bold }
#phpinfo .h { background-color: #99c; font-weight: bold }
#phpinfo .v { background-color: #ddd; max-width: 33.33%; overflow-x: auto; word-wrap: break-word }
#phpinfo .v i { color: #999 }
#phpinfo img { float: right; border: 0 }
#phpinfo hr { width: 100%; background-color: #ccc; border: 0; height: 1px }