X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fdrush%2Fdrush%2Flib%2FDrush%2FBoot%2FDrupalBoot6.php;fp=vendor%2Fdrush%2Fdrush%2Flib%2FDrush%2FBoot%2FDrupalBoot6.php;h=9539f38777b4c32da987859cff181d9f3d27f4c3;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/vendor/drush/drush/lib/Drush/Boot/DrupalBoot6.php b/vendor/drush/drush/lib/Drush/Boot/DrupalBoot6.php new file mode 100644 index 000000000..9539f3877 --- /dev/null +++ b/vendor/drush/drush/lib/Drush/Boot/DrupalBoot6.php @@ -0,0 +1,95 @@ +conf_path() . '/modules', + 'sites/all/modules', + ); + } + + function contrib_themes_paths() { + return array( + $this->conf_path() . '/themes', + 'sites/all/themes', + ); + } + + function bootstrap_drupal_core($drupal_root) { + define('DRUPAL_ROOT', $drupal_root); + require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; + $core = DRUPAL_ROOT; + + return $core; + } + + function bootstrap_drupal_database_validate() { + return parent::bootstrap_drupal_database_validate() && $this->bootstrap_drupal_database_has_table('cache'); + } + + function bootstrap_drupal_database() { + drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE); + parent::bootstrap_drupal_database(); + } + + function bootstrap_drupal_configuration() { + drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION); + + parent::bootstrap_drupal_configuration(); + } + + function bootstrap_drupal_full() { + if (!drush_get_context('DRUSH_QUIET', FALSE)) { + ob_start(); + } + drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); + if (!drush_get_context('DRUSH_QUIET', FALSE)) { + ob_end_clean(); + } + + // Unset drupal error handler and restore drush's one. + restore_error_handler(); + + parent::bootstrap_drupal_full(); + } +}