]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Added default picture if preview picture is null 2389/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 7 Oct 2016 13:21:31 +0000 (15:21 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 7 Oct 2016 13:21:31 +0000 (15:21 +0200)
src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig
tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php

index 36c49e0422d0a4866036ea5a974e909427aa8db6..a0a0d3c36c2447140af57cefc09118e957d6294a 100644 (file)
@@ -32,6 +32,8 @@
         <meta property="og:url" content="{{ app.request.uri }}" />
         {% if entry.previewPicture is not null %}
         <meta property="og:image" content="{{ entry.previewPicture }}" />
+        {% else %}
+        <meta property="og:image" content="{{ app.request.schemeAndHttpHost }}{{ asset('bundles/wallabagcore/themes/_global/img/logo-other_themes.png') }}" />
         {% endif %}
     </head>
     <body>
index 03267e7686a2a46ebe66f9fa993993dede9d0809..d7bf03ba5879e9bf0e1668c140456cbbdeb84ae7 100644 (file)
@@ -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);