Skip to content

Commit

Permalink
Option to disable success notification
Browse files Browse the repository at this point in the history
  • Loading branch information
Commifreak committed Oct 16, 2023
1 parent 327569c commit 20fc7cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/include/ABSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class ABSettings {
public string $postRunScript = '';
public string $includeFiles = '';
public string $backupVMMeta = 'yes';
public string $successLogWanted = 'no';

public function __construct() {

Expand Down
7 changes: 7 additions & 0 deletions src/pages/content/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,13 @@ class="fa fa-clock-o title"></i>Notifications and scheduling</span>
</select>
</dd>

<dt><b>Create success notification:</b></dt>
<dd><select id='successLogWanted' name="successLogWanted" data-setting="<?= $abSettings->successLogWanted ?>">
<option value='no'>No</option>
<option value='yes'>Yes</option>
</select>
</dd>

<dt><b>Scheduled Backup Frequency</b></dt>
<dd><select id='backupFrequency' name="backupFrequency" onchange="checkBackupFrequency();"
data-setting="<?= $abSettings->backupFrequency ?>">
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
ABHelper::backupLog("DONE! Thanks for using this plugin and have a safe day ;)");
ABHelper::backupLog("❤️");

if (!$errorOccured) {
if (!$errorOccured && $abSettings->successLogWanted == 'yes') {
$backupEnded = new DateTime();
$diff = $backupStarted->diff($backupEnded);
$backupDuration = $diff->h . "h, " . $diff->i . "m";
Expand Down

0 comments on commit 20fc7cd

Please sign in to comment.