Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
168ee8918c | ||
|
|
bdb4346fd0 | ||
|
|
75aab46d46 | ||
|
|
61b91c602e | ||
|
|
d81cda7856 | ||
|
|
9ca5e0338b | ||
|
|
9387aaf518 | ||
|
|
2efa7a5548 | ||
|
|
6ecb9475a4 | ||
|
|
283cf86e62 | ||
|
|
49d63684c8 | ||
|
|
7f40072416 | ||
|
|
e00a3b1c57 | ||
|
|
95976e0082 | ||
|
|
00af3f2598 | ||
|
|
2b415b36b5 | ||
|
|
1cf9ae8247 | ||
|
|
548a1f177c |
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"require-dev": {
|
||||
"mediawiki/mediawiki-codesniffer": "41.0.0",
|
||||
"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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"version": "1.26.1",
|
||||
"type": "specialpage",
|
||||
"requires": {
|
||||
"MediaWiki": ">= 1.34.0"
|
||||
"MediaWiki": ">= 1.40.0"
|
||||
},
|
||||
"SpecialPages": {
|
||||
"ContributionScores": "ContributionScores"
|
||||
|
||||
3279
package-lock.json
generated
3279
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.25.0",
|
||||
"grunt": "1.6.1",
|
||||
"grunt-banana-checker": "0.10.0",
|
||||
"grunt-eslint": "24.0.1"
|
||||
"eslint-config-wikimedia": "0.28.2",
|
||||
"grunt": "1.6.2",
|
||||
"grunt-banana-checker": "0.13.0",
|
||||
"grunt-eslint": "24.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
* \brief Contains code for the ContributionScores Class (extends SpecialPage).
|
||||
*/
|
||||
|
||||
use MediaWiki\Html\Html;
|
||||
use MediaWiki\Linker\Linker;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\User\ActorMigration;
|
||||
|
||||
/// Special page class for the Contribution Scores extension
|
||||
/**
|
||||
@@ -33,7 +36,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 +94,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'] );
|
||||
@@ -185,7 +190,6 @@ class ContributionScores extends IncludableSpecialPage {
|
||||
__METHOD__,
|
||||
[
|
||||
'ORDER BY' => 'wiki_rank DESC',
|
||||
'GROUP BY' => 'user_name',
|
||||
'LIMIT' => $limit,
|
||||
],
|
||||
[
|
||||
@@ -391,7 +395,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 {
|
||||
|
||||
Reference in New Issue
Block a user