if ( $title->inNamespace( NS_CATEGORY ) ) {
$category = Category::newFromTitle( $title );
+
+ // $allCount is the total number of cat members,
+ // not the count of how many members are normal pages.
+ $allCount = (int)$category->getPageCount();
+ $subcatCount = (int)$category->getSubcatCount();
+ $fileCount = (int)$category->getFileCount();
+ $pagesCount = $allCount - $subcatCount - $fileCount;
+
$pageInfo['category-info'] = array(
+ array(
+ $this->msg( 'pageinfo-category-total' ),
+ $lang->formatNum( $allCount )
+ ),
array(
$this->msg( 'pageinfo-category-pages' ),
- $lang->formatNum( $category->getPageCount() )
+ $lang->formatNum( $pagesCount )
),
array(
$this->msg( 'pageinfo-category-subcats' ),
- $lang->formatNum( $category->getSubcatCount() )
+ $lang->formatNum( $subcatCount )
),
array(
$this->msg( 'pageinfo-category-files' ),
- $lang->formatNum( $category->getFileCount() )
+ $lang->formatNum( $fileCount )
)
);
}
"pageinfo-protect-cascading-yes": "Yes",
"pageinfo-protect-cascading-from": "Protections are cascading from",
"pageinfo-category-info": "Category information",
+ "pageinfo-category-total": "Total number of members",
"pageinfo-category-pages": "Number of pages",
"pageinfo-category-subcats": "Number of subcategories",
"pageinfo-category-files": "Number of files",
"pageinfo-protect-cascading-yes": "Yes, protections are cascading from here\n*{{msg-mw|Pageinfo-protect-cascading}}\n*{{msg-mw|Pageinfo-protect-cascading-yes}}\n{{Identical|Yes}}",
"pageinfo-protect-cascading-from": "Key for a list of pages where protections are cascading from",
"pageinfo-category-info": "Showed on the page displaying information about the current page (add \"?action=info\" to the URL)",
+ "pageinfo-category-total": "See also:\n* {{msg-mw|Pageinfo-category-pages}}\n* {{msg-mw|Pageinfo-category-subcats}}\n* {{msg-mw|Pageinfo-category-files}}",
"pageinfo-category-pages": "See also:\n* {{msg-mw|Pageinfo-category-subcats}}\n* {{msg-mw|Pageinfo-category-files}}\n{{Identical|Number of pages}}",
"pageinfo-category-subcats": "See also:\n* {{msg-mw|Pageinfo-category-pages}}\n* {{msg-mw|Pageinfo-category-files}}",
"pageinfo-category-files": "See also:\n* {{msg-mw|Pageinfo-category-pages}}\n* {{msg-mw|Pageinfo-category-subcats}}",