]> git.mxchange.org Git - friendica.git/blob - mod/maintenance.php
Fix formatting in mod
[friendica.git] / mod / maintenance.php
1 <?php
2
3 use Friendica\App;
4 use Friendica\Core\Config;
5
6 function maintenance_content(App $a) {
7
8         $reason = Config::get('system', 'maintenance_reason');
9
10         if (substr(normalise_link($reason), 0, 7) == 'http://') {
11                 header("HTTP/1.1 307 Temporary Redirect");
12                 header("Location:".$reason);
13                 return;
14         }
15
16         header('HTTP/1.1 503 Service Temporarily Unavailable');
17         header('Status: 503 Service Temporarily Unavailable');
18         header('Retry-After: 600');
19
20         return replace_macros(get_markup_template('maintenance.tpl'), array(
21                 '$sysdown' => t('System down for maintenance'),
22                 '$reason' => $reason
23         ));
24 }