Aaron Schulz has submitted this change and it was merged.

Change subject: Avoid double-parse on edit regression due to content handler
......................................................................


Avoid double-parse on edit regression due to content handler

Change-Id: Iba40d8d7cb5700580e504a9b1b8359e4a62fb8cf
---
M backend/FlaggedRevs.class.php
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Aaron Schulz: Verified
  Chad: Looks good to me, approved



diff --git a/backend/FlaggedRevs.class.php b/backend/FlaggedRevs.class.php
index dce7b1d..e4e45d1 100644
--- a/backend/FlaggedRevs.class.php
+++ b/backend/FlaggedRevs.class.php
@@ -946,9 +946,10 @@
                # Get review property flags
                $propFlags = $auto ? array( 'auto' ) : array();
 
-               # Rev ID is not put into parser on edit, so do the same here.
-               # Also, a second parse would be triggered otherwise.
-               $editInfo = $article->prepareTextForEdit( $rev->getText() );
+               # Note: this needs to match the prepareContentForEdit() call 
WikiPage::doEditContent.
+               # This is for consistency and also to avoid triggering a second 
parse otherwise.
+               $editInfo = $article->prepareContentForEdit(
+                       $rev->getContent(), null, $user, 
$rev->getContentFormat() );
                $poutput  = $editInfo->output; // revision HTML output
 
                # Get the "review time" versions of templates and files.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba40d8d7cb5700580e504a9b1b8359e4a62fb8cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>

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

Reply via email to