Merge pull request from wallabag/add-info-publich-articles

Added default picture if preview picture is null
This commit is contained in:
Nicolas Lœuillet 2016-10-07 16:35:32 +02:00 committed by GitHub
commit 20bf78b935
2 changed files with 3 additions and 0 deletions
src/Wallabag/CoreBundle/Resources/views/themes/common/Entry
tests/Wallabag/CoreBundle/Controller

View 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>

View 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);