Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/js/autoedits.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ $(function () {
var initFunc = $('.contributions-table').length ? 'setupContributionsNavListeners' : 'loadContributions';
xtools.application[initFunc](
function (params) {
return `${params.target} - contributions / ${params.project} / ${params.username}` +
` / ${params.namespace} / ${params.start} / ${params.end}`;
return `${params.target}-contributions/${params.project}/${params.username}` +
`/${params.namespace}/${params.start}/${params.end}`;
},
$contributionsContainer.data('target')
);
Expand Down
4 changes: 2 additions & 2 deletions assets/js/blame.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $(function () {
const highlightMatch = selector => {
const regex = new RegExp(`(${escapedQuery})`, 'gi');
$(selector).html(
$(selector).html().replace(regex, ` < strong > $1 < / strong > `)
$(selector).html().replace(regex, `<strong>$1</strong>`)
);
};

Expand All @@ -37,7 +37,7 @@ $(function () {
$showSelector.on('change', e => {
$('.show-option').addClass('hidden')
.find('input').prop('disabled', true);
$(`.show - option--${e.target.value}`).removeClass('hidden')
$(`.show-option--${e.target.value}`).removeClass('hidden')
.find('input').prop('disabled', false);
});
window.onload = () => $showSelector.trigger('change');
Expand Down
4 changes: 2 additions & 2 deletions assets/js/common/contributions-lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ xtools.application.loadContributions = function (endpointFunc, apiTitle) {
if (oldToolPath !== newToolPath) {
// Happens when a subrequest is made to a different controller action.
// For instance, /autoedits embeds /nonautoedits-contributions.
var regexp = new RegExp(` ^ / ${newToolPath} / (.*) / `);
newUrl = newUrl.replace(regexp, ` / ${oldToolPath} / $1 / `);
const regexp = new RegExp(`^/${ newToolPath }/(.*)/`);
newUrl = newUrl.replace(regexp, `/${ oldToolPath }/$1/`);
}

// Do not run on the initial page load. This is to retain a clean URL:
Expand Down
2 changes: 1 addition & 1 deletion assets/js/globalcontribs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ $(function () {
}

xtools.application.setupContributionsNavListeners(function (params) {
return `globalcontribs / ${params.username} / ${params.namespace} / ${params.start} / ${params.end}`;
return `globalcontribs/${params.username}/${params.namespace}/${params.start}/${params.end}`;
}, 'globalcontribs');
});
2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<exclude-pattern>var/</exclude-pattern>
<exclude-pattern>node_modules/</exclude-pattern>
<exclude-pattern>assets/vendor/</exclude-pattern>
<exclude-pattern>*.min.js</exclude-pattern>
<exclude-pattern>*.js</exclude-pattern>
<exclude-pattern>bootstrap.php</exclude-pattern>
<exclude-pattern>bin/.phpunit/</exclude-pattern>

Expand Down
2 changes: 2 additions & 0 deletions public/build/app.1d427a43.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions public/build/app.9cc563c1.js

This file was deleted.

2 changes: 1 addition & 1 deletion public/build/entrypoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"js": [
"/build/runtime.c217f8c4.js",
"/build/852.96913092.js",
"/build/app.9cc563c1.js"
"/build/app.1d427a43.js"
],
"css": [
"/build/app.7692d209.css"
Expand Down
2 changes: 1 addition & 1 deletion public/build/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"build/app.css": "/build/app.7692d209.css",
"build/app.js": "/build/app.9cc563c1.js",
"build/app.js": "/build/app.1d427a43.js",
"build/runtime.js": "/build/runtime.c217f8c4.js",
"build/852.96913092.js": "/build/852.96913092.js",
"build/images/VPS-badge.svg": "/build/images/VPS-badge.svg",
Expand Down
3 changes: 2 additions & 1 deletion src/Repository/PagesRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ public function getAssessmentCounts(
$resultQuery = $this->executeQuery( $sql, $project, $user, $namespace );

$assessments = [];
foreach ( $resultQuery->fetchAssociative() as $result ) {
// phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition
while ( $result = $resultQuery->fetchAssociative() ) {
$class = $result['class'] == '' ? '' : $result['class'];
$assessments[$class] = $result['count'];
}
Expand Down
1 change: 1 addition & 0 deletions tests/Controller/PagesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function testRoutes(): void {
'/pages/en.wikipedia/Example/0',
'/pages/en.wikipedia.org/MusikVarmint/4',
'/pages/en.wikipedia.org/MusikVarmint/4?format=wikitext',
'/pages/en.wikipedia.org/MusikVarmint/all',
'/pages/en.wikipedia/Example/0/noredirects/all/2018-01-01//2018-01-15T12:00:00',
'/pages/en.wikipedia/Foobar/0/noredirects/all/2018-01-01//2018-01-15T12:00:00?format=wikitext',
'/pages/en.wikipedia/Foobar/0/noredirects/all//2018-01-01/2018-01-15T12:00:00?format=csv',
Expand Down
Loading