add icon to display detailed commands/file-contents from config-templates in admin_configfiles

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-04-24 11:08:09 +02:00
parent 000cb93def
commit b5794e463f
7 changed files with 300 additions and 27 deletions

View File

@@ -47,7 +47,7 @@ if ($userinfo['change_serversettings'] == '1') {
$configfiles = new \Froxlor\Config\ConfigParser($config_dir . '/' . $distribution . ".xml");
// get distro-info
$dist_display = getCompleteDistroName($configfiles);
$dist_display = $configfiles->getCompleteDistroName();
// get all the services from the distro
$services = $configfiles->getServices();
@@ -59,10 +59,8 @@ if ($userinfo['change_serversettings'] == '1') {
foreach ($distros as $_distribution) {
// get configparser object
$dist = new \Froxlor\Config\ConfigParser($_distribution);
// get distro-info
$dist_display = getCompleteDistroName($dist);
// store in tmp array
$distributions_select[str_replace(".xml", "", strtolower(basename($_distribution)))] = $dist_display;
$distributions_select[str_replace(".xml", "", strtolower(basename($_distribution)))] = $dist->getCompleteDistroName();
}
// sort by distribution name
@@ -149,19 +147,3 @@ if ($userinfo['change_serversettings'] == '1') {
} else {
\Froxlor\UI\Response::redirectTo('admin_index.php');
}
function getCompleteDistroName($cparser)
{
// get distro-info
$dist_display = $cparser->distributionName;
if ($cparser->distributionCodename != '') {
$dist_display .= " " . $cparser->distributionCodename;
}
if ($cparser->distributionVersion != '') {
$dist_display .= " (" . $cparser->distributionVersion . ")";
}
if ($cparser->deprecated) {
$dist_display .= " [deprecated]";
}
return $dist_display;
}