Make WordPress Core

Changeset 14216


Ignore:
Timestamp:
04/24/2010 04:24:38 AM (16 years ago)
Author:
dd32
Message:

Correct "Last Edited by" username, Updates the last edited username upon save rather than upon a edit lock being created. Props rooodini & deepak.seth. Fixes #12736

File:
1 edited

Legend:

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

    r14155 r14216  
    188188
    189189        add_meta( $post_ID );
     190
     191        update_post_meta( $post_ID, '_edit_last', $GLOBALS['current_user']->ID );
    190192
    191193        wp_update_post( $post_data );
     
    539541        add_meta( $post_ID );
    540542
     543        add_post_meta( $post_ID, '_edit_last', $GLOBALS['current_user']->ID );
     544
    541545        // Reunite any orphaned attachments with their parent
    542546        // Does this need to be udpated? ~ Mark
     
    11951199        $now = time();
    11961200
    1197         if ( !add_post_meta( $post->ID, '_edit_lock', $now, true ) )
    1198                 update_post_meta( $post->ID, '_edit_lock', $now );
    1199         if ( !add_post_meta( $post->ID, '_edit_last', $current_user->ID, true ) )
    1200                 update_post_meta( $post->ID, '_edit_last', $current_user->ID );
     1201        update_post_meta( $post->ID, '_edit_lock', $now );     
    12011202}
    12021203
Note: See TracChangeset for help on using the changeset viewer.