From 7b86f3b9a89682727685062a9544eadb191d60a5 Mon Sep 17 00:00:00 2001 From: David M Date: Sat, 23 Dec 2006 02:34:18 +0000 Subject: [PATCH] #6502 git-svn-id: file:///svn/phpbb/trunk@6791 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_database.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index 7949845862..4cbbdf750b 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -1094,7 +1094,7 @@ class acp_database $delete = request_var('delete', ''); $file = request_var('file', ''); - preg_match('#^(backup_\d{10,})\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches); + preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches); $file_name = $phpbb_root_path . 'store/' . $matches[0]; if (!(file_exists($file_name) && is_readable($file_name))) @@ -1110,7 +1110,7 @@ class acp_database $data = file_get_contents($file_name); - switch ($matches[2]) + switch ($matches[1]) { case 'sql.bz2': $data = bzdecompress($data); @@ -1126,7 +1126,7 @@ class acp_database { $name = $matches[0]; - switch ($matches[2]) + switch ($matches[1]) { case 'sql': $mimetype = 'text/x-sql'; @@ -1215,7 +1215,7 @@ class acp_database $dh = opendir($dir); while (($file = readdir($dh)) !== false) { - if (preg_match('#^backup_(\d{10,})_(?:[a-z\d]{16})\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches)) + if (preg_match('#^backup_(\d{10,})_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches)) { $supported = in_array($matches[2], $methods);