jenkins-bot has submitted this change and it was merged.
Change subject: ImageListPager: Fix improper use of Title::newFromText().
......................................................................
ImageListPager: Fix improper use of Title::newFromText().
The $defaultNamespace parameter to Title::newFromText() only applies if
a namespace prefix isn't included in the text. So if a username was
"Help:FooBar", the NS_USER prefix would not be applied.
Instead use Title::makeTitleSafe( NS_USER, ... ); which was designed for
this specific purpose.
Change-Id: Iafce73d352887947e61ae7c906ddf965e04fbf6f
---
M includes/specials/pagers/ImageListPager.php
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Umherirrender: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/pagers/ImageListPager.php
b/includes/specials/pagers/ImageListPager.php
index 48f60ca..258ac83 100644
--- a/includes/specials/pagers/ImageListPager.php
+++ b/includes/specials/pagers/ImageListPager.php
@@ -54,7 +54,7 @@
$this->mShowAll = $showAll;
if ( $userName !== null && $userName !== '' ) {
- $nt = Title::newFromText( $userName, NS_USER );
+ $nt = Title::makeTitleSafe( NS_USER, $userName );
if ( is_null( $nt ) ) {
$this->outputUserDoesNotExist( $userName );
} else {
--
To view, visit https://gerrit.wikimedia.org/r/281732
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iafce73d352887947e61ae7c906ddf965e04fbf6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits