Compare commits

...

18 Commits

Author SHA1 Message Date
libraryupgrader
168ee8918c build: Updating npm dependencies
* grunt: 1.6.1 → 1.6.2
* grunt-legacy-log: 3.0.0 → 3.0.1
  * https://github.com/advisories/GHSA-f23m-r3pf-42rh
  * https://github.com/advisories/GHSA-r5fr-rjxr-66jc
* grunt-legacy-log-utils: 2.1.0 → 2.1.3
  * https://github.com/advisories/GHSA-f23m-r3pf-42rh
  * https://github.com/advisories/GHSA-r5fr-rjxr-66jc
* grunt-legacy-util: 2.0.1 → 2.0.2
  * https://github.com/advisories/GHSA-f23m-r3pf-42rh
  * https://github.com/advisories/GHSA-r5fr-rjxr-66jc
* lodash: 4.17.23 → 4.18.1
  * https://github.com/advisories/GHSA-f23m-r3pf-42rh
  * https://github.com/advisories/GHSA-r5fr-rjxr-66jc

Change-Id: I8d0e22493c589cc1487126a534667b38ed3eb4c3
2026-04-16 22:44:02 +00:00
libraryupgrader
bdb4346fd0 build: Updating brace-expansion to 1.1.13, 2.0.3
* https://github.com/advisories/GHSA-f886-m6hf-6m8v

Change-Id: I0b9d005a833f976111321ef517bae9004dbca8c1
2026-03-31 06:07:27 +00:00
libraryupgrader
75aab46d46 build: Updating npm dependencies
* picomatch: 2.3.1, 4.0.3 → 2.3.2, 4.0.4
  * https://github.com/advisories/GHSA-3v7f-55p6-f55p
  * https://github.com/advisories/GHSA-c2c7-rcm5-vvqj
* yaml: 2.4.1 → 2.8.3
  * https://github.com/advisories/GHSA-48c2-rrv3-qjmp

Change-Id: Icad06a6ee65a572f93a27e7870e0a17eefea8171
2026-03-27 02:01:21 +00:00
libraryupgrader
61b91c602e build: Updating flatted to 3.4.2
* https://github.com/advisories/GHSA-rf6f-7fwh-wjgh

Change-Id: I2c644094eb514ddaffe8d61c2ef998034db32b9d
2026-03-23 04:48:38 +00:00
libraryupgrader
d81cda7856 build: Updating flatted to 3.4.1
* https://github.com/advisories/GHSA-25h7-pfq9-p65f

Change-Id: Icaa97bad2ed3d0e0ad785c39583ca59845dc2cd5
2026-03-15 19:31:23 +00:00
libraryupgrader
9ca5e0338b build: Updating ajv to 6.14.0
* https://github.com/advisories/GHSA-2g4f-4pwh-qvx6

Change-Id: I715439521f09081dca8d3e8b798a0908c5e1bbed
2026-02-23 05:48:27 +00:00
libraryupgrader
9387aaf518 build: Updating lodash to 4.17.23
* https://github.com/advisories/GHSA-xxjr-mmjv-4gpg

Change-Id: Ifa2ed4a9d0ca3ad5e4948425062848cee66fa4bd
2026-01-23 04:00:32 +00:00
libraryupgrader
2efa7a5548 build: Updating js-yaml to 3.14.2, 4.1.1
* https://github.com/advisories/GHSA-mh29-5h37-fv8m

Change-Id: I9a6613aa11b95df94963d3926fadf56e1cfb9adb
2025-11-21 06:11:45 +00:00
libraryupgrader
6ecb9475a4 build: Updating brace-expansion to 1.1.12, 2.0.2
* https://github.com/advisories/GHSA-v6h2-p8h4-qcjw

Change-Id: I1dc1be164ce2477deec330eb0de0498dc1dc8b73
2025-07-07 19:18:01 +00:00
Pskyechology
283cf86e62 Use namespaced imports
Also bumps MW requirement to 1.40 as the namespaces were introduced in that version.
Remove unnecessary GROUP BY, which causes errors in MySQL strict mode.

Change-Id: I9cfc32b13518da39b97662e424682d4d7a7cf862
2025-07-05 22:23:29 +00:00
libraryupgrader
49d63684c8 build: Updating cross-spawn to 7.0.6
* https://github.com/advisories/GHSA-3xgq-45jj-v275

Change-Id: Ied99fe7e6fc844f11cfdef7f122a259208b68d0b
2025-05-08 04:21:16 +00:00
libraryupgrader
7f40072416 build: Updating mediawiki/mediawiki-codesniffer to 45.0.0
Change-Id: Ia8f9b33e935bf4f6f2ede29eeabf9acb10c15cb9
2024-11-02 05:55:26 +00:00
libraryupgrader
e00a3b1c57 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 43.0.0 → 44.0.0

npm:
* eslint-config-wikimedia: 0.27.0 → 0.28.2
* braces: 3.0.2 → 3.0.3
  * https://github.com/advisories/GHSA-grv7-fg5c-xmjg
* micromatch: 4.0.5 → 4.0.8
  * https://github.com/advisories/GHSA-952p-6rrq-rcjv

Change-Id: I039053dadabb9bc16cdf7c40cd523745d3e4116f
2024-09-29 02:48:39 +00:00
Umherirrender
95976e0082 Merge "build: Updating grunt-banana-checker to 0.13.0" 2024-09-28 22:24:05 +00:00
ZoruaFox
00af3f2598 Fix wfGetDB deprecated on 1.39 and later versions.
The global function wfGetDB() has been deprecated since 1.39,
use LoadBalancer::getConnection() instead of old function.

Bug: T369145
Change-Id: Ided5ed8d1e54428541f067c75fbe7fdfeefc460f
2024-07-03 22:17:33 +00:00
libraryupgrader
2b415b36b5 build: Updating grunt-banana-checker to 0.13.0
Change-Id: Ibbdc718ea757b24ed4585f5f6e8a77bbb4f5f24f
2024-05-18 05:11:57 +00:00
libraryupgrader
1cf9ae8247 build: Updating dependencies
composer:
* mediawiki/minus-x: 1.1.1 → 1.1.3

npm:
* grunt-banana-checker: 0.11.1 → 0.12.0

Change-Id: I7c6aa5e4e1c0c2c7c6410a0745febb443eceebe7
2024-05-10 03:07:37 +00:00
libraryupgrader
548a1f177c build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 41.0.0 → 43.0.0
* php-parallel-lint/php-parallel-lint: 1.3.2 → 1.4.0

npm:
* eslint-config-wikimedia: 0.25.0 → 0.27.0
* grunt-banana-checker: 0.10.0 → 0.11.1
* grunt-eslint: 24.0.1 → 24.3.0

Change-Id: Iee9ef20b4984ad7459d77cc77c59394667954370
2024-04-22 02:10:29 +00:00
5 changed files with 1996 additions and 1316 deletions

View File

@@ -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
}
}
}

View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -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"
}
}

View File

@@ -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 {