From 97504fef96831d8ad5a3cb5260b6fa5151a084f4 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 29 Mar 2005 03:33:56 +0000 Subject: [PATCH] get_post(): Don't use for cache lookup when a post id is passed. git-svn-id: http://svn.automattic.com/wordpress/trunk@2485 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index f06e14610e..f13d8c283d 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -553,9 +553,7 @@ function &get_post(&$post, $output = OBJECT) { $post_cache[$post->ID] = &$post; $post = & $post_cache[$post->ID]; } else { - if ( isset($GLOBALS['post']) && ($post == $GLOBALS['post']->ID) ) - $post = & $GLOBALS['post']; - elseif (isset($post_cache[$post])) + if (isset($post_cache[$post])) $post = & $post_cache[$post]; else { $query = "SELECT * FROM $wpdb->posts WHERE ID=$post";