git-svn-id: http://svn.automattic.com/wordpress/trunk@1944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-12-13 16:32:29 +00:00
parent c16f28ef5d
commit e16bd7dae8
1 changed files with 3 additions and 2 deletions

View File

@ -90,9 +90,10 @@ $title = addslashes( trim($title[1]) );
$post_name = sanitize_title($title);
preg_match('|<pubdate>(.*?)</pubdate>|is', $post, $date);
$date = strtotime($date[1]);
if (!$date) : // if we don't already have something from pubDate
if ($date) :
$date = strtotime($date[1]);
else : // if we don't already have something from pubDate
preg_match('|<dc:date>(.*?)</dc:date>|is', $post, $date);
$date = preg_replace('|(-[0-9:]+)$|', '', $date[1]);
$date = strtotime($date);