summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-10-08 12:38:20 +0000
committerDries Buytaert <dries@buytaert.net>2005-10-08 12:38:20 +0000
commit709b9005f57be838f3a0d4f516dd0d755d2ee5f2 (patch)
treeedf195b69d20283c34496f861e0230b7f7b61c1e /includes/common.inc
parent7863be5e82ccfbaa4aa9bac2343ad9e560130b44 (diff)
downloadbrdo-709b9005f57be838f3a0d4f516dd0d755d2ee5f2.tar.gz
brdo-709b9005f57be838f3a0d4f516dd0d755d2ee5f2.tar.bz2
- Modified version of patch #32622 by kbahey: added 'site offline/maintenance' feature.
(Untested because the admin/settings page doesn't work yet.)
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc11
1 files changed, 11 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 6f348500b..dc7a41afd 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -252,6 +252,17 @@ function drupal_goto($path = '', $query = NULL, $fragment = NULL) {
exit();
}
+
+/**
+ * Generates a site offline message
+ */
+function drupal_site_offline() {
+ header('HTTP/1.0 503 Service unavailable');
+ drupal_set_title(t('Site offline'));
+ print theme('maintenance_page', variable_get('site_offline_message',
+ t('%site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('%site' => variable_get('site_name', t('This drupal site'))))));
+}
+
/**
* Generates a 404 error if the request can not be handled.
*/