Skip to content

Commit

Permalink
Use $wpdb->prefix when defining table names
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@4648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
markjaquith committed Dec 15, 2006
1 parent bcc76b1 commit 71a2674
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions wp-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,21 @@ function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(
else
require_once (ABSPATH . WPINC . '/wp-db.php');

// $table_prefix is deprecated as of 2.1
$wpdb->prefix = $table_prefix;

// 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';

$wpdb->prefix = $table_prefix;
$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;
Expand Down

0 comments on commit 71a2674

Please sign in to comment.