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

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(-)

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



diff --git a/api/ApiThreadAction.php b/api/ApiThreadAction.php
index 4a88865..50d4e99 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: merged
Gerrit-Change-Id: I82c4ce875aebec5493348e0d65e1ffdf3dcdd696
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: Martineznovo <[email protected]>
Gerrit-Reviewer: Matmarex <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to