Index: trunk/phase3/includes/CategoryPage.php |
— | — | @@ -177,14 +177,16 @@ |
178 | 178 | function addSubcategoryObject( Category $cat, $sortkey, $pageLength ) { |
179 | 179 | // Subcategory; strip the 'Category' namespace from the link text. |
180 | 180 | $title = $cat->getTitle(); |
181 | | - $this->children[] = $this->getSkin()->link( |
182 | | - $title, |
183 | | - $title->getText(), |
184 | | - array(), |
185 | | - array(), |
186 | | - array( 'known', 'noclasses' ) |
187 | | - ); |
188 | 181 | |
| 182 | + $link = $this->getSkin()->link( $title, $title->getText() ); |
| 183 | + if ( $title->isRedirect() ) { |
| 184 | + // This didn't used to add redirect-in-category, but might |
| 185 | + // as well be consistent with the rest of the sections |
| 186 | + // on a category page. |
| 187 | + $link = '<span class="redirect-in-category">' . $link . '</span>'; |
| 188 | + } |
| 189 | + $this->children[] = $link; |
| 190 | + |
189 | 191 | $this->children_start_char[] = |
190 | 192 | $this->getSubcategorySortChar( $cat->getTitle(), $sortkey ); |
191 | 193 | } |
— | — | @@ -231,16 +233,13 @@ |
232 | 234 | $this->gallery->add( $title ); |
233 | 235 | } |
234 | 236 | } else { |
235 | | - $this->imgsNoGallery[] = $isRedirect |
236 | | - ? '<span class="redirect-in-category">' . |
237 | | - $this->getSkin()->link( |
238 | | - $title, |
239 | | - null, |
240 | | - array(), |
241 | | - array(), |
242 | | - array( 'known', 'noclasses' ) |
243 | | - ) . '</span>' |
244 | | - : $this->getSkin()->link( $title ); |
| 237 | + $link = $this->getSkin()->link( $title ); |
| 238 | + if ( $isRedirect ) { |
| 239 | + // This seems kind of pointless given 'mw-redirect' class, |
| 240 | + // but keeping for back-compatibility with user css. |
| 241 | + $link = '<span class="redirect-in-category">' . $link . '</span>'; |
| 242 | + } |
| 243 | + $this->imgsNoGallery[] = $link; |
245 | 244 | |
246 | 245 | $this->imgsNoGallery_start_char[] = $wgContLang->convert( |
247 | 246 | $this->collation->getFirstLetter( $sortkey ) ); |
— | — | @@ -252,17 +251,15 @@ |
253 | 252 | */ |
254 | 253 | function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) { |
255 | 254 | global $wgContLang; |
256 | | - $this->articles[] = $isRedirect |
257 | | - ? '<span class="redirect-in-category">' . |
258 | | - $this->getSkin()->link( |
259 | | - $title, |
260 | | - null, |
261 | | - array(), |
262 | | - array(), |
263 | | - array( 'known', 'noclasses' ) |
264 | | - ) . '</span>' |
265 | | - : $this->getSkin()->link( $title ); |
266 | 255 | |
| 256 | + $link = $this->getSkin()->link( $title ); |
| 257 | + if ( $isRedirect ) { |
| 258 | + // This seems kind of pointless given 'mw-redirect' class, |
| 259 | + // but keeping for back-compatiability with user css. |
| 260 | + $link = '<span class="redirect-in-category">' . $link . '</span>'; |
| 261 | + } |
| 262 | + $this->articles[] = $link; |
| 263 | + |
267 | 264 | $this->articles_start_char[] = $wgContLang->convert( |
268 | 265 | $this->collation->getFirstLetter( $sortkey ) ); |
269 | 266 | } |