Use $wpdb->prefix when defining table names
git-svn-id: http://svn.automattic.com/wordpress/trunk@4648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bcc76b1f65
commit
71a2674bde
|
@ -97,21 +97,22 @@ 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;
|
||||
|
||||
// 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;
|
||||
if ( defined('CUSTOM_USER_META_TABLE') )
|
||||
|
|
Loading…
Reference in New Issue