Merge "diff: Remove unneeded false check"

This commit is contained in:
jenkins-bot 2020-06-24 09:29:25 +00:00 committed by Gerrit Code Review
commit 1dd24c56e8

View file

@ -1235,16 +1235,14 @@ class DifferenceEngine extends ContextSource {
// Save to cache for 7 days
if ( !$this->hookRunner->onAbortDiffCache( $this ) ) {
$stats->updateCount( 'diff_cache.uncacheable', 1 );
} elseif ( $key !== false && $difftext !== false ) {
} elseif ( $key !== false ) {
$stats->updateCount( 'diff_cache.miss', 1 );
$cache->set( $key, $difftext, 7 * 86400 );
} else {
$stats->updateCount( 'diff_cache.uncacheable', 1 );
}
// localise line numbers and title attribute text
if ( $difftext !== false ) {
$difftext = $this->localiseDiff( $difftext );
}
$difftext = $this->localiseDiff( $difftext );
return $difftext;
}