[geeklog-cvs] geeklog: Present names of backup files unchanged
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Feb 21 09:53:24 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/cd37daba7d4b
changeset: 6788:cd37daba7d4b
user: Dirk Haun <dirk at haun-online.de>
date: Sat Feb 21 14:36:24 2009 +0100
description:
Present names of backup files unchanged
diffstat:
1 file changed, 3 insertions(+), 25 deletions(-)
public_html/admin/install/migrate.php | 28 +++-------------------------
diffs (38 lines):
diff -r 06568a815aa0 -r cd37daba7d4b public_html/admin/install/migrate.php
--- a/public_html/admin/install/migrate.php Sat Feb 21 14:04:25 2009 +0100
+++ b/public_html/admin/install/migrate.php Sat Feb 21 14:36:24 2009 +0100
@@ -338,31 +338,9 @@
// List each of the backup files in the backups directory
foreach ($backup_files as $file_path) {
- $file_path = ereg_replace('../../../backups/', '', $file_path);
- $filename = ereg_replace($backup_dir, '', $file_path);
- $tmp_file = explode('_', $filename);
-
- // Check if backup file is formatted the same way Geeklog's admin/backup.php script does
- // ie: geeklog_db_backup_2008_06_29_15_54_06.sql
- if (count($tmp_file) >= 9) {
-
- $backup_file = $tmp_file[4] . '/' . $tmp_file[5] . '/' . $tmp_file[3] . ' at ' .
- $tmp_file[6] . ':' . $tmp_file[7] . ':' . str_replace('.sql', '', $tmp_file[8]);
-
- // Check if multiple versions of the backup file exist
- if (count($tmp_file) === 10) {
-
- // If so, append (1), (2), etc.
- $file_copy_num = substr($tmp_file[9], 0, 1);
- $backup_file .= " (" . $file_copy_num . ")";
-
- }
-
- } else {
-
- $backup_file = ereg_replace($backup_dir, '', $file_path);
-
- }
+ $file_path = str_replace('../../../backups/', '', $file_path);
+ $filename = str_replace($backup_dir, '', $file_path);
+ $backup_file = str_replace($backup_dir, '', $file_path);
$display .= INST_printTab(6) . '<option value="' . $filename .'">' . $backup_file . ' (' . INST_formatSize(filesize($file_path)) . ')</option>' . LB;
More information about the geeklog-cvs
mailing list