Skip to content

Commit

Permalink
* Fixing css for dark mode
Browse files Browse the repository at this point in the history
* Do not log, if the script pid is not the originating one
* add warning, if external volumes are going to be saved.
  • Loading branch information
Commifreak committed Apr 15, 2023
1 parent fb91126 commit 418b878
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/include/ABHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
}
}
Expand Down
14 changes: 13 additions & 1 deletion src/pages/content/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

?>
<link type="text/css" rel="stylesheet" href="<?php autov('/webGui/styles/jquery.filetree.css') ?>">
Expand All @@ -145,6 +149,14 @@
display: none
}

blockquote select, blockquote textarea {
color: black;
}

blockquote textarea:focus {
background-color: unset;
}

.dockerSettings dt {
width: 54%;
}
Expand Down

0 comments on commit 418b878

Please sign in to comment.