Alex Monk has uploaded a new change for review.
https://gerrit.wikimedia.org/r/67558
Change subject: Don't record changes to subjects if there's no real change
......................................................................
Don't record changes to subjects if there's no real change
Bug: 49311
Change-Id: I82c4ce875aebec5493348e0d65e1ffdf3dcdd696
---
M api/ApiThreadAction.php
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiquidThreads
refs/changes/58/67558/1
diff --git a/api/ApiThreadAction.php b/api/ApiThreadAction.php
index 4a88865..edd0553 100644
--- a/api/ApiThreadAction.php
+++ b/api/ApiThreadAction.php
@@ -647,8 +647,10 @@
$reason = $params['reason'];
}
- $thread->setSubject( $subject );
- $thread->commitRevision( Threads::CHANGE_EDITED_SUBJECT,
$thread, $reason );
+ if ( $thread->dbVersion->subject() != $subject ) {
+ $thread->setSubject( $subject );
+ $thread->commitRevision(
Threads::CHANGE_EDITED_SUBJECT, $thread, $reason );
+ }
$result = array(
'action' => 'setsubject',
--
To view, visit https://gerrit.wikimedia.org/r/67558
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I82c4ce875aebec5493348e0d65e1ffdf3dcdd696
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits