Make WordPress Core

Changeset 1355 for trunk/wp-settings.php


Ignore:
Timestamp:
05/24/2004 08:22:18 AM (21 years ago)
Author:
saxmatt
Message:

Giant commit, sorry mailing list people. Move all table names to new $wpdb versions. Works but the whole app needs thorough testing now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r1243 r1355  
    1010error_reporting(E_ALL ^ E_NOTICE);
    1111
    12 // Table names
    13 $tableposts               = $table_prefix . 'posts';
    14 $tableusers               = $table_prefix . 'users';
    15 $tablesettings            = $table_prefix . 'settings'; // only used during upgrade
    16 $tablecategories          = $table_prefix . 'categories';
    17 $tablepost2cat            = $table_prefix . 'post2cat';
    18 $tablecomments            = $table_prefix . 'comments';
    19 $tablelinks               = $table_prefix . 'links';
    20 $tablelinkcategories      = $table_prefix . 'linkcategories';
    21 $tableoptions             = $table_prefix . 'options';
    22 $tableoptiontypes         = $table_prefix . 'optiontypes';
    23 $tableoptionvalues        = $table_prefix . 'optionvalues';
    24 $tableoptiongroups        = $table_prefix . 'optiongroups';
    25 $tableoptiongroup_options = $table_prefix . 'optiongroup_options';
    26 $tablepostmeta            = $table_prefix . 'postmeta';
    27 
    2812define('WPINC', 'wp-includes');
    29 
    3013require_once (ABSPATH . WPINC . '/wp-db.php');
    3114
     15// Table names
     16$wpdb->posts               = $table_prefix . 'posts';
     17$wpdb->users               = $table_prefix . 'users';
     18$wpdb->categories          = $table_prefix . 'categories';
     19$wpdb->post2cat            = $table_prefix . 'post2cat';
     20$wpdb->comments            = $table_prefix . 'comments';
     21$wpdb->links               = $table_prefix . 'links';
     22$wpdb->linkcategories      = $table_prefix . 'linkcategories';
     23$wpdb->options             = $table_prefix . 'options';
     24$wpdb->optiontypes         = $table_prefix . 'optiontypes';
     25$wpdb->optionvalues        = $table_prefix . 'optionvalues';
     26$wpdb->optiongroups        = $table_prefix . 'optiongroups';
     27$wpdb->optiongroup_options = $table_prefix . 'optiongroup_options';
     28$wpdb->postmeta            = $table_prefix . 'postmeta';
     29
    3230$wpdb->hide_errors();
    33 $users = $wpdb->get_results("SELECT * FROM $tableusers");
     31$users = $wpdb->get_results("SELECT * FROM $wpdb->users");
    3432if (!$users && !strstr($_SERVER['PHP_SELF'], 'install.php')) {
    3533    die("It doesn't look like you've installed WP yet. Try running <a href='wp-admin/install.php'>install.php</a>.");
Note: See TracChangeset for help on using the changeset viewer.