From 925cdbebd1f35719170175f46e2b2ba17a7d74e6 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Fri, 15 Dec 2006 23:14:42 +0000 Subject: [PATCH] Use $wpdb->prefix when defining table names git-svn-id: https://develop.svn.wordpress.org/trunk@4648 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-settings.php | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index a9259023ac..a22273905a 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -97,20 +97,21 @@ if ( file_exists(ABSPATH . 'wp-content/db.php') ) else require_once (ABSPATH . WPINC . '/wp-db.php'); -// Table names -$wpdb->posts = $table_prefix . 'posts'; -$wpdb->users = $table_prefix . 'users'; -$wpdb->categories = $table_prefix . 'categories'; -$wpdb->post2cat = $table_prefix . 'post2cat'; -$wpdb->comments = $table_prefix . 'comments'; -$wpdb->link2cat = $table_prefix . 'link2cat'; -$wpdb->links = $table_prefix . 'links'; -$wpdb->linkcategories = $table_prefix . 'linkcategories'; -$wpdb->options = $table_prefix . 'options'; -$wpdb->postmeta = $table_prefix . 'postmeta'; -$wpdb->usermeta = $table_prefix . 'usermeta'; +// $table_prefix is deprecated as of 2.1 +$wpdb->prefix = $table_prefix; -$wpdb->prefix = $table_prefix; +// Table names +$wpdb->posts = $wpdb->prefix . 'posts'; +$wpdb->users = $wpdb->prefix . 'users'; +$wpdb->categories = $wpdb->prefix . 'categories'; +$wpdb->post2cat = $wpdb->prefix . 'post2cat'; +$wpdb->comments = $wpdb->prefix . 'comments'; +$wpdb->link2cat = $wpdb->prefix . 'link2cat'; +$wpdb->links = $wpdb->prefix . 'links'; +$wpdb->linkcategories = $wpdb->prefix . 'linkcategories'; +$wpdb->options = $wpdb->prefix . 'options'; +$wpdb->postmeta = $wpdb->prefix . 'postmeta'; +$wpdb->usermeta = $wpdb->prefix . 'usermeta'; if ( defined('CUSTOM_USER_TABLE') ) $wpdb->users = CUSTOM_USER_TABLE;