summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialWantedcategories.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-07-28 11:52:48 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-07-28 11:52:48 +0200
commit222b01f5169f1c7e69762e0e8904c24f78f71882 (patch)
tree8e932e12546bb991357ec48eb1638d1770be7a35 /includes/specials/SpecialWantedcategories.php
parent00ab76a6b686e98a914afc1975812d2b1aaa7016 (diff)
update to MediaWiki 1.16.0
Diffstat (limited to 'includes/specials/SpecialWantedcategories.php')
-rw-r--r--includes/specials/SpecialWantedcategories.php39
1 files changed, 10 insertions, 29 deletions
diff --git a/includes/specials/SpecialWantedcategories.php b/includes/specials/SpecialWantedcategories.php
index 7497f9be..5e5a4f17 100644
--- a/includes/specials/SpecialWantedcategories.php
+++ b/includes/specials/SpecialWantedcategories.php
@@ -13,20 +13,12 @@
* @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
-class WantedCategoriesPage extends QueryPage {
+class WantedCategoriesPage extends WantedQueryPage {
function getName() {
return 'Wantedcategories';
}
- function isExpensive() {
- return true;
- }
-
- function isSyndicated() {
- return false;
- }
-
function getSQL() {
$dbr = wfGetDB( DB_SLAVE );
list( $categorylinks, $page ) = $dbr->tableNamesN( 'categorylinks', 'page' );
@@ -45,32 +37,21 @@ class WantedCategoriesPage extends QueryPage {
";
}
- function sortDescending() { return true; }
-
- /**
- * Fetch user page links and cache their existence
- */
- function preprocessResults( $db, $res ) {
- $batch = new LinkBatch;
- while ( $row = $db->fetchObject( $res ) )
- $batch->add( $row->namespace, $row->title );
- $batch->execute();
-
- // Back to start for display
- if ( $db->numRows( $res ) > 0 )
- // If there are no rows we get an error seeking.
- $db->dataSeek( $res, 0 );
- }
-
function formatResult( $skin, $result ) {
global $wgLang, $wgContLang;
$nt = Title::makeTitle( $result->namespace, $result->title );
- $text = $wgContLang->convert( $nt->getText() );
+ $text = htmlspecialchars( $wgContLang->convert( $nt->getText() ) );
$plink = $this->isCached() ?
- $skin->makeLinkObj( $nt, htmlspecialchars( $text ) ) :
- $skin->makeBrokenLinkObj( $nt, htmlspecialchars( $text ) );
+ $skin->link( $nt, $text ) :
+ $skin->link(
+ $nt,
+ $text,
+ array(),
+ array(),
+ array( 'broken' )
+ );
$nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'),
$wgLang->formatNum( $result->value ) );