mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
git-svn-id: file:///svn/phpbb/trunk@6791 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
803f64c724
commit
7b86f3b9a8
1 changed files with 4 additions and 4 deletions
|
@ -1094,7 +1094,7 @@ class acp_database
|
||||||
$delete = request_var('delete', '');
|
$delete = request_var('delete', '');
|
||||||
$file = request_var('file', '');
|
$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];
|
$file_name = $phpbb_root_path . 'store/' . $matches[0];
|
||||||
|
|
||||||
if (!(file_exists($file_name) && is_readable($file_name)))
|
if (!(file_exists($file_name) && is_readable($file_name)))
|
||||||
|
@ -1110,7 +1110,7 @@ class acp_database
|
||||||
|
|
||||||
$data = file_get_contents($file_name);
|
$data = file_get_contents($file_name);
|
||||||
|
|
||||||
switch ($matches[2])
|
switch ($matches[1])
|
||||||
{
|
{
|
||||||
case 'sql.bz2':
|
case 'sql.bz2':
|
||||||
$data = bzdecompress($data);
|
$data = bzdecompress($data);
|
||||||
|
@ -1126,7 +1126,7 @@ class acp_database
|
||||||
{
|
{
|
||||||
$name = $matches[0];
|
$name = $matches[0];
|
||||||
|
|
||||||
switch ($matches[2])
|
switch ($matches[1])
|
||||||
{
|
{
|
||||||
case 'sql':
|
case 'sql':
|
||||||
$mimetype = 'text/x-sql';
|
$mimetype = 'text/x-sql';
|
||||||
|
@ -1215,7 +1215,7 @@ class acp_database
|
||||||
$dh = opendir($dir);
|
$dh = opendir($dir);
|
||||||
while (($file = readdir($dh)) !== false)
|
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);
|
$supported = in_array($matches[2], $methods);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue