5 class DrupalBoot7 extends DrupalBoot {
7 function valid_root($path) {
8 if (!empty($path) && is_dir($path) && file_exists($path . '/index.php')) {
10 // We check for the presence of 'modules/field/field.module' to differentiate this from a D6 site
11 $candidate = 'includes/common.inc';
12 if (file_exists($path . '/' . $candidate) && file_exists($path . '/misc/drupal.js') && file_exists($path . '/modules/field/field.module')) {
18 function get_version($drupal_root) {
19 $path = $drupal_root . '/includes/bootstrap.inc';
22 if (defined('VERSION')) {
28 function get_profile() {
29 return drupal_get_profile();
32 function add_logger() {
33 // If needed, prod module_implements() to recognize our system_watchdog() implementation.
34 $dogs = drush_module_implements('watchdog');
35 if (!in_array('system', $dogs)) {
36 // Note that we must never clear the module_implements() cache because
37 // that would trigger larger cache rebuilds with system_cache_tables on
38 // every drush invocation. Instead we inject our system_watchdog()
39 // implementation direclty into the static cache.
40 $implementations = &drupal_static('module_implements');
41 $implementations['watchdog']['system'] = FALSE;
42 $verified_implementations = &drupal_static('module_implements:verified');
43 $verified_implementations['watchdog'] = TRUE;
47 function contrib_modules_paths() {
49 $this->conf_path() . '/modules',
54 function contrib_themes_paths() {
56 $this->conf_path() . '/themes',
61 function bootstrap_drupal_core($drupal_root) {
62 define('DRUPAL_ROOT', $drupal_root);
63 require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
69 function bootstrap_drupal_database_validate() {
70 return parent::bootstrap_drupal_database_validate() && $this->bootstrap_drupal_database_has_table('blocked_ips');
73 function bootstrap_drupal_database() {
74 drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
75 parent::bootstrap_drupal_database();
78 function bootstrap_drupal_configuration() {
79 drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
81 // Unset drupal error handler and restore drush's one.
82 restore_error_handler();
84 parent::bootstrap_drupal_configuration();
87 function bootstrap_drupal_full() {
88 if (!drush_get_context('DRUSH_QUIET', FALSE)) {
91 drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
92 if (!drush_get_context('DRUSH_QUIET', FALSE)) {
96 parent::bootstrap_drupal_full();