mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-27 11:22:17 -05:00
[fix] #375 Readability.com changed its export format
This commit is contained in:
parent
4d058d4824
commit
9bc32632af
@ -806,34 +806,37 @@ class Poche
|
|||||||
$url = NULL;
|
$url = NULL;
|
||||||
$favorite = FALSE;
|
$favorite = FALSE;
|
||||||
$archive = FALSE;
|
$archive = FALSE;
|
||||||
foreach ($value as $attr => $attr_value) {
|
foreach ($value as $item) {
|
||||||
if ($attr == 'article__url') {
|
foreach ($item as $attr => $value) {
|
||||||
$url = new Url(base64_encode($attr_value));
|
if ($attr == 'article__url') {
|
||||||
}
|
$url = new Url(base64_encode($value));
|
||||||
$sequence = '';
|
|
||||||
if (STORAGE == 'postgres') {
|
|
||||||
$sequence = 'entries_id_seq';
|
|
||||||
}
|
|
||||||
if ($attr_value == 'true') {
|
|
||||||
if ($attr == 'favorite') {
|
|
||||||
$favorite = TRUE;
|
|
||||||
}
|
}
|
||||||
if ($attr == 'archive') {
|
$sequence = '';
|
||||||
$archive = TRUE;
|
if (STORAGE == 'postgres') {
|
||||||
|
$sequence = 'entries_id_seq';
|
||||||
|
}
|
||||||
|
if ($value == 'true') {
|
||||||
|
if ($attr == 'favorite') {
|
||||||
|
$favorite = TRUE;
|
||||||
|
}
|
||||||
|
if ($attr == 'archive') {
|
||||||
|
$archive = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
# we can add the url
|
# we can add the url
|
||||||
if (!is_null($url) && $url->isCorrect()) {
|
if (!is_null($url) && $url->isCorrect()) {
|
||||||
$this->action('add', $url, 0, TRUE);
|
$this->action('add', $url, 0, TRUE);
|
||||||
$count++;
|
$count++;
|
||||||
if ($favorite) {
|
if ($favorite) {
|
||||||
$last_id = $this->store->getLastId($sequence);
|
$last_id = $this->store->getLastId($sequence);
|
||||||
$this->action('toggle_fav', $url, $last_id, TRUE);
|
$this->action('toggle_fav', $url, $last_id, TRUE);
|
||||||
}
|
}
|
||||||
if ($archive) {
|
if ($archive) {
|
||||||
$last_id = $this->store->getLastId($sequence);
|
$last_id = $this->store->getLastId($sequence);
|
||||||
$this->action('toggle_archive', $url, $last_id, TRUE);
|
$this->action('toggle_archive', $url, $last_id, TRUE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user