From: Nicolas LÅ“uillet Date: Fri, 7 Oct 2016 13:21:31 +0000 (+0200) Subject: Added default picture if preview picture is null X-Git-Tag: 2.1.2~40^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=d5c45d5288f035ef36484b007cd6cc246fa65e19;p=github%2Fwallabag%2Fwallabag.git Added default picture if preview picture is null --- diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig index 36c49e04..a0a0d3c3 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig @@ -32,6 +32,8 @@ {% if entry.previewPicture is not null %} + {% else %} + {% endif %} diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index 03267e76..d7bf03ba 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -781,6 +781,7 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertContains('og:title', $client->getResponse()->getContent()); $this->assertContains('og:type', $client->getResponse()->getContent()); $this->assertContains('og:url', $client->getResponse()->getContent()); + $this->assertContains('og:image', $client->getResponse()->getContent()); // sharing is now disabled $client->getContainer()->get('craue_config')->set('share_public', 0);