@@ 336-341 (lines=6) @@ | ||
333 | $mPath = $this->substPaths( $path, $mBackend ); |
|
334 | $mSha1 = $mBackend->getFileSha1Base36( [ 'src' => $mPath, 'latest' => true ] ); |
|
335 | $mStat = $mBackend->getFileStat( [ 'src' => $mPath, 'latest' => true ] ); |
|
336 | if ( $mStat === null || ( $mSha1 !== false && !$mStat ) ) { // sanity |
|
337 | $status->fatal( 'backend-fail-internal', $this->name ); |
|
338 | wfDebugLog( 'FileOperation', __METHOD__ |
|
339 | . ': File is not available on the master backend' ); |
|
340 | continue; // file is not available on the master backend... |
|
341 | } |
|
342 | // Check of all clone backends agree with the master... |
|
343 | foreach ( $this->backends as $index => $cBackend ) { |
|
344 | if ( $index === $this->masterIndex ) { |
|
@@ 350-355 (lines=6) @@ | ||
347 | $cPath = $this->substPaths( $path, $cBackend ); |
|
348 | $cSha1 = $cBackend->getFileSha1Base36( [ 'src' => $cPath, 'latest' => true ] ); |
|
349 | $cStat = $cBackend->getFileStat( [ 'src' => $cPath, 'latest' => true ] ); |
|
350 | if ( $cStat === null || ( $cSha1 !== false && !$cStat ) ) { // sanity |
|
351 | $status->fatal( 'backend-fail-internal', $cBackend->getName() ); |
|
352 | wfDebugLog( 'FileOperation', __METHOD__ . |
|
353 | ': File is not available on the clone backend' ); |
|
354 | continue; // file is not available on the clone backend... |
|
355 | } |
|
356 | if ( $mSha1 === $cSha1 ) { |
|
357 | // already synced; nothing to do |
|
358 | } elseif ( $mSha1 !== false ) { // file is in master |