Make WordPress Core

Opened 19 years ago

Closed 19 years ago

#5128 closed defect (bug) (fixed)

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: Focuses:

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 19 years ago.
5128.diff​ (1.7 KB ) - added by westi 19 years ago.
Alternative patch - move common code to a function.

Download all attachments as: .zip

Change History (9)

#1 @Nazgul
19 years ago

  • Keywords has-patch added
  • Milestone 2.3.1 → 2.4
  • Version → 2.3

#2 @westi
19 years ago

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

Adding to my review and checkin todo list

@westi
19 years ago

Alternative patch - move common code to a function.

#3 @westi
19 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
19 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
19 years ago

  • Resolution → fixed
  • Status assigned → 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
19 years ago

  • Resolution fixed
  • Status closed → reopened

Arg.. the change went into the wrong place.

#7 @westi
19 years ago

  • Resolution → fixed
  • Status reopened → 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.