Make WordPress Core

Opened 10 years ago

Closed 6 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:


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

Attachments (5)

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

Download all attachments as: .zip

Change History (13)

#1 @dragoonis
10 years ago

Ignore the .php attachment.

10 years ago

Sanitisation of table name

#2 @scribu
10 years ago

  • Keywords has-patch added

#3 @scribu
10 years ago

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

#4 @nacin
10 years ago

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

#5 @pento
8 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
7 years ago

#26419 was marked as a duplicate.

6 years ago

#7 @pento
6 years ago

  • Keywords commit 4.1-early added

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

6 years ago

#8 @pento
6 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.