Ticket #5128 (closed defect (bug): fixed)

Opened 4 years ago

Last modified 4 years ago

setup-config.php should check for existence of db.php

Reported by: ComputerGuru Owned by: westi
Priority: normal Milestone: 2.5
Component: General Version: 2.3
Severity: normal Keywords: db.php has-patch 2nd-opinion
Cc: ComputerGuru@…

Description

wp-admin/setup-config.php should check for wp-content/db.php and load that if it exists instead of blindly loading wp-db.php. Searching for db.php first is the correct behavior as can be seen in wp-settings.php

Attachments

searching for db.php.patch Download (598 bytes) - added by ComputerGuru 4 years ago.
5128.diff Download (1.7 KB) - added by westi 4 years ago.
Alternative patch - move common code to a function.

Change History

  • Keywords has-patch added
  • Version set to 2.3
  • Milestone changed from 2.3.1 to 2.4
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

Adding to my review and checkin todo list

westi4 years ago

Alternative patch - move common code to a function.

  • Keywords 2nd-opinion added

I've added a new patch which moves the common code to a new function instead of duplicating it.

What does everyone think?

Looks good to me :-)

I was originally planning on adding a check in the actual wp-db.php at the very top, which would load the alternate db.php if it exists; but I felt it was a bit ugly of a hack.. A function is a nice compromise.

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [6196]) Move database class loading to a shared function to ensure all of WordPress is wp-content/wp-db.php aware. Fixes #5128 props ComputerGuru.

  • Status changed from closed to reopened
  • Resolution fixed deleted

Arg.. the change went into the wrong place.

  • Status changed from reopened to closed
  • Resolution set to fixed

(In [6198]) Move database class loading to a shared function to ensure all of WordPress is wp-content/wp-db.php aware. Fixes #5128 props ComputerGuru.

Note: See TracTickets for help on using tickets.