From: Alexandre Emsenhuber Date: Thu, 25 Jul 2013 15:34:20 +0000 (+0200) Subject: Show the revision ID on error message when content is missing on difference page X-Git-Tag: 1.31.0-rc.0~18752^2 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=ea8ac38e45307d667b8243f68772394889d1d8b0;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 3ff5c986cb..97b5b700b2 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -185,10 +185,14 @@ class DifferenceEngine extends ContextSource { $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 ); }