Index: branches/wmf/1.18wmf1/extensions/FlaggedRevs/dataclasses/FlaggedRevs.class.php |
— | — | @@ -963,10 +963,10 @@ |
964 | 964 | # If this is an image page, store corresponding file info |
965 | 965 | $fileData = array( 'name' => null, 'timestamp' => null, 'sha1' => null ); |
966 | 966 | if ( $title->getNamespace() == NS_FILE ) { |
967 | | - # We must use ImagePage process cache on upload or get bitten by slave lag |
968 | | - $file = $article instanceof ImagePage |
969 | | - ? $article->getFile() |
970 | | - : wfFindFile( $title ); |
| 967 | + # We must use WikiFilePage process cache on upload or get bitten by slave lag |
| 968 | + $file = ( $article instanceof WikiFilePage || $article instanceof ImagePage ) |
| 969 | + ? $article->getFile() // uses up-to-date process cache on new uploads |
| 970 | + : wfFindFile( $title, array( 'bypassCache' => true ) ); // skip cache; bug 31056 |
971 | 971 | if ( is_object( $file ) && $file->exists() ) { |
972 | 972 | $fileData['name'] = $title->getDBkey(); |
973 | 973 | $fileData['timestamp'] = $file->getTimestamp(); |