mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-08 18:05:17 +02:00
[ticket/16354] Reload page after cache purge & purge time limit
PHPBB3-16354
This commit is contained in:
parent
54ab1f1e80
commit
5fb5228591
@ -133,9 +133,21 @@ function installer_shutdown_function($display_errors)
|
||||
$cache = new \phpbb\cache\driver\file(__DIR__ . '/../cache/installer');
|
||||
if (strpos($error['file'], realpath($cache->cache_dir)) !== false)
|
||||
{
|
||||
$cache->purge();
|
||||
$file_age = @filemtime($error['file']);
|
||||
|
||||
die('The installer has detected an issue with a cached file. Try reloading the page to resolve the issue. If you require further assistance, please visit the <a href="https://www.phpbb.com/community/">phpBB support forums</a>.');
|
||||
if ($file_age !== false && ($file_age + 60) < time())
|
||||
{
|
||||
$cache->purge();
|
||||
|
||||
$symfony_request = new \phpbb\symfony_request(new \phpbb\request\request(new \phpbb\request\type_cast_helper()));
|
||||
|
||||
header('Location: ' . $symfony_request->getRequestUri());
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
die('The installer has detected an issue with a cached file. Try reloading the page and/or manually clearing the cache to resolve the issue. If you require further assistance, please visit the <a href="https://www.phpbb.com/community/">phpBB support forums</a>.');
|
||||
}
|
||||
}
|
||||
else if ($error['type'] & $supported_error_levels)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user