Page MenuHomePhabricator

patch146.diff

Authored By
bzimport
Nov 21 2014, 6:42 PM
Size
1 KB
Referenced Files
None
Subscribers
None

patch146.diff

Index: includes/SpecialCategories.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/SpecialCategories.php,v
retrieving revision 1.18
diff -u -r1.18 SpecialCategories.php
--- includes/SpecialCategories.php 12 Sep 2005 20:28:24 -0000 1.18
+++ includes/SpecialCategories.php 24 Nov 2005 02:50:23 -0000
@@ -34,11 +34,14 @@
$NScat = NS_CATEGORY;
$dbr =& wfGetDB( DB_SLAVE );
$categorylinks = $dbr->tableName( 'categorylinks' );
- return "SELECT DISTINCT 'Categories' as type,
+ $s= "SELECT 'Categories' as type,
{$NScat} as namespace,
cl_to as title,
- 1 as value
- FROM $categorylinks";
+ 1 as value,
+ COUNT(*) as count
+ FROM $categorylinks
+ GROUP BY cl_to";
+ return $s;
}
function sortDescending() {
@@ -48,7 +51,9 @@
function formatResult( $skin, $result ) {
global $wgLang;
$title = Title::makeTitle( NS_CATEGORY, $result->title );
- return $skin->makeLinkObj( $title, $title->getText() );
+ $plink = $skin->makeLinkObj( $title, $title->getText() );
+ $nlinks = wfMsg( 'nlinks', $result->count );
+ return "$plink ($nlinks)";
}
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1115
Default Alt Text
patch146.diff (1 KB)

Event Timeline