Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(dev/drupal#10) Make civicrm-version.php self-sufficient #12113

Merged
merged 10 commits into from
May 15, 2018
Prev Previous commit
Next Next commit
civicrm-version.php - Fix CMS detection in pre-booted WordPress
Ex 1: Running `wp-cli` commands
Ex 2: Running `cv` with `--level=cms-only`
  • Loading branch information
totten committed May 11, 2018
commit 1fd292a90ad3edbcb74e7f9d464920ebb90f22e0
3 changes: 3 additions & 0 deletions civicrm-version.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public static function findCMS() {
elseif (function_exists('drupal_bootstrap') && version_compare(VERSION, '7.0', '>=') && version_compare(VERSION, '8.0', '<')) {
return 'Drupal';
}
elseif (defined('ABSPATH') && function_exists('get_bloginfo')) {
return 'WordPress';
}
else {
// guess CMS name from the current path
list($cmsType,) = self::findCMSRootPath();
Expand Down