Make WordPress Core

Changeset 4847


Ignore:
Timestamp:
01/31/2007 03:43:02 AM (17 years ago)
Author:
markjaquith
Message:

get_post() should check post cache before page cache. fixes #3724

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r4832 r4847  
    106106        $_post = & $post_cache[$blog_id][$post->ID];
    107107    } else {
    108         if ( $_post = wp_cache_get($post, 'pages') )
     108        if ( isset($post_cache[$blog_id][$post]) )
     109            $_post = & $post_cache[$blog_id][$post];
     110        elseif ( $_post = wp_cache_get($post, 'pages') )
    109111            return get_page($_post, $output);
    110         elseif ( isset($post_cache[$blog_id][$post]) )
    111             $_post = & $post_cache[$blog_id][$post];
    112112        else {
    113113            $query = "SELECT * FROM $wpdb->posts WHERE ID = '$post' LIMIT 1";
Note: See TracChangeset for help on using the changeset viewer.