Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r18370 r18023  
    136136        $post_data = &$_POST;
    137137
    138     // Clear out any data in internal vars.
    139     unset( $post_data['filter'] );
    140 
    141138    $post_ID = (int) $post_data['post_ID'];
    142139    $post = get_post( $post_ID );
     
    345342        }
    346343
    347         $post = get_post( $post_ID );
    348         $tax_names = get_object_taxonomies( $post );
     344        $tax_names = get_object_taxonomies( get_post($post_ID) );
    349345        foreach ( $tax_names as $tax_name ) {
    350346            $taxonomy_obj = get_taxonomy($tax_name);
     
    367363            unset( $post_data['tax_input']['category'] );
    368364        }
    369 
    370         $post_data['post_mime_type'] = $post->post_mime_type;
    371         $post_data['guid'] = $post->guid;
    372365
    373366        $post_data['ID'] = $post_ID;
     
    542535    $_POST['post_mime_type'] = '';
    543536
    544     // Clear out any data in internal vars.
    545     unset( $_POST['filter'] );
    546 
    547537    // Check for autosave collisions
    548538    // Does this need to be updated? ~ Mark
     
    562552            return edit_post();
    563553        }
    564     }
    565 
    566     // Edit don't write if we have a post id.
    567     if ( isset( $_POST['ID'] ) ) {
    568         $_POST['post_ID'] = $_POST['ID'];
    569         unset ( $_POST['ID'] );
    570     }
    571     if ( isset( $_POST['post_ID'] ) ) {
    572         return edit_post();
    573554    }
    574555
     
    1017998    $q['post_type'] = 'attachment';
    1018999    $post_type = get_post_type_object( 'attachment' );
    1019     $states = 'inherit';
     1000    $states = array( 'inherit' );
    10201001    if ( current_user_can( $post_type->cap->read_private_posts ) )
    1021         $states .= ',private';
     1002        $states[] = 'private';
    10221003
    10231004    $q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : $states;
Note: See TracChangeset for help on using the changeset viewer.