Merge pull request #3245 from annando/issue-3242

Issue 3242: Define a maintenance reason
This commit is contained in:
Hypolite Petovan 2017-03-19 11:06:25 -04:00 committed by GitHub
commit 65f809f5cb
4 changed files with 39 additions and 12 deletions

View file

@ -1,11 +1,14 @@
<?php
use \Friendica\Core\Config;
function maintenance_content(App $a) {
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 600');
return replace_macros(get_markup_template('maintenance.tpl'), array(
'$sysdown' => t('System down for maintenance')
'$sysdown' => t('System down for maintenance'),
'$reason' => Config::get('system', 'maintenance_reason')
));
}