WordPress.org

Make WordPress Core

Ticket #8526: post.php.diff

File post.php.diff, 554 bytes (added by brianwhite, 13 years ago)
  • wordpress/wp-admin/includes/post.php

    old new  
    926926        $post->post_status = $original_status;
    927927        $post->post_date = $original_date;
    928928        $post->post_name = $original_name;
     929        // Note: Replace cached copy of post to restore original (unhacked)
     930        // data.  get_permalink calls get_posts which calls wp_cache_add!!!
     931        if ( false !== wp_cache_get($post->ID, 'posts') )
     932                wp_cache_replace($post->ID, $post, 'posts');
    929933        return $permalink;
    930934}
    931935