Make WordPress Core

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#18451 closed enhancement (fixed)

Make charset_collate a public method on $wpdb

Reported by: simonwheatley's profile simonwheatley Owned by: nacin's profile nacin
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Database Keywords: has-patch
Focuses: Cc:

Description

I suggest adding a public charset_collate method on $wpdb. A small thing, but I'd reuse it all the time when adding tables in plugin code, which would save writing a lot of duplicate code.

Patch attached.

Attachments (2)

charset_collate method.diff (1.7 KB) - added by simonwheatley 13 years ago.
charset_collate method
charset-collate.diff (1.3 KB) - added by pento 12 years ago.

Download all attachments as: .zip

Change History (8)

@simonwheatley
13 years ago

charset_collate method

#1 @simonwheatley
13 years ago

(P.S. I thought I'd filed this ticket some time back, but couldn't find it when searching just now… apologies if I've re-created it, but I don't think I have.)

#2 @scribu
13 years ago

  • Keywords dev-feedback removed
  • Milestone changed from Awaiting Review to 3.3

Good idea.

#3 @ryan
13 years ago

  • Milestone changed from 3.3 to Future Release

Punting enhancements from 3.3.

#4 @pento
12 years ago

I'm cool with this. Updated the patch for trunk.

#5 @nacin
12 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [21471]:

Introduce wpdb::get_charset_collate() to return the DEFAULT CHARACTER SET and COLLATE for use in table schemas.

props simonwheatley, pento. fixes #18451.

#6 @nacin
12 years ago

  • Milestone changed from Future Release to 3.5

After discussion with pento, I decided to go with get_charset_collate() for clarity.

Note: See TracTickets for help on using tickets.