forked from wallabag/wallabag
CS
This commit is contained in:
@ -149,7 +149,7 @@ class PocketImport extends AbstractImport
|
||||
// - first call get 5k offset 0
|
||||
// - second call get 5k offset 5k
|
||||
// - and so on
|
||||
if (count($entries['list']) === self::NB_ELEMENTS) {
|
||||
if (self::NB_ELEMENTS === count($entries['list'])) {
|
||||
++$run;
|
||||
|
||||
return $this->import(self::NB_ELEMENTS * $run);
|
||||
@ -175,7 +175,7 @@ class PocketImport extends AbstractImport
|
||||
*/
|
||||
public function parseEntry(array $importedEntry)
|
||||
{
|
||||
$url = isset($importedEntry['resolved_url']) && $importedEntry['resolved_url'] !== '' ? $importedEntry['resolved_url'] : $importedEntry['given_url'];
|
||||
$url = isset($importedEntry['resolved_url']) && '' !== $importedEntry['resolved_url'] ? $importedEntry['resolved_url'] : $importedEntry['given_url'];
|
||||
|
||||
$existingEntry = $this->em
|
||||
->getRepository('WallabagCoreBundle:Entry')
|
||||
@ -194,15 +194,15 @@ class PocketImport extends AbstractImport
|
||||
$this->fetchContent($entry, $url);
|
||||
|
||||
// 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted
|
||||
$entry->setArchived($importedEntry['status'] === 1 || $this->markAsRead);
|
||||
$entry->setArchived(1 === $importedEntry['status'] || $this->markAsRead);
|
||||
|
||||
// 0 or 1 - 1 If the item is starred
|
||||
$entry->setStarred($importedEntry['favorite'] === 1);
|
||||
$entry->setStarred(1 === $importedEntry['favorite']);
|
||||
|
||||
$title = 'Untitled';
|
||||
if (isset($importedEntry['resolved_title']) && $importedEntry['resolved_title'] !== '') {
|
||||
if (isset($importedEntry['resolved_title']) && '' !== $importedEntry['resolved_title']) {
|
||||
$title = $importedEntry['resolved_title'];
|
||||
} elseif (isset($importedEntry['given_title']) && $importedEntry['given_title'] !== '') {
|
||||
} elseif (isset($importedEntry['given_title']) && '' !== $importedEntry['given_title']) {
|
||||
$title = $importedEntry['given_title'];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user