r58662 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58661‎ | r58662 | r58663 >
Date:16:39, 6 November 2009
Author:werdna
Status:ok
Tags:
Comment:
Add links to globalusage
Modified paths:
  • /trunk/extensions/GlobalUsage/SpecialGlobalUsage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GlobalUsage/SpecialGlobalUsage.php
@@ -95,9 +95,13 @@
9696 */
9797 private function formatItem( $item ) {
9898 if ( !$item['namespace'] )
99 - return htmlspecialchars( $item['title'] );
 99+ $page = $item['title'];
100100 else
101 - return htmlspecialchars( "{$item['namespace']}:{$item['title']}" );
 101+ $page = "{$item['namespace']}:{$item['title']}";
 102+
 103+ $wiki = WikiMap::getWiki( $item['wiki'] );
 104+
 105+ return WikiMap::makeForeignLink( $item['wiki'], $page );
102106 }
103107
104108 }
@@ -187,7 +191,8 @@
188192 $this->result[$row->gil_wiki] = array();
189193 $this->result[$row->gil_wiki][] = array(
190194 'namespace' => $row->gil_page_namespace,
191 - 'title' => $row->gil_page_title
 195+ 'title' => $row->gil_page_title,
 196+ 'wiki' => $row->gil_wiki,
192197 );
193198 }
194199 }

Status & tagging log