From 21a150eefa7b9e10f7267d9fab98fc12e33eb631 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 17 Jul 2005 19:02:05 +0000 Subject: [PATCH] touch_time() fixes. git-svn-id: https://develop.svn.wordpress.org/trunk@2719 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/admin-functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 45dac0a1eb..545f3e6258 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -749,8 +749,8 @@ function update_meta($mid, $mkey, $mvalue) { } function touch_time($edit = 1, $for_post = 1) { - global $month, $postdata, $commentdata; - if ( $for_post && ('draft' == $postdata->post_status) ) { + global $month, $post, $comment; + if ( $for_post && ('draft' == $post->post_status) ) { $checked = 'checked="checked" '; $edit = false; } else { @@ -760,7 +760,7 @@ function touch_time($edit = 1, $for_post = 1) { echo '
'; $time_adj = time() + (get_settings('gmt_offset') * 3600); - $post_date = ($for_post) ? $postdata->post_date : $commentdata['comment_date']; + $post_date = ($for_post) ? $post->post_date : $comment->comment_date; $jj = ($edit) ? mysql2date('d', $post_date) : gmdate('d', $time_adj); $mm = ($edit) ? mysql2date('m', $post_date) : gmdate('m', $time_adj); $aa = ($edit) ? mysql2date('Y', $post_date) : gmdate('Y', $time_adj); @@ -791,7 +791,7 @@ function touch_time($edit = 1, $for_post = 1) { : post_status) ) { + if ( $for_post && ('draft' == $post->post_status) ) { $jj = mysql2date('d', $post_date); $mm = mysql2date('m', $post_date); $aa = mysql2date('Y', $post_date);