5 class DrupalBoot6 extends DrupalBoot {
7 function valid_root($path) {
8 if (!empty($path) && is_dir($path) && file_exists($path . '/index.php')) {
10 // We check for the absence of 'modules/field/field.module' to differentiate this from a D7 site.
11 // n.b. we want D5 and earlier to match here, if possible, so that we can print a 'not supported'
12 // error durring bootstrap. If someone later adds a commandfile that adds a boot class for
13 // Drupal 5, it will be tested first, so we shouldn't get here.
14 $candidate = 'includes/common.inc';
15 if (file_exists($path . '/' . $candidate) && file_exists($path . '/misc/drupal.js') && !file_exists($path . '/modules/field/field.module')) {
21 function get_version($drupal_root) {
22 $path = $drupal_root . '/modules/system/system.module';
25 if (defined('VERSION')) {
31 function get_profile() {
32 return variable_get('install_profile', 'standard');
35 function add_logger() {
36 // If needed, prod module_implements() to recognize our system_watchdog() implementation.
37 $dogs = drush_module_implements('watchdog');
38 if (!in_array('system', $dogs)) {
39 // Note that this resets module_implements cache.
40 drush_module_implements('watchdog', FALSE, TRUE);
44 function contrib_modules_paths() {
46 $this->conf_path() . '/modules',
51 function contrib_themes_paths() {
53 $this->conf_path() . '/themes',
58 function bootstrap_drupal_core($drupal_root) {
59 define('DRUPAL_ROOT', $drupal_root);
60 require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
66 function bootstrap_drupal_database_validate() {
67 return parent::bootstrap_drupal_database_validate() && $this->bootstrap_drupal_database_has_table('cache');
70 function bootstrap_drupal_database() {
71 drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
72 parent::bootstrap_drupal_database();
75 function bootstrap_drupal_configuration() {
76 drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
78 parent::bootstrap_drupal_configuration();
81 function bootstrap_drupal_full() {
82 if (!drush_get_context('DRUSH_QUIET', FALSE)) {
85 drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
86 if (!drush_get_context('DRUSH_QUIET', FALSE)) {
90 // Unset drupal error handler and restore drush's one.
91 restore_error_handler();
93 parent::bootstrap_drupal_full();