From 71a2674bdec76829ddd1376ea52bebec01d23aac Mon Sep 17 00:00:00 2001 From: markjaquith Date: Fri, 15 Dec 2006 23:14:42 +0000 Subject: [PATCH] Use $wpdb->prefix when defining table names git-svn-id: http://svn.automattic.com/wordpress/trunk@4648 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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;