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
This commit is contained in:
Ryan Boren 2005-03-29 03:33:56 +00:00
parent c5b906d680
commit 198665bef2
1 changed files with 1 additions and 3 deletions

View File

@ -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";