function getQueryInfo() {
return array(
'tables' => array( 'categorylinks', 'page' ),
- 'fields' => array( 'namespace' => NS_CATEGORY,
- 'title' => 'cl_to',
- 'value' => 'COUNT(*)' ),
+ 'fields' => array(
+ 'namespace' => NS_CATEGORY,
+ 'title' => 'cl_to',
+ 'value' => 'COUNT(*)'
+ ),
'conds' => array( 'page_title IS NULL' ),
'options' => array( 'GROUP BY' => 'cl_to' ),
'join_conds' => array( 'page' => array( 'LEFT JOIN',
__METHOD__
);
foreach ( $categoryRes as $row ) {
- $this->currentCategoryCounts[ $row->cat_title ] = intval( $row->cat_pages );
+ $this->currentCategoryCounts[$row->cat_title] = intval( $row->cat_pages );
}
// Back to start for display
} else {
$plink = Linker::link( $nt, $text );
- $currentValue = isset( $this->currentCategoryCounts[ $result->title ] )
- ? $this->currentCategoryCounts[ $result->title ]
+ $currentValue = isset( $this->currentCategoryCounts[$result->title] )
+ ? $this->currentCategoryCounts[$result->title]
: 0;
+ $cachedValue = intval( $result->value ); // T76910
// If the category has been created or emptied since the list was refreshed, strike it
if ( $nt->isKnown() || $currentValue === 0 ) {
}
// Show the current number of category entries if it changed
- if ( $currentValue !== $result->value ) {
+ if ( $currentValue !== $cachedValue ) {
$nlinks = $this->msg( 'nmemberschanged' )
- ->numParams( $result->value, $currentValue )->escaped();
+ ->numParams( $cachedValue, $currentValue )->escaped();
} else {
- $nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
+ $nlinks = $this->msg( 'nmembers' )->numParams( $cachedValue )->escaped();
}
}