summaryrefslogtreecommitdiff
path: root/includes/theme.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/theme.inc')
-rw-r--r--includes/theme.inc27
1 files changed, 26 insertions, 1 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index 02f74fd36..04100a8e9 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -160,7 +160,7 @@ function list_theme_engines($refresh = FALSE) {
function theme() {
global $theme, $theme_engine;
- if (!$theme) {
+ if ($theme === NULL) {
// Initialize the enabled theme.
$theme = init_theme();
}
@@ -440,6 +440,31 @@ function theme_page($content) {
return $output;
}
+function theme_maintenance_page($content) {
+ drupal_set_header('Content-Type: text/html; charset=utf-8');
+ theme('add_style', 'misc/drupal.css');
+ theme('add_style', 'misc/maintenance.css');
+ $output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
+ $output .= '<html xmlns="http://www.w3.org/1999/xhtml">';
+ $output .= '<head>';
+ $output .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
+ $output .= ' <title>'. drupal_get_title() .'</title>';
+ $output .= theme_get_styles();
+ $output .= '</head>';
+ $output .= '<body>';
+ $output .= '<h1>' . drupal_get_title() . '</h1>';
+
+ $output .= theme('status_messages');
+
+ $output .= "\n<!-- begin content -->\n";
+ $output .= $content;
+ $output .= "\n<!-- end content -->\n";
+
+ $output .= '</body></html>';
+
+ return $output;
+}
+
/**
* Returns themed set of status and/or error messages. The messages are grouped
* by type.