diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /includes/specials/SpecialMostlinked.php | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
Update to MediaWiki 1.20.2
this update includes:
* adjusted Arch Linux skin
* updated FluxBBAuthPlugin
* patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'includes/specials/SpecialMostlinked.php')
-rw-r--r-- | includes/specials/SpecialMostlinked.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/includes/specials/SpecialMostlinked.php b/includes/specials/SpecialMostlinked.php index a16f0872..89c43509 100644 --- a/includes/specials/SpecialMostlinked.php +++ b/includes/specials/SpecialMostlinked.php @@ -42,13 +42,13 @@ class MostlinkedPage extends QueryPage { function getQueryInfo() { return array ( 'tables' => array ( 'pagelinks', 'page' ), - 'fields' => array ( 'pl_namespace AS namespace', - 'pl_title AS title', - 'COUNT(*) AS value', + 'fields' => array ( 'namespace' => 'pl_namespace', + 'title' => 'pl_title', + 'value' => 'COUNT(*)', 'page_namespace' ), 'options' => array ( 'HAVING' => 'COUNT(*) > 1', - 'GROUP BY' => 'pl_namespace, pl_title, '. - 'page_namespace' ), + 'GROUP BY' => array( 'pl_namespace', 'pl_title', + 'page_namespace' ) ), 'join_conds' => array ( 'page' => array ( 'LEFT JOIN', array ( 'page_namespace = pl_namespace', 'page_title = pl_title' ) ) ) @@ -62,12 +62,12 @@ class MostlinkedPage extends QueryPage { * @param $res */ function preprocessResults( $db, $res ) { - if( $db->numRows( $res ) > 0 ) { + if ( $res->numRows() > 0 ) { $linkBatch = new LinkBatch(); foreach ( $res as $row ) { $linkBatch->add( $row->namespace, $row->title ); } - $db->dataSeek( $res, 0 ); + $res->seek( 0 ); $linkBatch->execute(); } } @@ -94,7 +94,8 @@ class MostlinkedPage extends QueryPage { function formatResult( $skin, $result ) { $title = Title::makeTitleSafe( $result->namespace, $result->title ); if ( !$title ) { - return '<!-- ' . htmlspecialchars( "Invalid title: [[$title]]" ) . ' -->'; + return Html::element( 'span', array( 'class' => 'mw-invalidtitle' ), + Linker::getInvalidTitleDescription( $this->getContext(), $result->namespace, $result->title ) ); } $link = Linker::link( $title ); $wlh = $this->makeWlhLink( $title, |