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

Change subject: (bug 48683) Use a correct way to get base titles
......................................................................


(bug 48683) Use a correct way to get base titles

Bug: 48683
Change-Id: I6d2fa44550361ebda12c602c487d6a38bff1c479
---
M WikiLove.hooks.php
1 file changed, 1 insertion(+), 4 deletions(-)

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



diff --git a/WikiLove.hooks.php b/WikiLove.hooks.php
index 4446d61..75a84d4 100644
--- a/WikiLove.hooks.php
+++ b/WikiLove.hooks.php
@@ -173,10 +173,7 @@
                }
 
                // If we're on a subpage, get the base page title
-               $baseTitle = Title::newFromText( $title->getBaseText(), $ns );
-               if ( $baseTitle === null ) {
-                       return wfMessage( 'wikilove-err-invalid-username' 
)->plain();
-               }
+               $baseTitle = $title->getBaseTitle();
 
                // Users can't send WikiLove to themselves
                if ( $wgUser->getName() === $baseTitle->getText() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d2fa44550361ebda12c602c487d6a38bff1c479
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/WikiLove
Gerrit-Branch: master
Gerrit-Owner: Liangent <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to