Make WordPress Core


Ignore:
Timestamp:
09/25/2008 01:42:34 PM (18 years ago)
Author:
azaozz
Message:

Batch editing, first cut, see #6815

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r8943 r8973  
    732732        check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
    733733       
    734         if ( ! isset($_POST['post_ID']) )
     734        if ( ! isset($_POST['post_ID']) || ! ( $id = (int) $_POST['post_ID'] ) )
    735735                exit;
     736
     737        if ( $last = wp_check_post_lock( $id ) ) {
     738                $last_user = get_userdata( $last );
     739                $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' );
     740                echo '<tr><td colspan="8"><div class="error"><p>' . sprintf( $_POST['post_type'] == 'page' ? __( 'Saving is disabled: %s is currently editing this page.' ) : __( 'Saving is disabled: %s is currently editing this post.' ),   wp_specialchars( $last_user_name ) ) . '</p></div></td></tr>';
     741                exit;
     742        }
    736743       
    737744        inline_save_row( $_POST );
Note: See TracChangeset for help on using the changeset viewer.