prefs: show phpinfo on system tab

This commit is contained in:
Andrew Dolgov 2019-02-20 08:51:48 +03:00
parent 6e14e575b3
commit 205a75dfb9
8 changed files with 73 additions and 3 deletions

View File

@ -81,6 +81,20 @@ class Pref_System extends Handler_Protected {
print "</div>"; print "</div>";
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 "<div class='phpinfo'>";
print preg_replace( '%^.*<body>(.*)</body>.*$%ms','$1', $info);
print "</div>";
print "</div>";
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB, PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB,
"hook_prefs_tab", "prefSystem"); "hook_prefs_tab", "prefSystem");

View File

@ -1450,6 +1450,19 @@ body.ttrss_prefs hr {
border-color: #ecf4ff; border-color: #ecf4ff;
max-width: 100%; max-width: 100%;
} }
body.ttrss_prefs .phpinfo table {
border-collapse: collapse;
}
body.ttrss_prefs .phpinfo td.e,
body.ttrss_prefs .phpinfo td.v {
border: 1px solid #ccc;
}
body.ttrss_prefs .phpinfo td.e {
font-weight: bold;
}
body.ttrss_prefs .phpinfo td.v {
font-family: monospace;
}
body.ttrss_utility.sanity_failed { body.ttrss_utility.sanity_failed {
background: #900; background: #900;
} }

File diff suppressed because one or more lines are too long

View File

@ -113,5 +113,22 @@ body.ttrss_prefs {
max-width : 100%; max-width : 100%;
} }
.phpinfo {
table {
border-collapse : collapse;
}
td.e, td.v {
border : 1px solid #ccc;
}
td.e {
font-weight : bold;
}
td.v {
font-family : monospace;
}
}
} }

View File

@ -1451,6 +1451,19 @@ body.ttrss_prefs hr {
border-color: #ecf4ff; border-color: #ecf4ff;
max-width: 100%; max-width: 100%;
} }
body.ttrss_prefs .phpinfo table {
border-collapse: collapse;
}
body.ttrss_prefs .phpinfo td.e,
body.ttrss_prefs .phpinfo td.v {
border: 1px solid #ccc;
}
body.ttrss_prefs .phpinfo td.e {
font-weight: bold;
}
body.ttrss_prefs .phpinfo td.v {
font-family: monospace;
}
body.ttrss_utility.sanity_failed { body.ttrss_utility.sanity_failed {
background: #900; background: #900;
} }

File diff suppressed because one or more lines are too long

View File

@ -1451,6 +1451,19 @@ body.ttrss_prefs hr {
border-color: #ecf4ff; border-color: #ecf4ff;
max-width: 100%; max-width: 100%;
} }
body.ttrss_prefs .phpinfo table {
border-collapse: collapse;
}
body.ttrss_prefs .phpinfo td.e,
body.ttrss_prefs .phpinfo td.v {
border: 1px solid #ccc;
}
body.ttrss_prefs .phpinfo td.e {
font-weight: bold;
}
body.ttrss_prefs .phpinfo td.v {
font-family: monospace;
}
body.ttrss_utility.sanity_failed { body.ttrss_utility.sanity_failed {
background: #900; background: #900;
} }

File diff suppressed because one or more lines are too long