]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
updateOriginUrl: remove 'query string' case from ignore list
authorKevin Decherf <kevin@kdecherf.com>
Wed, 24 Oct 2018 20:27:27 +0000 (22:27 +0200)
committerKevin Decherf <kevin@kdecherf.com>
Wed, 24 Oct 2018 20:27:27 +0000 (22:27 +0200)
Two urls with a different query string may refer to two different pages
so keep them both.

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
src/Wallabag/CoreBundle/Helper/ContentProxy.php
tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php

index a93f4a2d65eafde8dca1d87fbe202b0c21fe0035..74130be8ecc4fc8fbdf66a86cbda37d179757bc6 100644 (file)
@@ -374,8 +374,6 @@ class ContentProxy
                 $entry->setUrl($url);
                 break;
             case ['fragment']:
-            case ['query']:
-            case ['fragment', 'query']:
                 // noop
                 break;
             default:
index a60aec5b43c0a0065b23fb655ca044c0d46ec319..3dd9273c825f082032d0c9933dbff0995866ee81 100644 (file)
@@ -777,20 +777,12 @@ class ContentProxyTest extends TestCase
                 null,
                 'example.com',
             ],
-            'no query string in fetched content' => [
-                'https://example.org/hello?world=1',
-                null,
-                'https://example.org/hello',
-                'https://example.org/hello?world=1',
-                null,
-                'example.org',
-            ],
             'query string in fetched content' => [
                 'https://example.org/hello',
                 null,
                 'https://example.org/hello?world=1',
+                'https://example.org/hello?world=1',
                 'https://example.org/hello',
-                null,
                 'example.org',
             ],
             'fragment in fetched content' => [
@@ -805,8 +797,8 @@ class ContentProxyTest extends TestCase
                 'https://example.org/hello',
                 null,
                 'https://example.org/hello?foo#world',
+                'https://example.org/hello?foo#world',
                 'https://example.org/hello',
-                null,
                 'example.org',
             ],
             'different path and query string in fetch content' => [