Changeset 2504

Show
Ignore:
Timestamp:
03/31/05 05:25:54 (4 years ago)
Author:
ryan
Message:

More category cache cleanups.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin.php

    r2234 r2504  
    99header('Pragma: no-cache'); 
    1010 
    11 $dogs = $wpdb->get_results("SELECT * FROM $wpdb->categories"); 
    12 foreach ($dogs as $catt) { 
    13     $cache_categories[$catt->cat_ID] = $catt; 
    14 
     11update_category_cache(); 
    1512 
    1613get_currentuserinfo(); 
  • trunk/wp-includes/functions.php

    r2503 r2504  
    616616    global $cache_categories, $wpdb; 
    617617 
     618    if ( ! isset($cache_categories)) 
     619        update_category_cache(); 
     620 
    618621    if (is_object($category)) { 
    619622        if ( ! isset($cache_categories[$category->cat_ID])) 
     
    11711174    WHERE category_id = cat_ID AND post_id IN ($post_ids)"); 
    11721175 
     1176    if (! isset($cache_categories)) 
     1177        update_category_cache(); 
     1178         
    11731179    if ( !empty($dogs) ) { 
    11741180        foreach ($dogs as $catt) {