Ticket #9588: 9588.9.diff
File 9588.9.diff, 1.1 KB (added by , 16 years ago) |
---|
-
wp-includes/comment.php
189 189 $key = md5( serialize( compact(array_keys($defaults)) ) ); 190 190 $last_changed = wp_cache_get('last_changed', 'comment'); 191 191 if ( !$last_changed ) { 192 $last_changed = time();192 $last_changed = current_time('timestamp'); 193 193 wp_cache_set('last_changed', $last_changed, 'comment'); 194 194 } 195 195 $cache_key = "get_comments:$key:$last_changed"; … … 1601 1601 if ( !$days_old ) 1602 1602 return $posts; 1603 1603 1604 if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) ) {1604 if ( strtotime(gmdate("Y-m-d H:i:s")) - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) ) { 1605 1605 $posts[0]->comment_status = 'closed'; 1606 1606 $posts[0]->ping_status = 'closed'; 1607 1607 } … … 1632 1632 1633 1633 $post = get_post($post_id); 1634 1634 1635 if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) )1635 if ( strtotime(gmdate("Y-m-d H:i:s")) - strtotime( $post->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) ) 1636 1636 return false; 1637 1637 1638 1638 return $open;