]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #3468 from wallabag/fix-migration-3139
authorNicolas LÅ“uillet <nicolas@loeuillet.org>
Mon, 11 Dec 2017 18:38:46 +0000 (19:38 +0100)
committerGitHub <noreply@github.com>
Mon, 11 Dec 2017 18:38:46 +0000 (19:38 +0100)
Fix migration from #3139

app/config/security.yml
src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig
tests/Wallabag/CoreBundle/Controller/RssControllerTest.php

index e14a0bd19b1924ea34d6f85e787b2c6c7c290948..796dc361e1ea202e67cd3f610f283f81502d1020 100644 (file)
@@ -60,7 +60,7 @@ security:
         - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
         - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
         - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
-        - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
+        - { path: /(unread|starred|archive|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
         - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
         - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY }
         - { path: ^/settings, roles: ROLE_SUPER_ADMIN }
index d70aa5dc9c99e58fa043d47183ae5e936e0a164f..25d09ec31a6612afce666243e7129d67cd20e0eb 100644 (file)
@@ -11,7 +11,7 @@
             <link rel="next" href="{{ url }}?page={{ entries.nextPage }}"/>
         {% endif -%}
         <link rel="last" href="{{ url }}?page={{ entries.nbPages }}"/>
-        <pubDate>{{ "now"|date('D, d M Y H:i:s') }}</pubDate>
+        <pubDate>{{ "now"|date(constant('DATE_RSS')) }}</pubDate>
         <generator>wallabag</generator>
         <description>wallabag {{ type }} elements</description>
 
@@ -22,7 +22,7 @@
                 <source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source>
                 <link>{{ entry.url }}</link>
                 <guid>{{ entry.url }}</guid>
-                <pubDate>{{ entry.createdAt|date('D, d M Y H:i:s') }}</pubDate>
+                <pubDate>{{ entry.createdAt|date(constant('DATE_RSS')) }}</pubDate>
                 <description>
                     <![CDATA[{%- if entry.readingTime > 0 -%}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}{%- else -%}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{%- endif %}{{ entry.content|raw -}}]]>
                 </description>
index c6ca49374cd002086226fa66714102b7992d462e..2af6e14f3d80b1a352db946ab0a4ce2554ce9d31 100644 (file)
@@ -61,6 +61,9 @@ class RssControllerTest extends WallabagCoreTestCase
             [
                 '/wallace/YZIOAUZIAO/archives.xml',
             ],
+            [
+                '/wallace/YZIOAUZIAO/all.xml',
+            ],
         ];
     }
 
@@ -141,6 +144,28 @@ class RssControllerTest extends WallabagCoreTestCase
         $this->validateDom($client->getResponse()->getContent(), 'archive', 'archive');
     }
 
+    public function testAll()
+    {
+        $client = $this->getClient();
+        $em = $client->getContainer()->get('doctrine.orm.entity_manager');
+        $user = $em
+            ->getRepository('WallabagUserBundle:User')
+            ->findOneByUsername('admin');
+
+        $config = $user->getConfig();
+        $config->setRssToken('SUPERTOKEN');
+        $config->setRssLimit(null);
+        $em->persist($config);
+        $em->flush();
+
+        $client = $this->getClient();
+        $client->request('GET', '/admin/SUPERTOKEN/all.xml');
+
+        $this->assertSame(200, $client->getResponse()->getStatusCode());
+
+        $this->validateDom($client->getResponse()->getContent(), 'all', 'all');
+    }
+
     public function testPagination()
     {
         $client = $this->getClient();