mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Improve checks & add tests
This commit is contained in:
parent
a2e60dd393
commit
8d082488e9
2 changed files with 10 additions and 3 deletions
|
@ -206,10 +206,10 @@ 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(1 == $importedEntry['status'] || $this->markAsRead);
|
||||
$entry->setArchived(1 === (int) $importedEntry['status'] || $this->markAsRead);
|
||||
|
||||
// 0 or 1 - 1 If the item is starred
|
||||
$entry->setStarred(1 == $importedEntry['favorite']);
|
||||
// 0 or 1 - 1 if the item is starred
|
||||
$entry->setStarred(1 === (int) $importedEntry['favorite']);
|
||||
|
||||
$title = 'Untitled';
|
||||
if (isset($importedEntry['resolved_title']) && '' !== $importedEntry['resolved_title']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue