Index: trunk/extensions/IndexFunction/IndexFunction_body.php |
— | — | @@ -132,17 +132,12 @@ |
133 | 133 | if ( !$index ) { |
134 | 134 | return true; |
135 | 135 | } elseif ( $index->useSpecialPage() ) { |
136 | | - global $wgOut; |
137 | | - |
138 | 136 | $title = SpecialPage::getTitleFor( 'Index', $title->getPrefixedText() ); |
139 | | - $wgOut->redirect( $title->getLocalURL() ); |
140 | | - |
141 | | - return true; |
| 137 | + } else { |
| 138 | + $targets = $index->getTargets(); |
| 139 | + $title = $targets[0]; |
142 | 140 | } |
143 | 141 | |
144 | | - $targets = $index->getTargets(); |
145 | | - $title = $targets[0]; |
146 | | - |
147 | 142 | return false; |
148 | 143 | } |
149 | 144 | |
— | — | @@ -157,17 +152,13 @@ |
158 | 153 | if ( !$index ) { |
159 | 154 | return true; |
160 | 155 | } elseif ( $index->useSpecialPage() ) { |
161 | | - global $wgOut; |
162 | | - |
163 | | - $t = SpecialPage::getTitleFor( 'Index', $title->getPrefixedText() ); |
164 | | - $wgOut->redirect( $t->getLocalURL() ); |
165 | | - |
166 | | - return true; |
| 156 | + $target = SpecialPage::getTitleFor( 'Index', $title->getPrefixedText() ); |
| 157 | + $target = $t->getFullURL(); |
| 158 | + } else { |
| 159 | + $targets = $index->getTargets(); |
| 160 | + $target = $targets[0]; |
167 | 161 | } |
168 | 162 | |
169 | | - $targets = $index->getTargets(); |
170 | | - $target = $targets[0]; |
171 | | - $article->mIsRedirect = true; |
172 | 163 | $ignoreRedirect = false; |
173 | 164 | |
174 | 165 | return true; |