Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#18451 closed enhancement (fixed)

Make charset_collate a public method on $wpdb

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

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 15 years ago.
charset_collate method
charset-collate.diff​ (1.3 KB ) - added by pento 14 years ago.

Download all attachments as: .zip

Change History (8)

#1 @simonwheatley
15 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
15 years ago

  • Keywords dev-feedback removed
  • Milestone Awaiting Review → 3.3

Good idea.

#3 @ryan
15 years ago

  • Milestone 3.3 → Future Release

Punting enhancements from 3.3.

#4 @pento
14 years ago

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

#5 @nacin
14 years ago

  • Owner set to nacin
  • Resolution → fixed
  • Status new → 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
14 years ago

  • Milestone Future Release → 3.5

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

Note: See TracTickets for help on using tickets.