From e9e52236155f803f226bb49b9cf04333da363202 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Fri, 18 Jan 2008 07:59:09 +0000 Subject: [PATCH] Ensure APP clients can update timestamps on publish. Fixes #5680 props tvachon. git-svn-id: https://develop.svn.wordpress.org/trunk@6635 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-app.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-app.php b/wp-app.php index 5afa21cb48..a4df2f27a7 100644 --- a/wp-app.php +++ b/wp-app.php @@ -260,7 +260,7 @@ EOD; $post_title = $entry->title[1]; $post_content = $entry->content[1]; $post_excerpt = $entry->summary[1]; - $pubtimes = $this->get_publish_time($entry); + $pubtimes = $this->get_publish_time($entry->published); $post_date = $pubtimes[0]; $post_date_gmt = $pubtimes[1]; @@ -332,7 +332,7 @@ EOD; $post_title = $parsed->title[1]; $post_content = $parsed->content[1]; $post_excerpt = $parsed->summary[1]; - $pubtimes = $this->get_publish_time($entry); + $pubtimes = $this->get_publish_time($parsed->published); $post_date = $pubtimes[0]; $post_date_gmt = $pubtimes[1]; @@ -578,7 +578,7 @@ EOD; fclose($localfp); $ID = $entry['ID']; - $pubtimes = $this->get_publish_time($entry); + $pubtimes = $this->get_publish_time($entry->published); $post_date = $pubtimes[0]; $post_date_gmt = $pubtimes[1]; @@ -1098,9 +1098,9 @@ EOD; return strtotime($match[1] . " " . $match[2] . " " . $match[3]); } - function get_publish_time($entry) { + function get_publish_time($published) { - $pubtime = $this->rfc3339_str2time($entry->published); + $pubtime = $this->rfc3339_str2time($published); if(!$pubtime) { return array(current_time('mysql'),current_time('mysql',1));