Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1204
patch146.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 6:42 PM
2014-11-21 18:42:48 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
patch146.diff
View Options
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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1115
Default Alt Text
patch146.diff (1 KB)
Attached To
Mode
T2146: Special:Categories : Show the number of articles in the category
Attached
Detach File
Event Timeline
Log In to Comment