Index: trunk/extensions/FlaggedRevs/backend/FlaggedRevs.hooks.php |
— | — | @@ -193,7 +193,7 @@ |
194 | 194 | $title = Title::makeTitle( NS_FILE, $title->getDBkey() ); |
195 | 195 | $title->resetArticleId( $title->getArticleId() ); // avoid extra queries |
196 | 196 | } |
197 | | - $time = $sha1 = false; // current version |
| 197 | + $time = $sha1 = false; // unspecified (defaults to current version) |
198 | 198 | # Check for the version of this file used when reviewed... |
199 | 199 | list( $maybeTS, $maybeSha1 ) = $incManager->getReviewedFileVersion( $title ); |
200 | 200 | if ( $maybeTS !== null ) { |
— | — | @@ -209,15 +209,17 @@ |
210 | 210 | $sha1 = $maybeSha1; |
211 | 211 | } |
212 | 212 | } |
213 | | - # Stabilize the file link |
214 | | - if ( $time ) { |
215 | | - if ( $query != '' ) $query .= '&'; |
216 | | - $query = "filetimestamp=" . urlencode( wfTimestamp( TS_MW, $time ) ); |
217 | | - } |
218 | | - $options['time'] = $time; |
219 | | - $options['sha1'] = $sha1; |
| 213 | + # Tell Parser what file version to use |
220 | 214 | if ( $time === '0' ) { |
221 | 215 | $options['broken'] = true; |
| 216 | + } elseif ( $time !== false ) { |
| 217 | + $options['time'] = $time; |
| 218 | + $options['sha1'] = $sha1; |
| 219 | + # Stabilize the file link |
| 220 | + if ( $query != '' ) { |
| 221 | + $query .= '&'; |
| 222 | + } |
| 223 | + $query .= "filetimestamp=" . urlencode( wfTimestamp( TS_MW, $time ) ); |
222 | 224 | } |
223 | 225 | |
224 | 226 | return true; |