This line from bootstrap.inc in drupal_settings_initialize() says:

  // Export the following settings.php variables to the global namespace
  global $databases, $db_prefix, $cookie_domain, $conf, $installed_profile, $update_free_access, $db_url, $drupal_hash_salt, $is_https, $base_secure_url, $base_insecure_url;

At least a couple of these global variables seem to be left over from Drupal 6 and should be removed (they aren't being used anywhere else in Drupal and aren't in default.settings.php any more):

$db_url
$installed_profile

I think the others are still valid.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swentel’s picture

$db_url is needed for the update process from D6 to D7.

$installed_profile however seems something which might be deleted.

Devin Carlson’s picture

Version: 7.x-dev » 8.x-dev
Status: Active » Needs review
FileSize
755 bytes

Moving to Drupal 8.

I just tried a number of searches through every file included with D8 and I couldn't find any results for $installed_profile. There is some use of $db_url as swentel mentions. If $db_url isn't necessary for the D7 - D8 upgrade process I think it could go too (for D8, not D7 obviously).

Attached is a patch that only removes $installed_profile. Lets see what the test bot has to say.

catch’s picture

Should be fine to remove $db_url in D8 as well.

Devin Carlson’s picture

Title: Crufty global variables left over from D6 in bootstrap.inc » Remove global variables left over from D6
Category: bug » task
FileSize
1.66 KB

Updated to remove $installed_profile, $db_url and the one reference to $db_url in bootstrap.inc.

Also changed the issue title and category.

Status: Needs review » Needs work

The last submitted patch, 842216-remove-leftover-global-variables.patch, failed testing.

Devin Carlson’s picture

Status: Needs work » Needs review
FileSize
1.5 KB

Oops, selected the wrong brackets when I pressed delete.

jhodgdon’s picture

Status: Needs review » Needs work

The last submitted patch, 842216-remove-leftover-global-variables-updated.patch, failed testing.

valthebald’s picture

Title: Remove global variables left over from D6 » Remove $installed_profile global variable left over from D6
Status: Needs work » Needs review
FileSize
759 bytes

$db_url has gone earlier, changing title

Devin Carlson’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #9 applied cleanly and removed the only instance of the unused $installed_profile global variable.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 9263a49 and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.