Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#35756 closed enhancement (fixed)

Refactor to use function in `wpdb` to find `charset_collate`

Reported by: sudar's profile sudar Owned by: pento's profile pento
Milestone: 4.6 Priority: normal
Severity: normal Version:
Component: Database Keywords:
Focuses: Cc:


The wp_get_db_schema function In wp-admin/schema.php is using the same code from wpdb->get_charset_collate() to find out the charset_collate.

This patch replaces the duplicate code with a call to wpdb->get_charset_collate().

This doesn't make any change to the functionality but cleans up the code, so that in future if the logic to find charset_collate is changed, then it needs to be changed in only one place.

Attachments (1)

35756.patch (672 bytes) - added by sudar 8 years ago.

Download all attachments as: .zip

Change History (5)

8 years ago

#1 @chriscct7
8 years ago

  • Milestone changed from Awaiting Review to Future Release

#2 @chriscct7
8 years ago

  • Version trunk deleted

#3 @pento
8 years ago

  • Milestone changed from Future Release to 4.6
  • Owner set to pento
  • Status changed from new to assigned

#4 @pento
8 years ago

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

In 37524:

Database: Remove some duplicate code.

schema.php was manually defining the character set/collation query, instead of using wpdb::get_charset_collate().

Props sudar.

Fixes #35756.

Note: See TracTickets for help on using tickets.