]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #3488 from wallabag/pg-10
authorJérémy Benoist <j0k3r@users.noreply.github.com>
Wed, 13 Dec 2017 12:50:15 +0000 (13:50 +0100)
committerGitHub <noreply@github.com>
Wed, 13 Dec 2017 12:50:15 +0000 (13:50 +0100)
Add custom driver & schema manager for PostgreSQL 10

README.md
app/DoctrineMigrations/Version20160401000000.php
src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig

index 7ea2215e62db3b15735d27c830fda5e5b806587d..f463f79ad9a1cd1266fb756f55e404500ee51797 100644 (file)
--- 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 <nicolas@loeuillet.org>
 This work is free. You can redistribute it and/or modify it under the
index a8603abf68bb1dc8ebf3b10b43c3ed593e1ffeac..a88d2dc02367c463d036e23c1a30685027e69254 100644 (file)
@@ -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;
+    }
 }
index 2bf9b2bd735d1852ac32f13c5a7a8831d206b635..eb26054cb84aa85eead5b2905c232363fa19015e 100644 (file)
@@ -1,6 +1,11 @@
 {% if tag is defined %}
     <a rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" class="right"><i class="material-icons md-24">rss_feed</i></a>
-{% elseif currentRoute in ['unread', 'starred', 'archive', 'all'] %}
-    <a rel="alternate" type="application/rss+xml" href="{{ path(currentRoute ~ '_rss', {'username': app.user.username, 'token': app.user.config.rssToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
-{% endif %}
+{% elseif currentRoute in ['homepage', 'unread', 'starred', 'archive', 'all'] %}
+    {% set rssRoute = currentRoute %}
+    {% if currentRoute == 'homepage' %}
+        {% set rssRoute = 'unread' %}
+    {% endif %}
+    {% set rssRoute = rssRoute ~ '_rss' %}
 
+    <a rel="alternate" type="application/rss+xml" href="{{ path(rssRoute, {'username': app.user.username, 'token': app.user.config.rssToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
+{% endif %}
index bd9eb0d7e43c78a74ee1c543a2323c5e9236f89c..e134abcd051d333e180bbb49fa6522dec6dca295 100644 (file)
             <div class="collapsible-body"></div>
         </li>
 
+        {% 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')
+        %}
         <li class="bold">
             <a class="waves-effect collapsible-header">
                 <i class="material-icons small">share</i>
                 </ul>
             </div>
         </li>
+        {% endif %}
 
         {% if craue_setting('show_printlink') %}
         <li class="bold border-bottom hide-on-med-and-down">