]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/InstapaperImport.php
Merge remote-tracking branch 'origin/master' into 2.4
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / InstapaperImport.php
index 6b6b35afa7e5e0da548c6126a3657654a2ba4259..f7bee9ef01dc13625d94f024f760efa103be32cd 100644 (file)
@@ -65,7 +65,7 @@ class InstapaperImport extends AbstractImport
         $handle = fopen($this->filepath, 'r');
         while (false !== ($data = fgetcsv($handle, 10240))) {
             if ('URL' === $data[0]) {
-                break;
+                continue;
             }
 
             // last element in the csv is the folder where the content belong
@@ -93,6 +93,10 @@ class InstapaperImport extends AbstractImport
             return false;
         }
 
+        // most recent articles are first, which means we should create them at the end so they will show up first
+        // as Instapaper doesn't export the creation date of the article
+        $entries = array_reverse($entries);
+
         if ($this->producer) {
             $this->parseEntriesForProducer($entries);