aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/importExportController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-01-24 19:54:34 +0100
committerGravatar GitHub <noreply@github.com> 2019-01-24 19:54:34 +0100
commitf0684d701862d103fce834bad9e139f97544bc62 (patch)
tree2fe91e81f886ea0e7c7bc654596d7927137d0681 /app/Controllers/importExportController.php
parentda4a80b88a64855bd62d996baabaaf25497c5f42 (diff)
Fix import labels (#2225)
All labelled articles were wrongly marked as starred.
Diffstat (limited to 'app/Controllers/importExportController.php')
-rw-r--r--app/Controllers/importExportController.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php
index 3f2947c7a..96c5e42c2 100644
--- a/app/Controllers/importExportController.php
+++ b/app/Controllers/importExportController.php
@@ -41,7 +41,8 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
$list_files = array(
'opml' => array(),
'json_starred' => array(),
- 'json_feed' => array()
+ 'json_feed' => array(),
+ 'ttrss_starred' => array(),
);
// We try to list all files according to their type
@@ -505,7 +506,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
$feed_id = $article_to_feed[$item['id']];
$author = isset($item['author']) ? $item['author'] : '';
- $is_starred = $starred;
+ $is_starred = false;
$tags = $item['categories'];
$labels = array();
for ($i = count($tags) - 1; $i >= 0; $i --) {
@@ -522,6 +523,10 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
unset($tags[$i]);
}
}
+ if ($starred && !$is_starred) {
+ //If the article has no label, mark it as starred (old format)
+ $is_starred = empty($labels);
+ }
$url = $item['alternate'][0]['href'];
if (!empty($item['content']['content'])) {