Make WordPress Core

Ticket #1837: functions.php.2.diff

File functions.php.2.diff, 1.2 KB (added by technosailor, 20 years ago)
  • wp-includes/functions-post.php

     
    136136                        post_name = '$post_name',
    137137                        to_ping = '$to_ping',
    138138                        pinged = '$pinged',
    139                         post_modified = '$post_date',
    140                         post_modified_gmt = '$post_date_gmt',
     139                        post_modified = '".current_time('mysql')."',
     140                        post_modified_gmt = '".current_time('mysql',1)."',
    141141                        post_parent = '$post_parent',
    142142                        menu_order = '$menu_order'
    143143                        WHERE ID = $post_ID");
     
    283283        if ( !isset($post_password) )
    284284                $post_password = '';
    285285
     286        $post_modified = ( isset($edit_date) ) ? current_time('mysql') : $post_date;
     287        $post_modified_gmt = ( isset($edit_date)) ? current_time('mysql',1) : $post_date_gmt;
     288
    286289        if ($update) {
    287290                $wpdb->query(
    288291                        "UPDATE $wpdb->posts SET
     
    298301                        post_password = '$post_password',
    299302                        post_name = '$post_name',
    300303                        to_ping = '$to_ping',
    301                         post_modified = '$post_date',
    302                         post_modified_gmt = '$post_date_gmt',
     304                        post_modified = '$post_modified',
     305                        post_modified_gmt = '$post_modified_gmt',
    303306                        post_parent = '$post_parent',
    304307                        menu_order = '$menu_order',
    305308                        post_mime_type = '$post_mime_type',