diff options
Diffstat (limited to 'src')
5 files changed, 21 insertions, 13 deletions
diff --git a/src/Wallabag/ApiBundle/Entity/AccessToken.php b/src/Wallabag/ApiBundle/Entity/AccessToken.php index 2ff63a83..c09a0c80 100644 --- a/src/Wallabag/ApiBundle/Entity/AccessToken.php +++ b/src/Wallabag/ApiBundle/Entity/AccessToken.php | |||
@@ -19,7 +19,7 @@ class AccessToken extends BaseAccessToken | |||
19 | protected $id; | 19 | protected $id; |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @ORM\ManyToOne(targetEntity="Client") | 22 | * @ORM\ManyToOne(targetEntity="Client", inversedBy="accessTokens") |
23 | * @ORM\JoinColumn(nullable=false) | 23 | * @ORM\JoinColumn(nullable=false) |
24 | */ | 24 | */ |
25 | protected $client; | 25 | protected $client; |
diff --git a/src/Wallabag/ApiBundle/Entity/RefreshToken.php b/src/Wallabag/ApiBundle/Entity/RefreshToken.php index 6d0cab68..822a02d8 100644 --- a/src/Wallabag/ApiBundle/Entity/RefreshToken.php +++ b/src/Wallabag/ApiBundle/Entity/RefreshToken.php | |||
@@ -19,7 +19,7 @@ class RefreshToken extends BaseRefreshToken | |||
19 | protected $id; | 19 | protected $id; |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @ORM\ManyToOne(targetEntity="Client") | 22 | * @ORM\ManyToOne(targetEntity="Client", inversedBy="refreshTokens") |
23 | * @ORM\JoinColumn(nullable=false) | 23 | * @ORM\JoinColumn(nullable=false) |
24 | */ | 24 | */ |
25 | protected $client; | 25 | protected $client; |
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index cc7c2c94..8e438229 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -9,7 +9,7 @@ use Symfony\Component\Console\Helper\Table; | |||
9 | use Symfony\Component\Console\Input\ArrayInput; | 9 | use Symfony\Component\Console\Input\ArrayInput; |
10 | use Symfony\Component\Console\Input\InputInterface; | 10 | use Symfony\Component\Console\Input\InputInterface; |
11 | use Symfony\Component\Console\Input\InputOption; | 11 | use Symfony\Component\Console\Input\InputOption; |
12 | use Symfony\Component\Console\Output\NullOutput; | 12 | use Symfony\Component\Console\Output\BufferedOutput; |
13 | use Symfony\Component\Console\Output\OutputInterface; | 13 | use Symfony\Component\Console\Output\OutputInterface; |
14 | use Symfony\Component\Console\Question\ConfirmationQuestion; | 14 | use Symfony\Component\Console\Question\ConfirmationQuestion; |
15 | use Symfony\Component\Console\Question\Question; | 15 | use Symfony\Component\Console\Question\Question; |
@@ -97,7 +97,8 @@ class InstallCommand extends ContainerAwareCommand | |||
97 | try { | 97 | try { |
98 | $this->getContainer()->get('doctrine')->getManager()->getConnection()->connect(); | 98 | $this->getContainer()->get('doctrine')->getManager()->getConnection()->connect(); |
99 | } catch (\Exception $e) { | 99 | } catch (\Exception $e) { |
100 | if (false === strpos($e->getMessage(), 'Unknown database')) { | 100 | if (false === strpos($e->getMessage(), 'Unknown database') |
101 | && false === strpos($e->getMessage(), 'database "'.$this->getContainer()->getParameter('database_name').'" does not exist')) { | ||
101 | $fulfilled = false; | 102 | $fulfilled = false; |
102 | $status = '<error>ERROR!</error>'; | 103 | $status = '<error>ERROR!</error>'; |
103 | $help = 'Can\'t connect to the database: '.$e->getMessage(); | 104 | $help = 'Can\'t connect to the database: '.$e->getMessage(); |
@@ -420,16 +421,18 @@ class InstallCommand extends ContainerAwareCommand | |||
420 | } | 421 | } |
421 | 422 | ||
422 | $this->getApplication()->setAutoExit(false); | 423 | $this->getApplication()->setAutoExit(false); |
423 | $exitCode = $this->getApplication()->run(new ArrayInput($parameters), new NullOutput()); | 424 | |
425 | $output = new BufferedOutput(); | ||
426 | $exitCode = $this->getApplication()->run(new ArrayInput($parameters), $output); | ||
424 | 427 | ||
425 | if (0 !== $exitCode) { | 428 | if (0 !== $exitCode) { |
426 | $this->getApplication()->setAutoExit(true); | 429 | $this->getApplication()->setAutoExit(true); |
427 | 430 | ||
428 | $errorMessage = sprintf('The command "%s" terminated with an error code: %u.', $command, $exitCode); | 431 | $this->defaultOutput->writeln(''); |
429 | $this->defaultOutput->writeln("<error>$errorMessage</error>"); | 432 | $this->defaultOutput->writeln('<error>The command "'.$command.'" generates some errors: </error>'); |
430 | $exception = new \Exception($errorMessage, $exitCode); | 433 | $this->defaultOutput->writeln($output->fetch()); |
431 | 434 | ||
432 | throw $exception; | 435 | die(); |
433 | } | 436 | } |
434 | 437 | ||
435 | // PDO does not always close the connection after Doctrine commands. | 438 | // PDO does not always close the connection after Doctrine commands. |
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 a0a0d3c3..804adb36 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 | |||
@@ -30,11 +30,16 @@ | |||
30 | <meta property="og:title" content="{{ entry.title | raw }}" /> | 30 | <meta property="og:title" content="{{ entry.title | raw }}" /> |
31 | <meta property="og:type" content="article" /> | 31 | <meta property="og:type" content="article" /> |
32 | <meta property="og:url" content="{{ app.request.uri }}" /> | 32 | <meta property="og:url" content="{{ app.request.uri }}" /> |
33 | {% set picturePath = app.request.schemeAndHttpHost ~ asset('bundles/wallabagcore/themes/_global/img/logo-other_themes.png') %} | ||
33 | {% if entry.previewPicture is not null %} | 34 | {% if entry.previewPicture is not null %} |
34 | <meta property="og:image" content="{{ entry.previewPicture }}" /> | 35 | {% set picturePath = entry.previewPicture %} |
35 | {% else %} | ||
36 | <meta property="og:image" content="{{ app.request.schemeAndHttpHost }}{{ asset('bundles/wallabagcore/themes/_global/img/logo-other_themes.png') }}" /> | ||
37 | {% endif %} | 36 | {% endif %} |
37 | <meta property="og:image" content="{{ picturePath }}" /> | ||
38 | <meta name="twitter:card" content="summary" /> | ||
39 | <meta name="twitter:image" content="{{ picturePath }}" /> | ||
40 | <meta name="twitter:site" content="@wallabagapp" /> | ||
41 | <meta name="twitter:title" content="{{ entry.title | raw }}" /> | ||
42 | <meta name="twitter:description" content="{{ entry.title | raw }}" /> | ||
38 | </head> | 43 | </head> |
39 | <body> | 44 | <body> |
40 | <header> | 45 | <header> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/_bookmarklet.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/_bookmarklet.html.twig index 966a84db..3385cd53 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/_bookmarklet.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/_bookmarklet.html.twig | |||
@@ -1 +1 @@ | |||
<a id="bookmarklet" ondragend="this.click();" href="javascript:var url=location.href||url;var wllbg=window.open('{{ url('bookmarklet') }}?url=' + encodeURI(url),'_blank');wllbg.close();void(0);">bag it!</a> | <a id="bookmarklet" ondragend="this.click();" href="javascript:(function(){var url=location.href||url;var wllbg=window.open('{{ url('bookmarklet') }}?url=' + encodeURI(url),'_blank');})();">bag it!</a> | ||