From: Jérémy Benoist Date: Wed, 13 Dec 2017 12:50:15 +0000 (+0100) Subject: Merge pull request #3488 from wallabag/pg-10 X-Git-Tag: 2.3.1~14 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=70265817aee257e7e635eda79ce3e037e3b4a242;hp=2e9747a59a6011622588829e4605af3710b61a21;p=github%2Fwallabag%2Fwallabag.git Merge pull request #3488 from wallabag/pg-10 Add custom driver & schema manager for PostgreSQL 10 --- diff --git a/README.md b/README.md index 7ea2215e..f463f79a 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,11 @@ Then you can install wallabag by executing the following commands: ``` git clone https://github.com/wallabag/wallabag.git -cd wallabag && make install -make run +cd wallabag && make install ``` +Now, [configure a virtual host](https://doc.wallabag.org/en/admin/installation/virtualhosts.html) to use your wallabag. + # License Copyright © 2013-2018 Nicolas Lœuillet This work is free. You can redistribute it and/or modify it under the diff --git a/app/DoctrineMigrations/Version20160401000000.php b/app/DoctrineMigrations/Version20160401000000.php index a8603abf..a88d2dc0 100644 --- a/app/DoctrineMigrations/Version20160401000000.php +++ b/app/DoctrineMigrations/Version20160401000000.php @@ -4,21 +4,30 @@ namespace Application\Migrations; use Doctrine\DBAL\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Initial database structure. */ -class Version20160401000000 extends AbstractMigration +class Version20160401000000 extends AbstractMigration implements ContainerAwareInterface { + /** + * @var ContainerInterface + */ + private $container; + + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } + /** * @param Schema $schema */ public function up(Schema $schema) { - if ($this->version->getConfiguration()->getNumberOfExecutedMigrations() > 0) { - $this->version->markMigrated(); - $this->skipIf(true, 'Database already initialized'); - } + $this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized'); switch ($this->connection->getDatabasePlatform()->getName()) { case 'sqlite': @@ -160,7 +169,7 @@ ALTER TABLE wallabag_oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB24A76ED395 FO ALTER TABLE wallabag_oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id) NOT DEFERRABLE INITIALLY IMMEDIATE; ALTER TABLE wallabag_oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE; ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE; -ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES "wallabag_entry" (id) NOT DEFERRABLE INITIALLY IMMEDIATE; +ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES "wallabag_entry" (id) NOT DEFERRABLE INITIALLY IMMEDIATE; SQL ; foreach (explode("\n", $sql) as $query) { @@ -188,4 +197,9 @@ SQL $this->addSql('DROP TABLE "wallabag_user"'); $this->addSql('DROP TABLE wallabag_annotation'); } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig index 2bf9b2bd..eb26054c 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig @@ -1,6 +1,11 @@ {% if tag is defined %} rss_feed -{% elseif currentRoute in ['unread', 'starred', 'archive', 'all'] %} - rss_feed -{% endif %} +{% elseif currentRoute in ['homepage', 'unread', 'starred', 'archive', 'all'] %} + {% set rssRoute = currentRoute %} + {% if currentRoute == 'homepage' %} + {% set rssRoute = 'unread' %} + {% endif %} + {% set rssRoute = rssRoute ~ '_rss' %} + rss_feed +{% endif %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index bd9eb0d7..e134abcd 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig @@ -97,6 +97,15 @@
+ {% if craue_setting('share_public') + or craue_setting('share_twitter') + or craue_setting('share_shaarli') + or craue_setting('share_scuttle') + or craue_setting('share_diaspora') + or craue_setting('share_unmark') + or craue_setting('carrot') + or craue_setting('share_mail') + %}
  • share @@ -169,6 +178,7 @@
  • + {% endif %} {% if craue_setting('show_printlink') %}