diff --git a/core/components/articles/model/articles/import/articlesimportwordpress.class.php b/core/components/articles/model/articles/import/articlesimportwordpress.class.php index 2c17b09..e2a83ec 100644 --- a/core/components/articles/model/articles/import/articlesimportwordpress.class.php +++ b/core/components/articles/model/articles/import/articlesimportwordpress.class.php @@ -150,13 +150,14 @@ public function createContainer() { * @return Article|boolean */ public function createArticle(SimpleXMLElement $item) { - $postType = (string)$this->getXPath($item,'wp:post_type'); + $wp = $item->children('wp',true); + $postType = (string)$wp->post_type; if ($postType != 'post') return false; $settings = $this->container->getContainerSettings(); $creator = $this->matchCreator((string)$item->xpath('dc:creator'.'/text()'),1); /** @var SimpleXMLElement $wp */ - $wp = $item->children('wp',true); + $pubDate = strtotime((string)$item->pubDate); if (empty($pubDate)) { $pubDate = strtotime((string)$wp->post_date); @@ -197,9 +198,9 @@ public function parseContent($string) { $string = (string)$string; $string = html_entity_decode((string)$string,ENT_COMPAT); $string = str_replace(array( - 'Ò', - 'Ó', - 'É', + 'Ã’', + 'Ó', + 'É', '[[', ']]', ),array( @@ -343,4 +344,4 @@ public function importTags(Article $article,SimpleXMLElement $item) { class ArticlesWordPressWxr extends SimpleXMLElement { -} \ No newline at end of file +}