Make WordPress Core


Ignore:
Timestamp:
12/10/2005 11:22:47 PM (16 years ago)
Author:
ryan
Message:

Make sure fields without defaults are specified when inserting. fixes #1953

File:
1 edited

Legend:

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

    r3277 r3285  
    8585    else
    8686        $to_ping = '';
    87    
     87
     88    if ( ! isset($pinged) )
     89        $pinged = '';
     90
    8891    if ( isset($post_parent) )
    8992        $post_parent = (int) $post_parent;
     
    124127            post_date_gmt = '$post_date_gmt',
    125128            post_content = '$post_content',
     129            post_content_filtered = '$post_content_filtered',
    126130            post_title = '$post_title',
    127131            post_excerpt = '$post_excerpt',
     
    132136            post_name = '$post_name',
    133137            to_ping = '$to_ping',
     138            pinged = '$pinged',
    134139            post_modified = '$post_date',
    135140            post_modified_gmt = '$post_date_gmt',
     
    140145        $wpdb->query(
    141146            "INSERT INTO $wpdb->posts
    142             (post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt,  post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt, post_parent, menu_order, post_mime_type)
     147            (post_author, post_date, post_date_gmt, post_content, post_content_filtered, post_title, post_excerpt,  post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_parent, menu_order, post_mime_type)
    143148            VALUES
    144             ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_title', '$post_excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type')");
     149            ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type')");
    145150            $post_ID = $wpdb->insert_id;           
    146151    }
Note: See TracChangeset for help on using the changeset viewer.