Nischayn22 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/58285
Change subject: Threads moved to a watched page don't trigger notif.
......................................................................
Threads moved to a watched page don't trigger notif.
The page moving is a bit confusing in lqt. when moving a page
the Message Controller is now invoked two times, once for the target
page(this change) and once for the old page.
If a user is watching both pages he will get notified twice.
Bug: 30698
Change-Id: Id9fb014ef20b42a3aae608fc31a12036888859c3
---
M classes/Thread.php
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiquidThreads
refs/changes/85/58285/1
diff --git a/classes/Thread.php b/classes/Thread.php
index 640799b..d2a04ce 100644
--- a/classes/Thread.php
+++ b/classes/Thread.php
@@ -378,6 +378,8 @@
}
function moveToPage( $title, $reason, $leave_trace ) {
+ global $wgUser;
+
if ( !$this->isTopmostThread() )
throw new MWException( "Attempt to move non-toplevel
thread to another page" );
@@ -417,6 +419,9 @@
$this->commitRevision( Threads::CHANGE_MOVED_TALKPAGE, null,
$reason );
+ // Notifications
+ NewMessages::writeMessageStateForUpdatedThread( $this,
$this->type, $wgUser );
+
if ( $leave_trace ) {
$this->leaveTrace( $reason, $oldTitle, $newTitle );
}
--
To view, visit https://gerrit.wikimedia.org/r/58285
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9fb014ef20b42a3aae608fc31a12036888859c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits