aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_database.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp/acp_database.php')
-rw-r--r--phpBB/includes/acp/acp_database.php28
1 files changed, 16 insertions, 12 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 4cbbdf750b..2e75e59456 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -1212,24 +1212,28 @@ class acp_database
}
$dir = $phpbb_root_path . 'store/';
- $dh = opendir($dir);
- while (($file = readdir($dh)) !== false)
+ $dh = @opendir($dir);
+
+ if ($dh)
{
- if (preg_match('#^backup_(\d{10,})_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
+ while (($file = readdir($dh)) !== false)
{
- $supported = in_array($matches[2], $methods);
-
- if ($supported == 'true')
+ if (preg_match('#^backup_(\d{10,})_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
{
- $template->assign_block_vars('files', array(
- 'FILE' => $file,
- 'NAME' => gmdate("d-m-Y H:i:s", $matches[1]),
- 'SUPPORTED' => $supported
- ));
+ $supported = in_array($matches[2], $methods);
+
+ if ($supported == 'true')
+ {
+ $template->assign_block_vars('files', array(
+ 'FILE' => $file,
+ 'NAME' => gmdate("d-m-Y H:i:s", $matches[1]),
+ 'SUPPORTED' => $supported
+ ));
+ }
}
}
+ closedir($dh);
}
- closedir($dh);
$template->assign_vars(array(
'U_ACTION' => $this->u_action . '&action=submit'