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
This commit is contained in:
ryan 2005-03-29 03:33:56 +00:00
parent bd7f914d8c
commit 97504fef96
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";