From 418b878bd2f6ff7bac49f18801baab17e46cdc47 Mon Sep 17 00:00:00 2001 From: Robin Kluth Date: Sat, 15 Apr 2023 18:21:23 +0200 Subject: [PATCH] * Fixing css for dark mode * Do not log, if the script pid is not the originating one * add warning, if external volumes are going to be saved. --- src/include/ABHelper.php | 10 ++++++---- src/pages/content/settings.php | 14 +++++++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/include/ABHelper.php b/src/include/ABHelper.php index a8cbfcf..485b0d3 100644 --- a/src/include/ABHelper.php +++ b/src/include/ABHelper.php @@ -90,9 +90,9 @@ public static function backupLog(string $msg, string $level = self::LOGLEVEL_INF } /** - * Do not log, if the script is not running + * Do not log, if the script is not running or the requesting pid is not the script pid */ - if (!self::scriptRunning()) { + if (!self::scriptRunning() || self::scriptRunning() != getmypid()) { return; } @@ -270,12 +270,14 @@ public static function backupContainer($container, $destination) { $volumes = self::getContainerVolumes($container); if ($containerSettings['backupExtVolumes'] == 'no') { - self::backupLog("Should NOT backup ext volumes, sanitizing...", self::LOGLEVEL_DEBUG); + self::backupLog("Should NOT backup ext volumes, sanitizing them...", self::LOGLEVEL_DEBUG); foreach ($volumes as $index => $volume) { if (!self::isVolumeWithinAppdata($volume)) { unset($volumes[$index]); } } + } else { + self::backupLog("Backing up EXTERNAL volumes, because its enabled!", self::LOGLEVEL_WARN); } if (empty($volumes)) { @@ -430,7 +432,7 @@ public static function isVolumeWithinAppdata($volume) { foreach ($abSettings->allowedSources as $appdataPath) { $appdataPath = rtrim($appdataPath, '/'); if (str_starts_with($volume, $appdataPath)) { - self::backupLog(__METHOD__ . ": $appdataPath IS within $volume.", self::LOGLEVEL_DEBUG); + self::backupLog("Volume '$volume' IS within AppdataPath '$appdataPath'!", self::LOGLEVEL_DEBUG); return true; } } diff --git a/src/pages/content/settings.php b/src/pages/content/settings.php index 1a9b00f..98d3be6 100644 --- a/src/pages/content/settings.php +++ b/src/pages/content/settings.php @@ -129,7 +129,11 @@ /** * Please stop using global variables 🤐 */ -$bgcolor = strstr('white,azure', $display['theme']) ? '#f2f2f2' : '#1c1c1c'; +if (strstr('white,azure', $display['theme'])) { + $bgcolor = '#f2f2f2'; +} else { + $bgcolor = '#1c1c1c'; +} ?> @@ -145,6 +149,14 @@ display: none } + blockquote select, blockquote textarea { + color: black; + } + + blockquote textarea:focus { + background-color: unset; + } + .dockerSettings dt { width: 54%; }