Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
maintenance.php
Go to the documentation of this file.
1 <?php
2 
4 
5 $message = $site->getPrivateSetting('elgg_maintenance_message');
6 
7 if (!$message) {
8  $message = elgg_echo('admin:maintenance_mode:default_message');
9 }
10 
11 elgg_load_css('maintenance');
12 
13 header("HTTP/1.1 503 Service Unavailable");
14 
15 $body = elgg_view_layout('maintenance', array(
16  'message' => $message,
17  'site' => $site,
18 ));
19 
20 echo elgg_view_page($site->name, $body, 'maintenance');
elgg_get_site_entity($site_guid=0)
Get an entity (default is current site)
Definition: sites.php:18
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_layout($layout_name, $vars=array())
Displays a layout with optional parameters.
Definition: views.php:679
elgg_load_css($name)
Load a CSS file for this page.
Definition: elgglib.php:286
$message
Definition: maintenance.php:5
$site
Definition: maintenance.php:3
$body
Maintenance mode layout.
Definition: maintenance.php:9
elgg_view_page($title, $body, $page_shell= 'default', $vars=array())
Assembles and outputs a full page.
Definition: views.php:437