Ticket #5127 (closed task (blessed): fixed)

Opened 4 years ago

Last modified 4 years ago

Move all mysql_* function calls to wp-db.php

Reported by: ComputerGuru Owned by: westi
Priority: normal Milestone: 2.5
Component: General Version: 2.3
Severity: normal Keywords: mysql has-patch
Cc: ComputerGuru@…

Description

All calls to database-specific functions should be in a single file for portablility and organization purposes (in this case, wp-db.php for MySQL).

The only mysql_* function not yet constrained to wp-db.php is mysql_get_server_info();

Patch attached. Changes schema.php, upgrade.php, and wp-db.php.

Attachments

mysql_ grouping.patch Download (1.6 KB) - added by ComputerGuru 4 years ago.

Change History

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

As this is a "feature request", I'm bumping the milestone to 2.4. Feature requests shouldn't be done in maintenance releases.

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

Adding to my review and checkin todo list

comment:3   ryan4 years ago

The entire function should be moved into wpdb:check_server_version() with it returning an error message via WP_Error.

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

(In [6199]) Move all calls to mysql_ functions to withiWPDB so that t we don't expect any mysql stuff when we are using a custo$wpdb class. Fixes #5127 props ComputerGuru.

Note: See TracTickets for help on using tickets.