WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 5 years ago

#4806 closed defect (bug) (fixed)

Add missing wpdb variable definitions, remove unused ones

Reported by: filosofo Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.3
Component: Administration Keywords: has-patch wpdb tables
Focuses: Cc:

Description

After reading this discussion I'm adding this patch, which defines the wpdb table-name variables and removes the deprecated table names: categories, post2cat, and link2cat.

Attachments (1)

wpdb_variable_definitions.diff (1.1 KB) - added by filosofo 7 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 ryan7 years ago

Before removing vars, we need to make sure wp-admin/includes/upgrade.php doesn't use them. upgrade needs to concatenate $wpdb->prefix with the table name for the removed tables. We might want to set the table vars in wpdb to something like "categories_is_gone" instead of removing them so that an obvious error is generated when those tables are referenced.

comment:2 ryan7 years ago

(In [6046]) Add missing instance var. Props filosofo. see #4806

comment:3 ryan7 years ago

  • Milestone changed from 2.3 to 2.4

Added the missing one. Let's remove the old ones in 2.4.

comment:4 darkdragon6 years ago

What about removing the old ones in 2.5?

comment:5 mrmist5 years ago

  • Milestone changed from 2.9 to 2.8

Or maybe 2.8 to close this ageing ticket...

comment:6 ryan5 years ago

  • Milestone changed from 2.8 to 2.5
  • Resolution set to fixed
  • Status changed from new to closed

2.5 introduced set_prefix() and the tables array. Let's call this fixed by that.

Note: See TracTickets for help on using tickets.