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