Ticket #5128 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

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

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

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 (0.6 kB) - added by ComputerGuru on 10/01/07 12:40:29.
5128.diff (1.7 kB) - added by westi on 10/02/07 20:58:43.
Alternative patch - move common code to a function.

Change History

10/01/07 12:40:29 changed by ComputerGuru

  • attachment searching for db.php.patch added.

10/01/07 13:29:03 changed by Nazgul

  • keywords changed from db.php to db.php has-patch.
  • version set to 2.3.
  • milestone changed from 2.3.1 to 2.4.

10/01/07 16:46:48 changed by westi

  • owner changed from anonymous to westi.
  • status changed from new to assigned.

Adding to my review and checkin todo list

10/02/07 20:58:43 changed by westi

  • attachment 5128.diff added.

Alternative patch - move common code to a function.

10/02/07 20:59:53 changed by westi

  • keywords changed from db.php has-patch to db.php has-patch 2nd-opinion.

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

What does everyone think?

10/02/07 21:04:26 changed by ComputerGuru

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.

10/06/07 07:55:04 changed by westi

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

10/06/07 08:13:31 changed by westi

  • status changed from closed to reopened.
  • resolution deleted.

Arg.. the change went into the wrong place.

10/06/07 08:18:33 changed by westi

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