Created
September 4, 2015 02:49
-
-
Save jenlampton/72338350eab459b04719 to your computer and use it in GitHub Desktop.
possible fix for drush_drupal_version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/includes/drupal.inc b/includes/drupal.inc | |
index b24dc52..f34fee2 100644 | |
--- a/includes/drupal.inc | |
+++ b/includes/drupal.inc | |
@@ -47,15 +47,23 @@ function drush_drupal_version($drupal_root = NULL) { | |
} | |
} | |
else { | |
- // D7 stores VERSION in bootstrap.inc. | |
- // D6 and below does it in system.module. | |
- $version_constant_paths = array('/includes/bootstrap.inc', '/modules/system/system.module'); | |
- foreach ($version_constant_paths as $path) { | |
- if (file_exists($drupal_root . $path)) { | |
- require_once $drupal_root . $path; | |
- if (defined('VERSION')) { | |
- $version = VERSION; | |
- break; | |
+ if (file_exists($drupal_root . '/core/misc/backdrop.js')) { | |
+ require_once $drupal_root . '/core/includes/bootstrap.inc'; | |
+ if (defined('Drupal::VERSION')) { | |
+ $version = Drupal::VERSION; | |
+ } | |
+ } | |
+ else { | |
+ // D7 stores VERSION in bootstrap.inc. | |
+ // D6 and below does it in system.module. | |
+ $version_constant_paths = array('/includes/bootstrap.inc', '/modules/system/system.module'); | |
+ foreach ($version_constant_paths as $path) { | |
+ if (file_exists($drupal_root . $path)) { | |
+ require_once $drupal_root . $path; | |
+ if (defined('VERSION')) { | |
+ $version = VERSION; | |
+ break; | |
+ } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment