mirror of
https://github.com/wallabag/wallabag.git
synced 2025-02-02 12:02:23 +00:00
Update url from graby
This commit is contained in:
parent
a1413a3da9
commit
d13de40db6
2 changed files with 2 additions and 1 deletions
|
@ -149,7 +149,7 @@ class WallabagRestController extends Controller
|
|||
$content = $this->get('wallabag_core.graby')->fetchContent($url);
|
||||
|
||||
$entry = new Entry($this->getUser());
|
||||
$entry->setUrl($url);
|
||||
$entry->setUrl($content['url'] ?: $url);
|
||||
$entry->setTitle($request->request->get('title') ?: $content['title']);
|
||||
$entry->setContent($content['html']);
|
||||
$entry->setMimetype($content['content_type']);
|
||||
|
|
|
@ -32,6 +32,7 @@ class EntryController extends Controller
|
|||
if ($form->isValid()) {
|
||||
$content = $this->get('wallabag_core.graby')->fetchContent($entry->getUrl());
|
||||
|
||||
$entry->setUrl($content['url'] ?: $entry->getUrl());
|
||||
$entry->setTitle($content['title']);
|
||||
$entry->setContent($content['html']);
|
||||
$entry->setMimetype($content['content_type']);
|
||||
|
|
Loading…
Reference in a new issue