diff options
author | lizyn <zhiylin@outlook.com> | 2020-02-24 10:04:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-24 10:04:13 +0800 |
commit | b19df31d78d881a43bcf6b3215e5fc3781e8e8aa (patch) | |
tree | d0d9861694a4b5e5fbfdbeb53c255ecd15fe9328 /src/Wallabag/ImportBundle/Import/ChromeImport.php | |
parent | 4d0c632c70ea50d459c3c55ddda2e0f394dd51cb (diff) | |
parent | 04d918cae0227c06a41d27fb6533dddbf30dfe71 (diff) | |
download | wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.tar.gz wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.tar.zst wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.zip |
Merge pull request #1 from wallabag/master
Keep up with the master again
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/ChromeImport.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/ChromeImport.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Wallabag/ImportBundle/Import/ChromeImport.php b/src/Wallabag/ImportBundle/Import/ChromeImport.php index 09183abe..4ae82ade 100644 --- a/src/Wallabag/ImportBundle/Import/ChromeImport.php +++ b/src/Wallabag/ImportBundle/Import/ChromeImport.php | |||
@@ -33,6 +33,18 @@ class ChromeImport extends BrowserImport | |||
33 | /** | 33 | /** |
34 | * {@inheritdoc} | 34 | * {@inheritdoc} |
35 | */ | 35 | */ |
36 | public function validateEntry(array $importedEntry) | ||
37 | { | ||
38 | if (empty($importedEntry['url'])) { | ||
39 | return false; | ||
40 | } | ||
41 | |||
42 | return true; | ||
43 | } | ||
44 | |||
45 | /** | ||
46 | * {@inheritdoc} | ||
47 | */ | ||
36 | protected function prepareEntry(array $entry = []) | 48 | protected function prepareEntry(array $entry = []) |
37 | { | 49 | { |
38 | $data = [ | 50 | $data = [ |
@@ -45,7 +57,7 @@ class ChromeImport extends BrowserImport | |||
45 | 'created_at' => substr($entry['date_added'], 0, 10), | 57 | 'created_at' => substr($entry['date_added'], 0, 10), |
46 | ]; | 58 | ]; |
47 | 59 | ||
48 | if (array_key_exists('tags', $entry) && '' !== $entry['tags']) { | 60 | if (\array_key_exists('tags', $entry) && '' !== $entry['tags']) { |
49 | $data['tags'] = $entry['tags']; | 61 | $data['tags'] = $entry['tags']; |
50 | } | 62 | } |
51 | 63 | ||