Index: trunk/extensions/FlaggedRevs/dataclasses/FlaggedRevs.class.php |
— | — | @@ -972,10 +972,11 @@ |
973 | 973 | # If this is an image page, store corresponding file info |
974 | 974 | $fileData = array( 'name' => null, 'timestamp' => null, 'sha1' => null ); |
975 | 975 | if ( $title->getNamespace() == NS_FILE ) { |
976 | | - # We must use ImagePage process cache on upload or get bitten by slave lag |
977 | | - $file = $article instanceof ImagePage |
978 | | - ? $article->getFile() |
979 | | - : wfFindFile( $title ); |
| 976 | + # We must use WikiFilePage process cache on upload or get bitten by slave lag |
| 977 | + $file = ( $article instanceof WikiFilePage || $article instanceof ImagePage ) |
| 978 | + ? $article->getFile() // uses up-to-date process cache on new uploads |
| 979 | + : wfFindFile( $title, array( 'bypassCache' => true ) ); // skip cache; bug 31056 |
| 980 | + #var_dump( $title ); var_dump( $file ); moo(); |
980 | 981 | if ( is_object( $file ) && $file->exists() ) { |
981 | 982 | $fileData['name'] = $title->getDBkey(); |
982 | 983 | $fileData['timestamp'] = $file->getTimestamp(); |