Permalink
Browse files

fix(upgrade): Point UpgradeService to correct upgrades dir

The path `elgg_get_config('path') . "engine/lib/upgrades/";` does not
work when Elgg is installed with composer, since `path` points to the
root of the install, rather than the root of Elgg core.
  • Loading branch information...
ewinslow committed Jul 30, 2015
1 parent 2c0be65 commit b3a31868a73e32dcc02b922d996b345cd287d786
Showing with 2 additions and 2 deletions.
  1. +2 −2 engine/classes/Elgg/UpgradeService.php
@@ -76,7 +76,7 @@ public function run() {
*/
protected function upgradeCode($version, $quiet = false) {
$version = (int) $version;
- $upgrade_path = _elgg_services()->config->get('path') . 'engine/lib/upgrades/';
+ $upgrade_path = elgg_get_engine_path() . '/lib/upgrades/';
$processed_upgrades = $this->getProcessedUpgrades();
$upgrade_files = $this->getUpgradeFiles($upgrade_path);
@@ -200,7 +200,7 @@ protected function getUpgradeFileVersion($filename) {
*/
protected function getUpgradeFiles($upgrade_path = null) {
if (!$upgrade_path) {
- $upgrade_path = _elgg_services()->config->get('path') . 'engine/lib/upgrades/';
+ $upgrade_path = elgg_get_engine_path() . '/lib/upgrades/';
}
$upgrade_path = sanitise_filepath($upgrade_path);
$handle = opendir($upgrade_path);

0 comments on commit b3a3186

Please sign in to comment.