IAlex has uploaded a new change for review.
https://gerrit.wikimedia.org/r/75891
Change subject: Show the revision ID on error message when content is missing
on difference page
......................................................................
Show the revision ID on error message when content is missing on difference page
Currently if the revision exists but its content is not found, it will make
loadText() return false; which in turn will make a call to showMissingRevision()
from showDiff(). However since the revision exists; it will not match the
condition in showMissingRevision() and thus an error message will appear without
any revision ID.
Change-Id: Idd8a5f20a3c082a3b02bd77557e0f4dc4c66e876
---
M includes/diff/DifferenceEngine.php
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/91/75891/1
diff --git a/includes/diff/DifferenceEngine.php
b/includes/diff/DifferenceEngine.php
index b102bfc..dc2191f 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -185,10 +185,14 @@
$out = $this->getOutput();
$missing = array();
- if ( $this->mOldRev === null ) {
+ if ( $this->mOldRev === null ||
+ ( $this->mOldRev && $this->mOldContent === null )
+ ) {
$missing[] = $this->deletedIdMarker( $this->mOldid );
}
- if ( $this->mNewRev === null ) {
+ if ( $this->mNewRev === null ||
+ ( $this->mNewRev && $this->mNewContent === null )
+ ) {
$missing[] = $this->deletedIdMarker( $this->mNewid );
}
--
To view, visit https://gerrit.wikimedia.org/r/75891
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd8a5f20a3c082a3b02bd77557e0f4dc4c66e876
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits