Make WordPress Core

Changeset 2550


Ignore:
Timestamp:
04/19/2005 05:27:24 AM (20 years ago)
Author:
matt
Message:

Optimiation from Denis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r2535 r2550  
    11901190function update_category_cache() {
    11911191    global $cache_categories, $wpdb;
    1192     $dogs = $wpdb->get_results("SELECT * FROM $wpdb->categories");
    1193     foreach ($dogs as $catt) {
    1194         $catt->category_id = $catt->cat_ID; // Alias.
     1192    $dogs = $wpdb->get_results("SELECT *, cat_ID as category_id FROM $wpdb->categories");
     1193    foreach ($dogs as $catt)
    11951194        $cache_categories[$catt->cat_ID] = $catt;
    1196     }
    11971195}
    11981196
Note: See TracChangeset for help on using the changeset viewer.