mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-03-06 10:17:05 +00:00
数据库备份
This commit is contained in:
parent
fbb1e41ff7
commit
7a79e967bf
2
vendor/tp5er/tp5-databackup/src/Backup.php
vendored
2
vendor/tp5er/tp5-databackup/src/Backup.php
vendored
@ -135,6 +135,7 @@ class Backup
|
||||
$glob = new \FilesystemIterator($path, $flag);
|
||||
$list = array();
|
||||
foreach ($glob as $name => $file) {
|
||||
$info['filename'] = $name;
|
||||
if (preg_match('/^\\d{8,8}-\\d{6,6}-\\d+\\.sql(?:\\.gz)?$/', $name)) {
|
||||
$name = sscanf($name, '%4s%2s%2s-%2s%2s%2s-%d');
|
||||
$date = "{$name[0]}-{$name[1]}-{$name[2]}";
|
||||
@ -151,7 +152,6 @@ class Backup
|
||||
$extension = strtoupper(pathinfo($file->getFilename(), PATHINFO_EXTENSION));
|
||||
$info['compress'] = $extension === 'SQL' ? '-' : $extension;
|
||||
$info['time'] = strtotime("{$date} {$time}");
|
||||
$info['filename'] = $name;
|
||||
$list["{$date} {$time}"] = $info;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user