diff options
author | Andrew Dolgov <[email protected]> | 2015-11-02 14:22:46 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-11-02 14:22:46 +0300 |
commit | ee4c4602726a1d1064c96414a8e4df0308f3be62 (patch) | |
tree | 4bca2bd9eaffe6119a4a1d7e6411e1c000fff8e0 /plugins/import_export | |
parent | 7475580b37263955445c5ea8a9d292b001f7b9c6 (diff) |
import_export: various bugfixes
Diffstat (limited to 'plugins/import_export')
-rw-r--r-- | plugins/import_export/init.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/import_export/init.php b/plugins/import_export/init.php index b6693f05c..7c628909f 100644 --- a/plugins/import_export/init.php +++ b/plugins/import_export/init.php @@ -241,10 +241,13 @@ class Import_Export extends Plugin implements IHandler { $article = array(); foreach ($article_node->childNodes as $child) { - if ($child->nodeName != 'label_cache') - $article[$child->nodeName] = db_escape_string($child->nodeValue); - else + if ($child->nodeName == 'content') { + $article[$child->nodeName] = db_escape_string($child->nodeValue, false); + } else if ($child->nodeName == 'label_cache') { $article[$child->nodeName] = $child->nodeValue; + } else { + $article[$child->nodeName] = db_escape_string($child->nodeValue); + } } //print_r($article); @@ -350,7 +353,6 @@ class Import_Export extends Plugin implements IHandler { $score = (int) $article['score']; $tag_cache = $article['tag_cache']; - $label_cache = db_escape_string($article['label_cache']); $note = $article['note']; //print "Importing " . $article['title'] . "<br/>"; @@ -363,9 +365,9 @@ class Import_Export extends Plugin implements IHandler { published, score, tag_cache, label_cache, uuid, note) VALUES ($ref_id, $owner_uid, $feed, false, NULL, $marked, $published, $score, '$tag_cache', - '$label_cache', '', '$note')"); + '', '', '$note')"); - $label_cache = json_decode($label_cache, true); + $label_cache = json_decode($article['label_cache'], true); if (is_array($label_cache) && $label_cache["no-labels"] != 1) { foreach ($label_cache as $label) { |