jenkins-bot has submitted this change and it was merged.

Change subject: Fix url schemas
......................................................................


Fix url schemas

Previously they weren't capturing symbols so usernames with symbols would go
not found

Bug: T94206
Change-Id: Icbd49f0e2867214433d6f0e6746e943f4dd943ad
---
M includes/specials/SpecialGather.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialGather.php 
b/includes/specials/SpecialGather.php
index 06c616f..6f3e6a9 100644
--- a/includes/specials/SpecialGather.php
+++ b/includes/specials/SpecialGather.php
@@ -46,7 +46,7 @@
                        $user = $this->getUser();
                        $this->renderUserCollectionsList( $user );
 
-               } elseif ( preg_match( '/^by\/(?<user>\w+)\/?$/', $subpage, 
$matches ) ) {
+               } elseif ( preg_match( '/^by\/(?<user>[^\/]+)\/?$/', $subpage, 
$matches ) ) {
                        // User's collections
                        // /by/:user = /by/:user/
                        $user = User::newFromName( $matches['user'] );
@@ -58,7 +58,7 @@
                                $this->renderUserCollectionsList( $user );
                        }
 
-               } elseif ( preg_match( '/^by\/(?<user>\w+)\/(?<id>\d+)$/', 
$subpage, $matches ) ) {
+               } elseif ( preg_match( '/^by\/(?<user>[^\/]+)\/(?<id>\d+)$/', 
$subpage, $matches ) ) {
                        // Collection page
                        // /by/:user/:id
                        $id = (int)$matches['id'];
@@ -71,7 +71,7 @@
                                $this->renderUserCollection( $user, $id );
                        }
 
-               } elseif ( preg_match( '/^all(\/(?<mode>\w+))?\/?$/', $subpage, 
$matches ) ) {
+               } elseif ( preg_match( '/^all(\/(?<mode>[^\/]+))?\/?$/', 
$subpage, $matches ) ) {
                        // All collections. Public or hidden
                        // /all = /all/ = /all/public = /all/public/
                        // /all/hidden = /all/hidden/

-- 
To view, visit https://gerrit.wikimedia.org/r/200227
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icbd49f0e2867214433d6f0e6746e943f4dd943ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jhernandez <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to