diff options
Diffstat (limited to 'phpBB/modules/acp/acp_database.php')
-rw-r--r-- | phpBB/modules/acp/acp_database.php | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/phpBB/modules/acp/acp_database.php b/phpBB/modules/acp/acp_database.php index 86f050e1df..1490882d01 100644 --- a/phpBB/modules/acp/acp_database.php +++ b/phpBB/modules/acp/acp_database.php @@ -78,7 +78,7 @@ class acp_database $schema_data = true; } - @set_time_limit(1200); + @set_time_limit(0); $time = time(); @@ -420,27 +420,37 @@ class acp_database $dir = PHPBB_ROOT_PATH . 'store/'; $dh = @opendir($dir); + $backup_files = array(); + if ($dh) { 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); - - if ($supported == 'true') + if (in_array($matches[2], $methods)) { - phpbb::$template->assign_block_vars('files', array( - 'FILE' => $file, - 'NAME' => gmdate("d-m-Y H:i:s", $matches[1]), - 'SUPPORTED' => $supported, - )); + $backup_files[gmdate("d-m-Y H:i:s", $matches[1])] = $file; } } } closedir($dh); } + if (!empty($backup_files)) + { + krsort($backup_files); + + foreach ($backup_files as $name => $file) + { + phpbb::$template->assign_block_vars('files', array( + 'FILE' => $file, + 'NAME' => $name, + 'SUPPORTED' => true, + )); + } + } + phpbb::$template->assign_vars(array( 'U_ACTION' => $this->u_action . '&action=submit', )); @@ -540,6 +550,7 @@ class base_extractor function write_end() { static $close; + if ($this->store) { if ($close === null) |