aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-02-11 13:39:21 +0100
committerThomas Citharel <tcit@tcit.fr>2016-02-11 13:39:21 +0100
commitda0a9e01e9b6ef52656aa47367bfc30b1905fe40 (patch)
tree173ffcbe7e14e40a26059228c73d9017d93e1e6f /src/Wallabag/ImportBundle/Import/WallabagV1Import.php
parent0783c99a196d1626d91119f715285150662fbe6e (diff)
downloadwallabag-da0a9e01e9b6ef52656aa47367bfc30b1905fe40.tar.gz
wallabag-da0a9e01e9b6ef52656aa47367bfc30b1905fe40.tar.zst
wallabag-da0a9e01e9b6ef52656aa47367bfc30b1905fe40.zip
CS
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/WallabagV1Import.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagV1Import.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
index 82b52ad3..02327312 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
@@ -10,7 +10,6 @@ use Wallabag\UserBundle\Entity\User;
10use Wallabag\CoreBundle\Tools\Utils; 10use Wallabag\CoreBundle\Tools\Utils;
11use Wallabag\CoreBundle\Helper\ContentProxy; 11use Wallabag\CoreBundle\Helper\ContentProxy;
12 12
13
14class WallabagV1Import implements ImportInterface 13class WallabagV1Import implements ImportInterface
15{ 14{
16 protected $user; 15 protected $user;
@@ -127,10 +126,10 @@ class WallabagV1Import implements ImportInterface
127 protected function parseEntries($entries) 126 protected function parseEntries($entries)
128 { 127 {
129 $i = 1; 128 $i = 1;
130 /** 129 /*
131 * Untitled in all languages from v1. This should never have been translated 130 * Untitled in all languages from v1. This should never have been translated
132 */ 131 */
133 $untitled = array('Untitled','Sans titre','podle nadpisu','Sin título','با عنوان','per titolo','Sem título','Без названия','po naslovu','Без назви'); 132 $untitled = array('Untitled', 'Sans titre', 'podle nadpisu', 'Sin título', 'با عنوان', 'per titolo', 'Sem título', 'Без названия', 'po naslovu', 'Без назви');
134 133
135 foreach ($entries as $importedEntry) { 134 foreach ($entries as $importedEntry) {
136 $existingEntry = $this->em 135 $existingEntry = $this->em
@@ -145,7 +144,7 @@ class WallabagV1Import implements ImportInterface
145 // @see ContentProxy->updateEntry 144 // @see ContentProxy->updateEntry
146 $entry = new Entry($this->user); 145 $entry = new Entry($this->user);
147 $entry->setUrl($importedEntry['url']); 146 $entry->setUrl($importedEntry['url']);
148 if (in_array($importedEntry['title'],$untitled)) { 147 if (in_array($importedEntry['title'], $untitled)) {
149 $entry = $this->contentProxy->updateEntry($entry, $entry->getUrl()); 148 $entry = $this->contentProxy->updateEntry($entry, $entry->getUrl());
150 } else { 149 } else {
151 $entry->setContent($importedEntry['content']); 150 $entry->setContent($importedEntry['content']);