aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-10-07 16:35:32 +0200
committerGitHub <noreply@github.com>2016-10-07 16:35:32 +0200
commit20bf78b9352ca04372fb9665ed125bd068ff8b67 (patch)
treed1db4151b803f67ebb8ffd29d6caf888ea2fc7ca
parent499ba4cb2fb6c53982923d53c8a72ba8594dc8c7 (diff)
parentd5c45d5288f035ef36484b007cd6cc246fa65e19 (diff)
downloadwallabag-20bf78b9352ca04372fb9665ed125bd068ff8b67.tar.gz
wallabag-20bf78b9352ca04372fb9665ed125bd068ff8b67.tar.zst
wallabag-20bf78b9352ca04372fb9665ed125bd068ff8b67.zip
Merge pull request #2389 from wallabag/add-info-publich-articles
Added default picture if preview picture is null
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig2
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php1
2 files changed, 3 insertions, 0 deletions
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 @@
32 <meta property="og:url" content="{{ app.request.uri }}" /> 32 <meta property="og:url" content="{{ app.request.uri }}" />
33 {% if entry.previewPicture is not null %} 33 {% if entry.previewPicture is not null %}
34 <meta property="og:image" content="{{ entry.previewPicture }}" /> 34 <meta property="og:image" content="{{ entry.previewPicture }}" />
35 {% else %}
36 <meta property="og:image" content="{{ app.request.schemeAndHttpHost }}{{ asset('bundles/wallabagcore/themes/_global/img/logo-other_themes.png') }}" />
35 {% endif %} 37 {% endif %}
36 </head> 38 </head>
37 <body> 39 <body>
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
781 $this->assertContains('og:title', $client->getResponse()->getContent()); 781 $this->assertContains('og:title', $client->getResponse()->getContent());
782 $this->assertContains('og:type', $client->getResponse()->getContent()); 782 $this->assertContains('og:type', $client->getResponse()->getContent());
783 $this->assertContains('og:url', $client->getResponse()->getContent()); 783 $this->assertContains('og:url', $client->getResponse()->getContent());
784 $this->assertContains('og:image', $client->getResponse()->getContent());
784 785
785 // sharing is now disabled 786 // sharing is now disabled
786 $client->getContainer()->get('craue_config')->set('share_public', 0); 787 $client->getContainer()->get('craue_config')->set('share_public', 0);