Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -61,12 +61,21 @@ |
62 | 62 | |
63 | 63 | public function view() { |
64 | 64 | global $wgOut, $wgShowEXIF, $wgRequest, $wgUser; |
| 65 | + |
| 66 | + $diff = $wgRequest->getVal( 'diff' ); |
| 67 | + $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) ); |
| 68 | + |
| 69 | + if ( $this->mTitle->getNamespace() != NS_FILE || ( isset( $diff ) && $diffOnly ) ) { |
| 70 | + return Article::view(); |
| 71 | + } |
| 72 | + |
65 | 73 | $this->loadFile(); |
66 | 74 | |
67 | 75 | if ( $this->mTitle->getNamespace() == NS_FILE && $this->img->getRedirected() ) { |
68 | | - if ( $this->mTitle->getDBkey() == $this->img->getName() ) { |
| 76 | + if ( $this->mTitle->getDBkey() == $this->img->getName() || isset( $diff ) ) { |
69 | 77 | // mTitle is the same as the redirect target so ask Article |
70 | 78 | // to perform the redirect for us. |
| 79 | + $wgRequest->setVal( 'diffonly', 'true' ); |
71 | 80 | return Article::view(); |
72 | 81 | } else { |
73 | 82 | // mTitle is not the same as the redirect target so it is |
— | — | @@ -79,12 +88,6 @@ |
80 | 89 | } |
81 | 90 | } |
82 | 91 | |
83 | | - $diff = $wgRequest->getVal( 'diff' ); |
84 | | - $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) ); |
85 | | - |
86 | | - if ( $this->mTitle->getNamespace() != NS_FILE || ( isset( $diff ) && $diffOnly ) ) |
87 | | - return Article::view(); |
88 | | - |
89 | 92 | $this->showRedirectedFromHeader(); |
90 | 93 | |
91 | 94 | if ( $wgShowEXIF && $this->displayImg->exists() ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -213,6 +213,7 @@ |
214 | 214 | * (bug 23834) Invalid "thumbwidth" and "thumbheight" in "imageinfo" query when |
215 | 215 | thumbnailing larger than original image |
216 | 216 | * (bug 23835) Need "thumbmime" result in "imageinfo" query |
| 217 | +* (bug 23851) Repair diff for file redirect pages |
217 | 218 | |
218 | 219 | === Languages updated in 1.17 === |
219 | 220 | |