1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 11:44:08 +02:00

- fixing some bugs

- removing utf8 characters from email files (has been discussed internally, you guys know why)
- making sure some opendir calls are checked before calling readdir.


git-svn-id: file:///svn/phpbb/trunk@6912 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-01-20 17:58:27 +00:00
parent fae887b3a1
commit 31e546c5e4
47 changed files with 253 additions and 147 deletions

View File

@@ -1212,24 +1212,28 @@ class acp_database
}
$dir = $phpbb_root_path . 'store/';
$dh = opendir($dir);
while (($file = readdir($dh)) !== false)
{
if (preg_match('#^backup_(\d{10,})_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
{
$supported = in_array($matches[2], $methods);
$dh = @opendir($dir);
if ($supported == 'true')
if ($dh)
{
while (($file = readdir($dh)) !== false)
{
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'