From 74b400f3d324d458e65699de2bc8d9b7e196a218 Mon Sep 17 00:00:00 2001 From: matt Date: Tue, 19 Apr 2005 05:27:24 +0000 Subject: [PATCH] Optimiation from Denis git-svn-id: http://svn.automattic.com/wordpress/trunk@2550 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 8c192971d5..8069c47ab1 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1189,11 +1189,9 @@ function update_post_caches(&$posts) { function update_category_cache() { global $cache_categories, $wpdb; - $dogs = $wpdb->get_results("SELECT * FROM $wpdb->categories"); - foreach ($dogs as $catt) { - $catt->category_id = $catt->cat_ID; // Alias. + $dogs = $wpdb->get_results("SELECT *, cat_ID as category_id FROM $wpdb->categories"); + foreach ($dogs as $catt) $cache_categories[$catt->cat_ID] = $catt; - } } function update_user_cache() {