Index: trunk/extensions/SiteMatrix/SiteMatrix_body.php |
— | — | @@ -255,7 +255,7 @@ |
256 | 256 | * @static |
257 | 257 | * @param ApiQuerySiteinfo $module |
258 | 258 | * @param array $results |
259 | | - * @return void |
| 259 | + * @return bool |
260 | 260 | */ |
261 | 261 | public static function APIQuerySiteInfoGeneralInfo( $module, &$results ) { |
262 | 262 | global $wgDBname, $wgConf; |
— | — | @@ -357,13 +357,21 @@ |
358 | 358 | } |
359 | 359 | |
360 | 360 | # Total |
361 | | - $s .= '<tr style="font-weight: bold"><th><a id="total" name="total"></a>' . wfMsgHtml( 'sitematrix-sitetotal' ) . '</th>'; |
| 361 | + $totalCount = 0; |
| 362 | + $s .= '<tr style="font-weight: bold"><th rowspan="2"><a id="total" name="total"></a>' . wfMsgHtml( 'sitematrix-sitetotal' ) . '</th>'; |
362 | 363 | foreach( $matrix->getNames() as $site => $name ) { |
363 | 364 | $url = $matrix->getSiteUrl( $site ); |
364 | 365 | $count = $matrix->getCountPerSite( $site ); |
| 366 | + $totalCount += $count; |
365 | 367 | $s .= "<th><a href=\"{$url}\">{$count}</a></th>"; |
366 | 368 | } |
367 | 369 | $s .= '</tr>'; |
| 370 | + |
| 371 | + $s .= '<tr style="font-weight: bold">'; |
| 372 | + $noProjects = count( $matrix->getNames() ); |
| 373 | + $s .= "<th colspan=\"{$noProjects }\">{$totalCount}</th>"; |
| 374 | + $s .= '</tr>'; |
| 375 | + |
368 | 376 | $s .= Xml::closeElement( 'table' ) . "\n"; |
369 | 377 | |
370 | 378 | # Specials |