Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#5128 closed defect (bug) (fixed)

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

Reported by: computerguru's profile ComputerGuru Owned by: westi's profile 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 17 years ago.
5128.diff (1.7 KB) - added by westi 17 years ago.
Alternative patch - move common code to a function.

Download all attachments as: .zip

Change History (9)

#1 @Nazgul
17 years ago

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

#2 @westi
17 years ago

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

Adding to my review and checkin todo list

@westi
17 years ago

Alternative patch - move common code to a function.

#3 @westi
17 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?

#4 @ComputerGuru
17 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.

#5 @westi
17 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.

#6 @westi
17 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Arg.. the change went into the wrong place.

#7 @westi
17 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.