CRM-20780 Add drupal option to define CMS_ROOT
authoreileen <emcnaughton@wikimedia.org>
Wed, 28 Jun 2017 08:29:54 +0000 (20:29 +1200)
committereileen <emcnaughton@wikimedia.org>
Fri, 30 Jun 2017 03:22:36 +0000 (15:22 +1200)
CRM/Utils/System/Drupal.php

index 1c9d8b2880571b293e3b9264c5269f78621730cf..b9c99989e761c37828b14227e3b6c7beaf9b6c4d 100644 (file)
@@ -590,6 +590,12 @@ AND    u.status = 1
       // drush anyway takes care of multisite install etc
       return drush_get_context('DRUSH_DRUPAL_ROOT');
     }
+
+    global $civicrm_paths;
+    if (!empty($civicrm_paths['cms.root']['path'])) {
+      return $civicrm_paths['cms.root']['path'];
+    }
+
     // CRM-7582
     $pathVars = explode('/',
       str_replace('//', '/',