Skip to content

Commit fa91b2f

Browse files
author
Aaron Levy
committed
Forward port of Pressflow 6 Smart Start functionality.
1 parent 4979149 commit fa91b2f

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

includes/bootstrap.inc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2252,6 +2252,17 @@ function _drupal_bootstrap_database() {
22522252
function _drupal_bootstrap_variables() {
22532253
global $conf;
22542254

2255+
// Pressflow Smart Start
2256+
if (!empty($GLOBALS['databases']) && variable_get('pressflow_smart_start', FALSE)) {
2257+
try {
2258+
$result = db_query('SELECT s.name FROM {system} s WHERE s.name = :name', array(':name' => 'system'));
2259+
} catch (Exception $e) {
2260+
// Redirect to the installer if an essential table is missing.
2261+
include_once DRUPAL_ROOT . '/includes/install.inc';
2262+
install_goto('install.php');
2263+
}
2264+
}
2265+
22552266
// Initialize the lock system.
22562267
require_once DRUPAL_ROOT . '/' . variable_get('lock_inc', 'includes/lock.inc');
22572268
lock_initialize();

sites/default/default.settings.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,3 +444,13 @@
444444
* Remove the leading hash signs to disable.
445445
*/
446446
# $conf['allow_authorize_operations'] = FALSE;
447+
448+
/**
449+
* Smart start:
450+
*
451+
* If you would prefer to be redirected to the installation system when a
452+
* valid settings.php file is present but no tables are installed, remove
453+
* the leading hash sign below.
454+
*/
455+
# $conf['pressflow_smart_start'] = TRUE;
456+

0 commit comments

Comments
 (0)