projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fd292a
)
civicrm-version.php - Fix CMS detection in pre-booted Drupal8
author
Tim Otten
<totten@civicrm.org>
Fri, 11 May 2018 02:43:49 +0000
(19:43 -0700)
committer
Tim Otten
<totten@civicrm.org>
Fri, 11 May 2018 03:03:46 +0000
(20:03 -0700)
Ex 1: Running `drush` commands
Ex 2: Running `cv` with `--level=cms-only`
civicrm-version.php
patch
|
blob
|
blame
|
history
diff --git
a/civicrm-version.php
b/civicrm-version.php
index dca00fe227d4c67c8906314ddbd393312c4b706a..f5b46e76f9e7ed18b822cba08d97647083bc4c05 100755
(executable)
--- a/
civicrm-version.php
+++ b/
civicrm-version.php
@@
-38,6
+38,9
@@
namespace _CiviVersion_ {
elseif (defined('ABSPATH') && function_exists('get_bloginfo')) {
return 'WordPress';
}
+ elseif (defined('DRUPAL_ROOT') && class_exists('Drupal') && version_compare(\Drupal::VERSION, '8.0', '>=') && version_compare(\Drupal::VERSION, '9.0', '<')) {
+ return 'Drupal8';
+ }
else {
// guess CMS name from the current path
list($cmsType,) = self::findCMSRootPath();