Skip to content

Commit

Permalink
Update getBasePath to use something a bit more sane
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwire committed Oct 7, 2017
1 parent e1d37ce commit df82f00
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CRM/Utils/System/Joomla.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,15 @@ public function getJVersion($joomlaBase) {
}
}

/**
* Setup the base path related constant.
* @return mixed
*/
public function getBasePath() {
// Setup the base path related constant.
return dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__))))))));
global $civicrm_root;
$joomlaPath = explode('/administrator', $civicrm_root);
$joomlaBase = $joomlaPath[0];
return $joomlaBase;
}

/**
Expand Down

0 comments on commit df82f00

Please sign in to comment.