Compare commits
12 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
384fdfa2bf | ||
![]() |
7f40072416 | ||
![]() |
e00a3b1c57 | ||
![]() |
95976e0082 | ||
![]() |
00af3f2598 | ||
![]() |
2b415b36b5 | ||
![]() |
1cf9ae8247 | ||
![]() |
548a1f177c | ||
![]() |
645c945994 | ||
![]() |
4212d24b49 | ||
![]() |
7d145662fa | ||
![]() |
7cc5575eaa |
4 changed files with 2216 additions and 1530 deletions
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"require-dev": {
|
||||
"mediawiki/mediawiki-codesniffer": "40.0.1",
|
||||
"mediawiki/minus-x": "1.1.1",
|
||||
"mediawiki/mediawiki-codesniffer": "45.0.0",
|
||||
"mediawiki/minus-x": "1.1.3",
|
||||
"php-parallel-lint/php-console-highlighter": "1.0.0",
|
||||
"php-parallel-lint/php-parallel-lint": "1.3.2"
|
||||
"php-parallel-lint/php-parallel-lint": "1.4.0"
|
||||
},
|
||||
"scripts": {
|
||||
"fix": [
|
||||
|
@ -16,5 +16,10 @@
|
|||
"minus-x check ."
|
||||
],
|
||||
"phpcs": "phpcs -sp --cache"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
3702
package-lock.json
generated
3702
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -5,9 +5,9 @@
|
|||
"test": "grunt test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint-config-wikimedia": "0.22.1",
|
||||
"grunt": "1.5.3",
|
||||
"grunt-banana-checker": "0.10.0",
|
||||
"grunt-eslint": "24.0.0"
|
||||
"eslint-config-wikimedia": "0.28.2",
|
||||
"grunt": "1.6.1",
|
||||
"grunt-banana-checker": "0.13.0",
|
||||
"grunt-eslint": "24.3.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,8 @@ class ContributionScores extends IncludableSpecialPage {
|
|||
}
|
||||
|
||||
$user = User::newFromName( $usertext );
|
||||
$dbr = wfGetDB( DB_REPLICA );
|
||||
$loadBalancer = MediaWikiServices::getInstance()->getDBLoadBalancer();
|
||||
$dbr = $loadBalancer->getConnection( DB_REPLICA );
|
||||
|
||||
if ( $user instanceof User && $user->isRegistered() ) {
|
||||
global $wgLang;
|
||||
|
@ -90,7 +91,8 @@ class ContributionScores extends IncludableSpecialPage {
|
|||
global $wgContribScoreIgnoreBots, $wgContribScoreIgnoreBlockedUsers, $wgContribScoreIgnoreUsernames,
|
||||
$wgContribScoreUseRoughEditCount;
|
||||
|
||||
$dbr = wfGetDB( DB_REPLICA );
|
||||
$loadBalancer = MediaWikiServices::getInstance()->getDBLoadBalancer();
|
||||
$dbr = $loadBalancer->getConnection( DB_REPLICA );
|
||||
|
||||
$revQuery = ActorMigration::newMigration()->getJoin( 'rev_user' );
|
||||
$revQuery['tables'] = array_merge( [ 'revision' ], $revQuery['tables'] );
|
||||
|
@ -119,7 +121,21 @@ class ContributionScores extends IncludableSpecialPage {
|
|||
|
||||
if ( $wgContribScoreIgnoreBlockedUsers ) {
|
||||
$sqlWhere[] = "{$revUser} NOT IN " .
|
||||
$dbr->buildSelectSubquery( 'ipblocks', 'ipb_user', 'ipb_user <> 0', __METHOD__ );
|
||||
$dbr->buildSelectSubquery( [
|
||||
'block',
|
||||
'block_target'
|
||||
],
|
||||
'bt_user',
|
||||
'bt_user <> 0',
|
||||
__METHOD__,
|
||||
[],
|
||||
[
|
||||
'block_target' => [ 'JOIN', [
|
||||
'bl_target=bt_id'
|
||||
] ]
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
if ( $wgContribScoreIgnoreBots ) {
|
||||
|
@ -185,7 +201,6 @@ class ContributionScores extends IncludableSpecialPage {
|
|||
__METHOD__,
|
||||
[
|
||||
'ORDER BY' => 'wiki_rank DESC',
|
||||
'GROUP BY' => 'user_name',
|
||||
'LIMIT' => $limit,
|
||||
],
|
||||
[
|
||||
|
@ -391,7 +406,7 @@ class ContributionScores extends IncludableSpecialPage {
|
|||
$out->addWikiMsg( 'contributionscores-info' );
|
||||
|
||||
foreach ( $wgContribScoreReports as $scoreReport ) {
|
||||
list( $days, $revs ) = $scoreReport;
|
||||
[ $days, $revs ] = $scoreReport;
|
||||
if ( $days > 0 ) {
|
||||
$reportTitle = $this->msg( 'contributionscores-days' )->numParams( $days )->text();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue