|
|
@ -241,10 +241,13 @@ class Import_Export extends Plugin implements IHandler {
|
|
|
|
$article = array();
|
|
|
|
$article = array();
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($article_node->childNodes as $child) {
|
|
|
|
foreach ($article_node->childNodes as $child) {
|
|
|
|
if ($child->nodeName != 'label_cache')
|
|
|
|
if ($child->nodeName == 'content') {
|
|
|
|
$article[$child->nodeName] = db_escape_string($child->nodeValue);
|
|
|
|
$article[$child->nodeName] = db_escape_string($child->nodeValue, false);
|
|
|
|
else
|
|
|
|
} else if ($child->nodeName == 'label_cache') {
|
|
|
|
$article[$child->nodeName] = $child->nodeValue;
|
|
|
|
$article[$child->nodeName] = $child->nodeValue;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$article[$child->nodeName] = db_escape_string($child->nodeValue);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//print_r($article);
|
|
|
|
//print_r($article);
|
|
|
@ -350,7 +353,6 @@ class Import_Export extends Plugin implements IHandler {
|
|
|
|
$score = (int) $article['score'];
|
|
|
|
$score = (int) $article['score'];
|
|
|
|
|
|
|
|
|
|
|
|
$tag_cache = $article['tag_cache'];
|
|
|
|
$tag_cache = $article['tag_cache'];
|
|
|
|
$label_cache = db_escape_string($article['label_cache']);
|
|
|
|
|
|
|
|
$note = $article['note'];
|
|
|
|
$note = $article['note'];
|
|
|
|
|
|
|
|
|
|
|
|
//print "Importing " . $article['title'] . "<br/>";
|
|
|
|
//print "Importing " . $article['title'] . "<br/>";
|
|
|
@ -363,9 +365,9 @@ class Import_Export extends Plugin implements IHandler {
|
|
|
|
published, score, tag_cache, label_cache, uuid, note)
|
|
|
|
published, score, tag_cache, label_cache, uuid, note)
|
|
|
|
VALUES ($ref_id, $owner_uid, $feed, false,
|
|
|
|
VALUES ($ref_id, $owner_uid, $feed, false,
|
|
|
|
NULL, $marked, $published, $score, '$tag_cache',
|
|
|
|
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) {
|
|
|
|
if (is_array($label_cache) && $label_cache["no-labels"] != 1) {
|
|
|
|
foreach ($label_cache as $label) {
|
|
|
|
foreach ($label_cache as $label) {
|
|
|
|