Skip to content

Commit

Permalink
Merge branch 'release/1.10.41.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed May 9, 2023
2 parents 7d600ed + 35d4574 commit 462a952
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.10.41.1
## 05/09/2023

1. [](#improved)
* Fixed another Toolbox deprecation error for `lastBackup()`

# v1.10.41
## 05/09/2023

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Admin Panel
slug: admin
type: plugin
version: 1.10.41
version: 1.10.41.1
description: Adds an advanced administration panel to manage your site
icon: empire
author:
Expand Down
8 changes: 5 additions & 3 deletions classes/plugin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1438,15 +1438,17 @@ public function logEntry()
*/
public function lastBackup()
{
$file = JsonFile::instance($this->grav['locator']->findResource('log://backup.log'));
$content = $file->content();
if (empty($content)) {
$backup_file = $this->grav['locator']->findResource('log://backup.log');

if (!file_exists($backup_file)) {
return [
'days' => '∞',
'chart_fill' => 100,
'chart_empty' => 0
];
}
$file = JsonFile::instance($backup_file);
$content = $file->content();

$backup = new \DateTime();
$backup->setTimestamp($content['time']);
Expand Down

0 comments on commit 462a952

Please sign in to comment.