WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#5128 closed defect (bug) (fixed)

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

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

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 (2)

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

Download all attachments as: .zip

Change History (9)

comment:1 @Nazgul8 years ago

  • Keywords has-patch added
  • Milestone changed from 2.3.1 to 2.4
  • Version set to 2.3

comment:2 @westi8 years ago

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

Adding to my review and checkin todo list

@westi8 years ago

Alternative patch - move common code to a function.

comment:3 @westi8 years ago

  • 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?

comment:4 @ComputerGuru8 years ago

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.

comment:5 @westi8 years ago

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

(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.

comment:6 @westi8 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Arg.. the change went into the wrong place.

comment:7 @westi8 years ago

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

(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.