Rename ServiceUnavailableException & alter maintenance
This commit is contained in:
parent
62fd5375dc
commit
9fb111bca2
|
@ -988,7 +988,7 @@ class App
|
|||
header('Refresh: 120; url=' . $this->getBaseURL() . "/" . $this->query_string);
|
||||
|
||||
Module\Special\HTTPException::rawContent(
|
||||
new HTTPException\ServiceUnavaiableException('The node is currently overloaded. Please try again later.')
|
||||
new HTTPException\ServiceUnavailableException('The node is currently overloaded. Please try again later.')
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ namespace Friendica\Module;
|
|||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
/**
|
||||
|
@ -25,13 +25,8 @@ class Maintenance extends BaseModule
|
|||
System::externalRedirect($reason, 307);
|
||||
}
|
||||
|
||||
header('HTTP/1.1 503 Service Temporarily Unavailable');
|
||||
header('Status: 503 Service Temporarily Unavailable');
|
||||
header('Retry-After: 600');
|
||||
|
||||
return Renderer::replaceMacros(Renderer::getMarkupTemplate('maintenance.tpl'), [
|
||||
'$sysdown' => L10n::t('System down for maintenance'),
|
||||
'$reason' => $reason
|
||||
]);
|
||||
$exception = new HTTPException\ServiceUnavailableException($reason);
|
||||
$exception->httpdesc = L10n::t('System down for maintenance');
|
||||
throw $exception;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Friendica\Network\HTTPException;
|
|||
|
||||
use Friendica\Network\HTTPException;
|
||||
|
||||
class ServiceUnavaiableException extends HTTPException
|
||||
class ServiceUnavailableException extends HTTPException
|
||||
{
|
||||
protected $code = 503;
|
||||
}
|
Loading…
Reference in New Issue
Block a user