37 parent::__construct( $name );
42 'tables' => [
'categorylinks',
'page' ],
48 'conds' => [
'page_title IS NULL' ],
49 'options' => [
'GROUP BY' =>
'cl_to' ],
50 'join_conds' => [
'page' => [
'LEFT JOIN',
51 [
'page_title = cl_to',
57 parent::preprocessResults( $db,
$res );
59 $this->currentCategoryCounts = [];
69 foreach (
$res as $row ) {
70 $allCategories[] = $row->title;
73 $categoryRes = $db->select(
75 [
'cat_title',
'cat_pages' ],
76 [
'cat_title' => $allCategories ],
79 foreach ( $categoryRes as $row ) {
80 $this->currentCategoryCounts[$row->cat_title] = intval( $row->cat_pages );
94 $text =
new HtmlArmor( MediaWikiServices::getInstance()->getContentLanguage()
95 ->convert( htmlspecialchars( $nt->getText() ) ) );
103 $nlinks = $this->
msg(
'nmembers' )->numParams( $result->value )->escaped();
107 $currentValue = $this->currentCategoryCounts[$result->title] ?? 0;
108 $cachedValue = intval( $result->value );
111 if ( $nt->isKnown() || $currentValue === 0 ) {
112 $plink =
"<del>$plink</del>";
116 if ( $currentValue !== $cachedValue ) {
117 $nlinks = $this->
msg(
'nmemberschanged' )
118 ->numParams( $cachedValue, $currentValue )->escaped();
120 $nlinks = $this->
msg(
'nmembers' )->numParams( $cachedValue )->escaped();
124 return $this->
getLanguage()->specialList( $plink, $nlinks );
128 return 'maintenance';