Merge branch 'Froxlor:master' into logo-custom-login

This commit is contained in:
Daniel
2021-07-07 13:30:22 +08:00
committed by GitHub

View File

@@ -28,7 +28,7 @@
* @author Froxlor team <team@froxlor.org> (2010-) * @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Install * @package Install
* *
*/ */
class FroxlorInstall class FroxlorInstall
{ {
@@ -784,7 +784,7 @@ class FroxlorInstall
} }
// language selection // language selection
$language_options = ''; $language_options = '';
foreach ($this->_languages as $language_name => $language_file) { foreach ($this->_languages as $language_file => $language_name) {
$language_options .= \Froxlor\UI\HTML::makeoption($language_name, $language_file, $this->_activelng, true, true); $language_options .= \Froxlor\UI\HTML::makeoption($language_name, $language_file, $this->_activelng, true, true);
} }
// get language-form-template // get language-form-template
@@ -867,19 +867,24 @@ class FroxlorInstall
} }
// show list of available distro's // show list of available distro's
$distributions_select_data = [];
$distros = glob(\Froxlor\FileDir::makeCorrectDir(\Froxlor\Froxlor::getInstallDir() . '/lib/configfiles/') . '*.xml'); $distros = glob(\Froxlor\FileDir::makeCorrectDir(\Froxlor\Froxlor::getInstallDir() . '/lib/configfiles/') . '*.xml');
foreach ($distros as $_distribution) { foreach ($distros as $_distribution) {
$dist = new \Froxlor\Config\ConfigParser($_distribution); $dist = new \Froxlor\Config\ConfigParser($_distribution);
$dist_display = $dist->distributionName . " " . $dist->distributionCodename . " (" . $dist->distributionVersion . ")"; $dist_display = $dist->distributionName . " " . $dist->distributionCodename . " (" . $dist->distributionVersion . ")";
if (!array_key_exists($dist_display, $distributions_select_data)) {
$distributions_select_data[$dist_display] = '';
}
$distributions_select_data[$dist_display] .= str_replace(".xml", "", strtolower(basename($_distribution))); $distributions_select_data[$dist_display] .= str_replace(".xml", "", strtolower(basename($_distribution)));
} }
// sort by distribution name // sort by distribution name
ksort($distributions_select_data); ksort($distributions_select_data);
$distributions_select = '';
foreach ($distributions_select_data as $dist_display => $dist_index) { foreach ($distributions_select_data as $dist_display => $dist_index) {
// create select-box-option // create select-box-option
$distributions_select .= \Froxlor\UI\HTML::makeoption($dist_display, $dist_index, $this->_data['distribution']); $distributions_select .= \Froxlor\UI\HTML::makeoption($dist_display, $dist_index, $this->_data['distribution'] ?? '');
// $this->_data['distribution'] // $this->_data['distribution']
} }
@@ -947,7 +952,7 @@ class FroxlorInstall
* optional css * optional css
* @param string $type * @param string $type
* optional type of input-box (default: text) * optional type of input-box (default: text)
* *
* @return string * @return string
*/ */
private function _getSectionItemString($fieldname = null, $required = false, $style = "", $type = 'text') private function _getSectionItemString($fieldname = null, $required = false, $style = "", $type = 'text')
@@ -994,7 +999,6 @@ class FroxlorInstall
*/ */
private function _getSectionItemSelectbox($fieldname = null, $options = null, $style = "") private function _getSectionItemSelectbox($fieldname = null, $options = null, $style = "")
{ {
$groupname = $this->_lng['install'][$groupname];
$fieldlabel = $this->_lng['install'][$fieldname]; $fieldlabel = $this->_lng['install'][$fieldname];
$sectionitem = ""; $sectionitem = "";
@@ -1239,7 +1243,7 @@ class FroxlorInstall
* *
* @param string $template * @param string $template
* name of the template including subdirectory * name of the template including subdirectory
* *
* @return string * @return string
*/ */
private function _getTemplate($template = null) private function _getTemplate($template = null)