}
$entries = [];
- $handle = fopen($this->filepath, 'rb');
+ $handle = fopen($this->filepath, 'r');
while (false !== ($data = fgetcsv($handle, 10240))) {
if ('URL' === $data[0]) {
- continue;
+ break;
}
// last element in the csv is the folder where the content belong
$entries[] = [
'url' => $data[0],
'title' => $data[1],
- 'status' => $data[3],
'is_archived' => 'Archive' === $data[3] || 'Starred' === $data[3],
'is_starred' => 'Starred' === $data[3],
'html' => false,
return true;
}
+ /**
+ * {@inheritdoc}
+ */
+ public function validateEntry(array $importedEntry)
+ {
+ if (empty($importedEntry['url'])) {
+ return false;
+ }
+
+ return true;
+ }
+
/**
* {@inheritdoc}
*/