Page MenuHomePhabricator

Force-blue-link-categories.patch

Authored By
bzimport
Nov 21 2014, 9:28 PM
Size
980 B
Referenced Files
None
Subscribers
None

Force-blue-link-categories.patch

Index: OutputPage.php
===================================================================
--- OutputPage.php (revision 17585)
+++ OutputPage.php (working copy)
@@ -232,21 +232,13 @@
*/
public function addCategoryLinks($categories) {
global $wgUser, $wgContLang;
-
- if ( !is_array( $categories ) ) {
+ if( !is_array( $categories ) )
return;
- }
- # Add the links to the link cache in a batch
- $arr = array( NS_CATEGORY => $categories );
- $lb = new LinkBatch;
- $lb->setArray( $arr );
- $lb->execute();
-
- $sk =& $wgUser->getSkin();
- foreach ( $categories as $category => $arbitrary ) {
+
+ $skin =& $wgUser->getSkin();
+ foreach( $categories as $category => $x ) {
$title = Title::makeTitleSafe( NS_CATEGORY, $category );
- $text = $wgContLang->convertHtml( $title->getText() );
- $this->mCategoryLinks[] = $sk->makeLinkObj( $title, $text );
+ $this->mCategoryLinks[] = $skin->makeKnownLinkObj( $title, $title->getText() );
}
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2966
Default Alt Text
Force-blue-link-categories.patch (980 B)

Event Timeline