From: daniel Date: Mon, 10 Sep 2018 19:02:26 +0000 (+0200) Subject: Don't show unsaved revision in DifferenceEngine::renderNewRevision. X-Git-Tag: 1.34.0-rc.0~4029 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=4461aa6e4fb13d4ad6c9e68e932319c47462fab1;p=lhc%2Fweb%2Fwiklou.git Don't show unsaved revision in DifferenceEngine::renderNewRevision. There was a conditional that was documented to make the method bail out if the current revision was unsaved, but it was missing the actual return statement. Note that preview code in EditPage does not use DifferenceEngine::renderNewRevision. Change-Id: I86a25e9464435ac17c72f78f7ce1f354adf3d055 --- diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 387e9e3c18..9602bd20d5 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -848,6 +848,7 @@ class DifferenceEngine extends ContextSource { // New revision is unsaved; bail out. // TODO in theory rendering the new revision is a meaningful thing to do // even if it's unsaved, but a lot of untangling is required to do it safely. + return; } $out->setRevisionId( $this->mNewid );