Details
-
Type:
Bug
-
Status: Done/Fixed
-
Priority:
Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.3
-
Fix Version/s: 4.4.4
-
Component/s: None
-
Labels:None
Description
The chunk of code is looking to see if the folder is in sites/all & if so it will look in the directory 2 levels above for the civicrm.settings file.
If not it will look in ../../sites
Although the code comment appears to be on the wrong line leading to confusion this appears to be the drupal 5 location (& I have not seen civicrm.settings.php directly under 'sites' in d6 or d7).
This appears to lead to the requirement for a settings_location merely because the civicrm folder is under the site folder not all
if ( defined( 'CIVICRM_CONFDIR' ) && ! isset( $confdir ) )
{ $confdir = CIVICRM_CONFDIR; } else {
// make it relative to civicrm.config.php, else php makes it relative
// to the script that invokes it
// simple check to see if this is under sites/all or just modules
if ( strpos( $currentDir, 'sites' . DIRECTORY_SEPARATOR . 'all' . DIRECTORY_SEPARATOR . 'modules' ) !== false )
else
{ $confdir = $currentDir . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'sites'; }}