Make WordPress Core

Ticket #12763: post2.patch

File post2.patch, 1.0 KB (added by deepak.seth, 14 years ago)
  • wp-admin/includes/post.php

     
    195195        }
    196196
    197197        add_meta( $post_ID );
     198        //Update Post edit_last meta deta.
     199        if ( !add_post_meta( $post_ID, '_edit_last', $GLOBALS['current_user']->ID, true ) )
     200                update_post_meta( $post_ID, '_edit_last', $GLOBALS['current_user']->ID );
    198201
    199202        wp_update_post( $post_data );
    200203
     
    547550                return 0;
    548551
    549552        add_meta( $post_ID );
     553        //Add Post edit_last meta deta.
     554        add_post_meta( $post_ID, '_edit_last', $GLOBALS['current_user']->ID );
    550555
    551556        // Reunite any orphaned attachments with their parent
    552557        // Does this need to be udpated? ~ Mark
     
    12051210
    12061211        if ( !add_post_meta( $post->ID, '_edit_lock', $now, true ) )
    12071212                update_post_meta( $post->ID, '_edit_lock', $now );
    1208         if ( !add_post_meta( $post->ID, '_edit_last', $current_user->ID, true ) )
    1209                 update_post_meta( $post->ID, '_edit_last', $current_user->ID );
     1213       
    12101214}
    12111215
    12121216/**