From 3dca6efcdcebc78387f158c009d10824664f5f05 Mon Sep 17 00:00:00 2001 From: SamBrishes Date: Thu, 14 May 2020 17:56:22 +0200 Subject: [PATCH] Allow custom names --- bl-plugins/backup/plugin.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bl-plugins/backup/plugin.php b/bl-plugins/backup/plugin.php index 4eb080a8..8d5e7c7e 100644 --- a/bl-plugins/backup/plugin.php +++ b/bl-plugins/backup/plugin.php @@ -135,10 +135,14 @@ class pluginBackup extends Plugin { $filename = pathinfo($backup,PATHINFO_FILENAME); $basename = pathinfo($backup,PATHINFO_BASENAME); + // Format Title list($name, $count) = array_pad(explode(".", $filename, 2), 2, 0); + if (($temp = Date::format($name, BACKUP_DATE_FORMAT, 'F j, Y, g:i a')) !== false) { + $name = $temp; + } $html .= '
'; - $html .= '

'.Date::format($name, BACKUP_DATE_FORMAT, 'F j, Y, g:i a').($count > 0? " ($count)": "").'

'; + $html .= '

'.$name.($count > 0? " ($count)": "").'

'; // Allow download if a zip file if ($this->zip) { $html .= ' '.$L->get('download').'';