Make WordPress Core

Ticket #1073: bug1073_post.diff

File bug1073_post.diff, 587 bytes (added by coffee2code, 19 years ago)
  • wp-admin/post.php

     
    308308        if ( 'publish' == $post_status && (!user_can_create_post($user_ID)) && 2 != get_option('new_users_can_blog') )
    309309                $post_status = 'draft';
    310310
    311         if (empty($post_name) || 'draft' == $post_status ) {
     311        if (empty($post_name) || 'draft' == $post_status || 'draft' == $prev_status ) {
    312312                $post_name = sanitize_title($post_title, $post_ID);
    313313        } else {
    314314                $post_name = sanitize_title($post_name, $post_ID);