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