From dfa18939e87c4e8f8f61124f3fcf6ae3f36fc44c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 11 Jul 2017 10:14:08 +0200 Subject: Fixed review --- src/Wallabag/CoreBundle/Controller/EntryController.php | 1 - src/Wallabag/CoreBundle/Helper/ContentProxy.php | 1 + tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 3ac0f8a6..b7fdea27 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -78,7 +78,6 @@ class EntryController extends Controller return $this->redirect($this->generateUrl('view', ['id' => $existingEntry->getId()])); } - $entry->setGivenUrl($entry->getUrl()); $this->updateEntry($entry); $em = $this->getDoctrine()->getManager(); diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index fe795d42..48b5dfbc 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -65,6 +65,7 @@ class ContentProxy // so we'll be able to refetch it in the future $content['url'] = !empty($content['url']) ? $content['url'] : $url; + $entry->setGivenUrl($url); $this->stockEntry($entry, $content); } diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index cd63c1ba..20acd103 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -270,7 +270,7 @@ class EntryControllerTest extends WallabagCoreTestCase $this->logInAs('admin'); $client = $this->getClient(); - $url = 'https://fashionunited.com/news/business/jigsaw-posts-8-percent-increase-in-annual-sales/2017070316404'; + $url = 'http://bit.ly/2t8Fwre'; $crawler = $client->request('GET', '/new'); -- cgit v1.2.3