Permalink
Browse files

fix(core): Elgg again uses the dataroot given in settings.php

This makes sure that an incorrect `dataroot` value in the `datalists` DB
table is not allowed to overwrite a `$CONFIG->dataroot` value set in
settings.php. This problem was introduced in 2.1.0.

Fixes #9602
  • Loading branch information...
mrclay committed Apr 1, 2016
1 parent 999ca44 commit 64c23f703b9515c30089470da2899f105de99333
Showing with 3 additions and 1 deletion.
  1. +3 −1 engine/classes/Elgg/BootService.php
@@ -76,7 +76,9 @@ public function boot() {
$CONFIG->boot_cache_ttl = 0;
}
$CONFIG->dataroot = rtrim($datalists['dataroot'], '/\\') . DIRECTORY_SEPARATOR;
if (!$GLOBALS['_ELGG']->dataroot_in_settings) {
$CONFIG->dataroot = rtrim($datalists['dataroot'], '/\\') . DIRECTORY_SEPARATOR;
}
$CONFIG->site_guid = (int)$datalists['default_site'];
$CONFIG->site_id = (int)$datalists['default_site'];
if (!isset($CONFIG->boot_cache_ttl)) {

0 comments on commit 64c23f7

Please sign in to comment.