Make WordPress Core

Changeset 1184


Ignore:
Timestamp:
04/26/2004 07:18:25 PM (21 years ago)
Author:
saxmatt
Message:

More query reduction.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-blog-header.php

    r1150 r1184  
    272272
    273273// author stuff
    274 $auteurs = $wpdb->get_results("SELECT * FROM $tableusers WHERE 1=1");
    275 foreach ($auteurs as $auteur) {
     274foreach ($users as $auteur) {
    276275    $cache_authors[$auteur->ID] = $auteur;
    277276}
  • trunk/wp-includes/functions.php

    r1179 r1184  
    176176
    177177function get_userdata($userid) {
    178     global $wpdb, $cache_userdata, $tableusers;
    179     if ( empty($cache_userdata[$userid]) ) {
     178    global $wpdb, $cache_authors, $tableusers;
     179    if ( empty($cache_authors[$userid]) ) {
    180180        $user = $wpdb->get_row("SELECT * FROM $tableusers WHERE ID = '$userid'");
    181181        $user->user_nickname = stripslashes($user->user_nickname);
  • trunk/wp-settings.php

    r1097 r1184  
    2929
    3030$wpdb->hide_errors();
    31 if (!$wpdb->get_row("SELECT * FROM $tableusers LIMIT 1") && !strstr($_SERVER['REQUEST_URI'], 'install.php')) {
     31$users = $wpdb->get_results("SELECT * FROM $tableusers");
     32if (!$users && !strstr($_SERVER['REQUEST_URI'], 'install.php')) {
    3233    die("It doesn't look like you've installed WP yet. Try running <a href='wp-admin/install.php'>install.php</a>.");
    3334}
Note: See TracChangeset for help on using the changeset viewer.