WordPress.org

Make WordPress Core

Changeset 18709


Ignore:
Timestamp:
09/18/2011 11:23:39 PM (8 years ago)
Author:
nacin
Message:

Fix issue where post locks were not updating on autosaves. props benbalter, fixes #18642. see #18515 for more on locking. broken in [12991], see #11889.

File:
1 edited

Legend:

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

    r18663 r18709  
    983983        $data = $message;
    984984    } else {
    985         if ( isset( $_POST['auto_draft'] ) && '1' == $_POST['auto_draft'] )
     985        if ( ! empty( $_POST['auto_draft'] ) )
    986986            $id = 0; // This tells us it didn't actually save
    987987        else
     
    989989    }
    990990
    991     if ( $do_lock && ( isset( $_POST['auto_draft'] ) && ( $_POST['auto_draft'] != '1' ) ) && $id && is_numeric($id) )
     991    if ( $do_lock && empty( $_POST['auto_draft'] ) && $id && is_numeric( $id ) )
    992992        wp_set_post_lock( $id );
    993993
Note: See TracChangeset for help on using the changeset viewer.