Catrope has uploaded a new change for review.
https://gerrit.wikimedia.org/r/277682
Change subject: Fix brokenness in FlowPresentationModel::isUserTalkPage()
......................................................................
Fix brokenness in FlowPresentationModel::isUserTalkPage()
It had false positives on page names like Talk:USERNAME
because it didn't check the namespace, and it had false
negatives on user names with spaces in them because
it compared DB keys (which use underscores) with user names
(which use spaces).
Change-Id: I37d6c21c863d9e5f3f0376a80fc406d282eee788
---
M includes/Notifications/FlowPresentationModel.php
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/82/277682/1
diff --git a/includes/Notifications/FlowPresentationModel.php
b/includes/Notifications/FlowPresentationModel.php
index c79db7a..466dde0 100644
--- a/includes/Notifications/FlowPresentationModel.php
+++ b/includes/Notifications/FlowPresentationModel.php
@@ -145,7 +145,10 @@
}
protected function isUserTalkPage() {
+ // Would like to do $this->event->getTitle()->equals(
$this->user->getTalkPage() )
+ // but $this->user is private in the parent class
$username = $this->getViewingUserForGender();
- return $this->event->getTitle()->getDBkey() === $username;
+ return $this->event->getTitle()->getNamespace() ===
NS_USER_TALK &&
+ $this->event->getTitle()->getPrefixedText() ===
$username;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/277682
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I37d6c21c863d9e5f3f0376a80fc406d282eee788
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits