]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fixed review
authorNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 11 Jul 2017 08:14:08 +0000 (10:14 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 18 Dec 2017 13:50:04 +0000 (14:50 +0100)
src/Wallabag/CoreBundle/Controller/EntryController.php
src/Wallabag/CoreBundle/Helper/ContentProxy.php
tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php

index 3ac0f8a6591b33ed6e023a7653704fc49f8e0172..b7fdea27942099e821bc836b1f0e081843550e2c 100644 (file)
@@ -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();
index fe795d42b5669c967368d685cc334dd0a193e52f..48b5dfbc73da72d7752bebe30841e81dda3def6a 100644 (file)
@@ -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);
     }
 
index cd63c1ba81775da0e18408cb57ee8b6e1d585c99..20acd10339c74531e15ccda98c009bc1fe56e695 100644 (file)
@@ -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');