MaxSem 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
(cherry picked from commit 3b123baa3f4d8b09f4c6c1bcbf7ca23f6e8bcbb7)
---
M includes/specials/SpecialGather.php
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
MaxSem: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialGather.php
b/includes/specials/SpecialGather.php
index 4b8b3dd..7ad7a2f 100644
--- a/includes/specials/SpecialGather.php
+++ b/includes/specials/SpecialGather.php
@@ -49,7 +49,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'] );
@@ -61,7 +61,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'];
@@ -74,7 +74,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/200757
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icbd49f0e2867214433d6f0e6746e943f4dd943ad
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: wmf/1.25wmf22
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Jhernandez <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits