]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
[ROUTES] Fixed attachment routes, broken by channges in fa378462f4
authorMiguel Dantas <biodantasgs@gmail.com>
Tue, 23 Jul 2019 10:47:36 +0000 (11:47 +0100)
committerDiogo Cordeiro <diogo@fc.up.pt>
Sat, 3 Aug 2019 16:47:17 +0000 (17:47 +0100)
lib/router.php

index 09dc43e6485a5f74748ce855784fad25ba304422..161b198318875f6eb38f80a0d4dca26813da52e5 100644 (file)
@@ -227,8 +227,8 @@ class Router
                       '/view' => 'attachment_view',
                       '/download' => 'attachment_download',
                       '/thumbnail' => 'attachment_thumbnail'] as $postfix => $action) {
-                foreach (['attachment' => '[0-9]+',
-                          'filehash' => '[A-Za-z0-9._-]+'] as $type => $match) {
+                foreach (['filehash' => '[A-Za-z0-9._-]{64}',
+                          'attachment' => '[0-9]+'] as $type => $match) {
                     $m->connect("attachment/:{$type}{$postfix}",
                                 ['action' => $action],
                                 [$type => $match]);