summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-09 22:01:42 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-09 22:01:42 +0000
commit20bac50d4a67dc44b2a40f03162a4d0d244448ce (patch)
treedb45dd0186bc2d2a26a1c806539530dfea274345 /includes
parent147bb1389a18eca73015390cc46a5fe03abfcb88 (diff)
downloadbrdo-20bac50d4a67dc44b2a40f03162a4d0d244448ce.tar.gz
brdo-20bac50d4a67dc44b2a40f03162a4d0d244448ce.tar.bz2
#299308 by redndahead, Dave Reid, dropcube, catch, redndahead, and dbabbage: Add POD to installation requirements.
Diffstat (limited to 'includes')
-rw-r--r--includes/install.inc5
-rw-r--r--includes/theme.inc4
-rw-r--r--includes/theme.maintenance.inc2
3 files changed, 8 insertions, 3 deletions
diff --git a/includes/install.inc b/includes/install.inc
index 962f14ed2..59437c909 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -208,6 +208,11 @@ function drupal_detect_baseurl($file = 'install.php') {
function drupal_detect_database_types() {
$databases = array();
+ // Initialize the database system if it has not been
+ // initialized yet. We do not initialize it earlier to make
+ // requirements check during the installation.
+ require_once DRUPAL_ROOT . '/includes/database/database.inc';
+
// We define a driver as a directory in /includes/database that in turn
// contains a database.inc file. That allows us to drop in additional drivers
// without modifying the installer.
diff --git a/includes/theme.inc b/includes/theme.inc
index cb4ca3417..328c707d3 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -571,7 +571,7 @@ function list_themes($refresh = FALSE) {
$themes = array();
// Extract from the database only when it is available.
// Also check that the site is not in the middle of an install or update.
- if (db_is_active() && !defined('MAINTENANCE_MODE')) {
+ if (!defined('MAINTENANCE_MODE') && db_is_active()) {
foreach (system_list('theme') as $theme) {
if (file_exists($theme->filename)) {
$theme->info = unserialize($theme->info);
@@ -2266,7 +2266,7 @@ function template_preprocess(&$variables, $hook) {
$variables['is_admin'] = FALSE;
$variables['is_front'] = FALSE;
$variables['logged_in'] = FALSE;
- if ($variables['db_is_active'] = db_is_active() && !defined('MAINTENANCE_MODE')) {
+ if ($variables['db_is_active'] = !defined('MAINTENANCE_MODE') && db_is_active()) {
// Check for administrators.
if (user_access('access administration pages')) {
$variables['is_admin'] = TRUE;
diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc
index daccdb13d..14d543f29 100644
--- a/includes/theme.maintenance.inc
+++ b/includes/theme.maintenance.inc
@@ -28,7 +28,6 @@ function _drupal_maintenance_theme() {
require_once DRUPAL_ROOT . '/includes/unicode.inc';
require_once DRUPAL_ROOT . '/includes/file.inc';
require_once DRUPAL_ROOT . '/includes/module.inc';
- require_once DRUPAL_ROOT . '/includes/database/database.inc';
unicode_check();
// Install and update pages are treated differently to prevent theming overrides.
@@ -39,6 +38,7 @@ function _drupal_maintenance_theme() {
if (!db_is_active()) {
// Because we are operating in a crippled environment, we need to
// bootstrap just enough to allow hook invocations to work.
+ require_once DRUPAL_ROOT . '/includes/database/database.inc';
$module_list['system']['filename'] = 'modules/system/system.module';
module_list(TRUE, FALSE, FALSE, $module_list);
drupal_load('module', 'system');