diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index c160413e13..a9a25ee2dc 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -2,7 +2,8 @@ name: build-documentation on: release: - types: [published] + # only run for stable releases + types: [released] jobs: build_docs: diff --git a/bin/froxlor-cli b/bin/froxlor-cli index 68765da940..a3236bddc7 100755 --- a/bin/froxlor-cli +++ b/bin/froxlor-cli @@ -43,7 +43,19 @@ require dirname(__DIR__) . '/lib/tables.inc.php'; $application = new Application('froxlor-cli', Froxlor::getFullVersion()); // files that are no commands -$fileIgnoreList = ['CliCommand.php', 'index.html', 'install.functions.php']; +$fileIgnoreList = [ + // Current non-command files + 'CliCommand.php', + 'index.html', + 'install.functions.php', + // older files not used anymore (should be removed by the updater), but take care of it just in case + 'Action.php', + 'CmdLineHandler.php', + 'ConfigServicesCmd.php', + 'PhpSessioncleanCmd.php', + 'SwitchServerIpCmd.php', + 'UpdateCliCmd.php', +]; // directory of commands to include $cmd_files = glob(Froxlor::getInstallDir() . '/lib/Froxlor/Cli/*.php'); diff --git a/install/froxlor.sql.php b/install/froxlor.sql.php index 6ceb1b9b2e..50456bd922 100644 --- a/install/froxlor.sql.php +++ b/install/froxlor.sql.php @@ -727,7 +727,7 @@ ('panel', 'settings_mode', '0'), ('panel', 'menu_collapsed', '1'), ('panel', 'version', '2.1.0-rc3'), - ('panel', 'db_version', '202311260'); + ('panel', 'db_version', '202312050'); DROP TABLE IF EXISTS `panel_tasks`; diff --git a/install/updates/froxlor/update_2.1.inc.php b/install/updates/froxlor/update_2.1.inc.php index be2c3f03c3..76975b9155 100644 --- a/install/updates/froxlor/update_2.1.inc.php +++ b/install/updates/froxlor/update_2.1.inc.php @@ -130,8 +130,8 @@ $current_fileextension = Settings::Get('system.index_file_extension'); Database::query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup`= 'system' AND `varname`= 'index_file_extension'"); Database::query("ALTER TABLE `" . TABLE_PANEL_TEMPLATES . "` ADD `file_extension` varchar(50) NOT NULL default 'html';"); - if (strtolower(trim($current_fileextension)) != 'html') { - $stmt = Database::prepare("UPDATE TABLE `" . TABLE_PANEL_TEMPLATES . "` SET `file_extension` = :ext WHERE `templategroup` = 'files'"); + if (!empty(trim($current_fileextension)) && strtolower(trim($current_fileextension)) != 'html') { + $stmt = Database::prepare("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `file_extension` = :ext WHERE `templategroup` = 'files'"); Database::pexecute($stmt, ['ext' => strtolower(trim($current_fileextension))]); } Update::lastStepStatus(0); @@ -143,3 +143,60 @@ Update::showUpdateStep("Updating from 2.1.0-rc2 to 2.1.0-rc3", false); Froxlor::updateToVersion('2.1.0-rc3'); } + +if (Froxlor::isDatabaseVersion('202311260')) { + Update::showUpdateStep("Cleaning up old files"); + $to_clean = array( + "install/updates/froxlor/update_2.x.inc.php", + "install/updates/preconfig/preconfig_2.x.inc.php", + "lib/Froxlor/Api/Commands/CustomerBackups.php", + "lib/Froxlor/Cli/Action", + "lib/Froxlor/Cli/Action.php", + "lib/Froxlor/Cli/CmdLineHandler.php", + "lib/Froxlor/Cli/ConfigServicesCmd.php", + "lib/Froxlor/Cli/PhpSessioncleanCmd.php", + "lib/Froxlor/Cli/SwitchServerIpCmd.php", + "lib/Froxlor/Cli/UpdateCliCmd.php", + "lib/Froxlor/Cron/System/BackupCron.php", + "lib/formfields/customer/extras/formfield.backup.php", + "lib/tablelisting/customer/tablelisting.backups.php", + "templates/Froxlor/assets/mix-manifest.json", + "templates/Froxlor/assets/css", + "templates/Froxlor/assets/webfonts", + "templates/Froxlor/assets/js/main.js", + "templates/Froxlor/assets/js/main.js.LICENSE.txt", + "templates/Froxlor/src", + "templates/Froxlor/user/change_language.html.twig", + "templates/Froxlor/user/change_password.html.twig", + "templates/Froxlor/user/change_theme.html.twig", + "tests/Backup/CustomerBackupsTest.php" + ); + $disabled = explode(',', ini_get('disable_functions')); + $exec_allowed = !in_array('exec', $disabled); + $del_list = ""; + foreach ($to_clean as $filedir) { + $complete_filedir = Froxlor::getInstallDir() . $filedir; + if (file_exists($complete_filedir)) { + if ($exec_allowed) { + FileDir::safe_exec("rm -rf " . escapeshellarg($complete_filedir)); + } else { + $del_list .= "rm -rf " . escapeshellarg($complete_filedir) . PHP_EOL; + } + } + } + if ($exec_allowed) { + Update::lastStepStatus(0); + } else { + if (empty($del_list)) { + // none of the files existed + Update::lastStepStatus(0); + } else { + Update::lastStepStatus( + 1, + 'manual commands needed', + 'Please run the following commands manually:
' . $del_list . '
' + ); + } + } + Froxlor::updateToDbVersion('202312050'); +} diff --git a/lib/Froxlor/Froxlor.php b/lib/Froxlor/Froxlor.php index 2e4798121a..2f74be5879 100644 --- a/lib/Froxlor/Froxlor.php +++ b/lib/Froxlor/Froxlor.php @@ -34,7 +34,7 @@ final class Froxlor const VERSION = '2.1.0-rc3'; // Database version (YYYYMMDDC where C is a daily counter) - const DBVERSION = '202311260'; + const DBVERSION = '202312050'; // Distribution branding-tag (used for Debian etc.) const BRANDING = ''; diff --git a/templates/Froxlor/assets/scss/components/_card.scss b/templates/Froxlor/assets/scss/components/_card.scss index abd1e17e3e..cac90bdf58 100644 --- a/templates/Froxlor/assets/scss/components/_card.scss +++ b/templates/Froxlor/assets/scss/components/_card.scss @@ -22,6 +22,9 @@ } } } +.list-group-item { + background: $white; +} @include color-mode(dark) { .card, .list-group-item {