From 198665bef279e508fb807308db1dcca7a3b7a99c Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@2485 602fd350-edb4-49c9-b593-d223f7449a82 --- 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";