Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#35756 closed enhancement (fixed)

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

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

Description

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 11 years ago.

Download all attachments as: .zip

Change History (5)

@sudar
11 years ago

#1 @chriscct7
11 years ago

  • Milestone Awaiting Review → Future Release

#2 @chriscct7
11 years ago

  • Version trunk

#3 @pento
10 years ago

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

#4 @pento
10 years ago

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