WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 5 years ago

#14273 closed enhancement (wontfix)

maybe_create_table cleanup

Reported by: dragoonis Owned by: pento
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Database Keywords:
Focuses: Cc:
PR Number:

Description

Cleaned up maybe_create_table() - no more iterations.
Cheers. Dragoonis aka Dr4g(irc).

Attachments (5)

install-helper.php (6.1 KB) - added by dragoonis 9 years ago.
maybe_create_table.diff (968 bytes) - added by dragoonis 9 years ago.
Sanitisation of table name
maybe_create_table.2.diff (1.2 KB) - added by pento 7 years ago.
14273.diff (1.2 KB) - added by pento 5 years ago.
14273.2.diff (1.2 KB) - added by pento 5 years ago.

Download all attachments as: .zip

Change History (13)

#1 @dragoonis
9 years ago

Ignore the .php attachment.

@dragoonis
9 years ago

Sanitisation of table name

#2 @scribu
9 years ago

  • Keywords has-patch added

#3 @scribu
9 years ago

You should use $wpdb->prepare() instead of $wpdb->escape()

#4 @nacin
9 years ago

  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to Future Release

#5 @pento
7 years ago

  • Keywords needs-refresh removed
  • Owner set to pento
  • Status changed from new to assigned

New patch cleans up the code, updates to use prepare() instead of escape().

#6 @SergeyBiryukov
6 years ago

#26419 was marked as a duplicate.

@pento
5 years ago

#7 @pento
5 years ago

  • Keywords commit 4.1-early added

attachment:14273.diff updates patch to apply cleanly against trunk.

@pento
5 years ago

#8 @pento
5 years ago

  • Keywords has-patch commit 4.1-early removed
  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed

install-helper.php is a historical artifact - we'll probably remove it in the future.

maybe_create_table() is defined in wp-admin/includes/upgrade.php, and uses the SHOW TABLES LIKE %s method.

Note: See TracTickets for help on using tickets.