Skip to content

Commit c52a530

Browse files
authored
Merge branch 'main' into catchoauthexcept
2 parents 9154a81 + 1df27f4 commit c52a530

File tree

280 files changed

+30976
-34600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

280 files changed

+30976
-34600
lines changed

.editorconfig

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
# Unix-style newlines with a newline ending every file
44
[*]
5+
indent_style = tab
6+
indent_size = tab
7+
tab_width = 4
58
end_of_line = lf
6-
insert_final_newline = true
9+
charset = utf-8
710
trim_trailing_whitespace = true
11+
insert_final_newline = true
812

9-
# 4 space indentation
10-
[*.{php,js,twig}]
13+
# Tabs may not be valid YAML
14+
# @see https://yaml.org/spec/1.2/spec.html#id2777534
15+
[*.{yml,yaml}]
1116
indent_style = space
12-
indent_size = 4
17+
indent_size = 2

.env

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ APP_ENV=dev
77
APP_SECRET=ThisTokenIsNotSoSecretChangeIt
88
# Wikimedia Cloud Services
99
TRUSTED_PROXIES=172.16.0.0/21,172.16.8.0/21,172.16.16.0/21,2a02:ec80:a000:1::/64
10-
#TRUSTED_HOSTS=
1110
###< symfony/framework-bundle ###
1211

13-
APP_VERSION=3.22.1
12+
APP_VERSION=3.23.1
1413

1514
DATABASE_HOST=127.0.0.1
1615
DATABASE_PORT=

RELEASE_NOTES.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# Release Notes #
22

3+
## 3.23.1 ##
4+
- PageInfo (T413692): Fix a typo in the gadget source.
5+
- Accept null in numberFormat.
6+
7+
## 3.23.0 ##
8+
- (T400929) Upgrade to Symfony 6.4 and PHP 8.2, update dependencies.
9+
- CategoryEdits: update queries following schema changes, improve performance.
10+
- (T413013) Disable CheckWiki errors.
11+
- Localization updates.
12+
13+
## 3.22.4 ##
14+
- AdminScore (T410809): Fix null argument to str_replace.
15+
- EditCounter (T411310): Fix last interval in edit size histogram.
16+
- Localization updates.
17+
18+
## 3.22.3 ##
19+
- (T410391) Fix username duplication in linking macros.
20+
21+
## 3.22.2 ##
22+
- PageInfo (T407814): Fix the "Top 10 by added text" chart following the removal of
23+
the rev_sha1 column.
24+
- TopEdits (T407814): Temporarily disable sha1-based revert detection following the
25+
removal of the rev_sha1 column.
26+
- PageInfo (T330941): Fix interwiki links of imported revisions.
27+
- (T226307): Fix error messages and codes for DB timeouts.
28+
- EditCounter (T284876): Integrate FlaggedRevs in protection counts.
29+
- EditCounter (T342402): Add approximate (semi-)automated edit count using tags.
30+
- EditCounter: Fix interaction between external legend and log checkbox with flexbox.
31+
- Edit (T408332): Fix link regex, titles cannot have []
32+
- (T393120) Remove obsolete i18n messages.
33+
- Localization updates.
34+
335
## 3.22.1 ##
436
- PageInfo (T402709): fix encoding errors in subpage count.
537
- PageInfoApi: ensure rev_timestamp is a number

assets/css/editcounter.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@
2626
max-width: 1000px;
2727
}
2828

29+
.yearmonth-container {
30+
display:flex;
31+
flex-direction:row;
32+
flex-wrap:wrap;
33+
width:100%;
34+
}
35+
36+
.yearmonth-chart-container {
37+
flex-grow:1;
38+
}
39+
2940
#namespace-canvas {
3041
height: auto;
3142
width: auto;

assets/js/adminstats.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
xtools.adminstats = {};
22

33
$(function () {
4-
var $projectInput = $('#project_input'),
5-
lastProject = $projectInput.val();
4+
var $projectInput = $('#project_input'),
5+
lastProject = $projectInput.val();
66

7-
// Don't do anything if this isn't an Admin Stats page.
8-
if ($('body.adminstats, body.patrollerstats, body.stewardstats').length === 0) {
9-
return;
10-
}
7+
// Don't do anything if this isn't an Admin Stats page.
8+
if ($('body.adminstats, body.patrollerstats, body.stewardstats').length === 0) {
9+
return;
10+
}
1111

12-
xtools.application.setupMultiSelectListeners();
12+
xtools.application.setupMultiSelectListeners();
1313

14-
$('.group-selector').on('change', function () {
15-
$('.action-selector').addClass('hidden');
16-
$('.action-selector--' + $(this).val()).removeClass('hidden');
14+
$('.group-selector').on('change', function () {
15+
$('.action-selector').addClass('hidden');
16+
$('.action-selector--' + $(this).val()).removeClass('hidden');
1717

18-
// Update title of form.
19-
$('.xt-page-title--title').text($.i18n('tool-' + $(this).val() + 'stats'));
20-
$('.xt-page-title--desc').text($.i18n('tool-' + $(this).val() + 'stats-desc'));
21-
var title = $.i18n('tool-' + $(this).val() + 'stats') + ' - ' + $.i18n('xtools-title');
22-
document.title = title;
23-
history.replaceState({}, title, '/' + $(this).val() + 'stats');
18+
// Update title of form.
19+
$('.xt-page-title--title').text($.i18n('tool-' + $(this).val() + 'stats'));
20+
$('.xt-page-title--desc').text($.i18n('tool-' + $(this).val() + 'stats-desc'));
21+
var title = $.i18n('tool-' + $(this).val() + 'stats') + ' - ' + $.i18n('xtools-title');
22+
document.title = title;
23+
history.replaceState({}, title, '/' + $(this).val() + 'stats');
2424

25-
// Change project to Meta if it's Steward Stats.
26-
if ('steward' === $(this).val()) {
27-
lastProject = $projectInput.val();
28-
$projectInput.val('meta.wikimedia.org');
29-
} else {
30-
$projectInput.val(lastProject);
31-
}
25+
// Change project to Meta if it's Steward Stats.
26+
if ('steward' === $(this).val()) {
27+
lastProject = $projectInput.val();
28+
$projectInput.val('meta.wikimedia.org');
29+
} else {
30+
$projectInput.val(lastProject);
31+
}
3232

33-
xtools.application.setupMultiSelectListeners();
34-
});
33+
xtools.application.setupMultiSelectListeners();
34+
});
3535
});

assets/js/authorship.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
$(function () {
2-
if (!$('body.authorship').length) {
3-
return;
4-
}
2+
if (!$('body.authorship').length) {
3+
return;
4+
}
55

6-
const $showSelector = $('#show_selector');
6+
const $showSelector = $('#show_selector');
77

8-
$showSelector.on('change', e => {
9-
$('.show-option').addClass('hidden')
10-
.find('input').prop('disabled', true);
11-
$(`.show-option--${e.target.value}`).removeClass('hidden')
12-
.find('input').prop('disabled', false);
13-
});
8+
$showSelector.on('change', e => {
9+
$('.show-option').addClass('hidden')
10+
.find('input').prop('disabled', true);
11+
$(`.show - option--${e.target.value}`).removeClass('hidden')
12+
.find('input').prop('disabled', false);
13+
});
1414

15-
window.onload = () => $showSelector.trigger('change');
15+
window.onload = () => $showSelector.trigger('change');
1616
});

assets/js/autoedits.js

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,78 @@
11
xtools.autoedits = {};
22

33
$(function () {
4-
if (!$('body.autoedits').length) {
5-
return;
6-
}
4+
if (!$('body.autoedits').length) {
5+
return;
6+
}
77

8-
var $contributionsContainer = $('.contributions-container'),
9-
$toolSelector = $('#tool_selector');
8+
var $contributionsContainer = $('.contributions-container'),
9+
$toolSelector = $('#tool_selector');
1010

11-
// For the form page.
12-
if ($toolSelector.length) {
13-
xtools.autoedits.fetchTools = function (project) {
14-
$toolSelector.prop('disabled', true);
15-
$.get('/api/project/automated_tools/' + project).done(function (tools) {
16-
if (tools.error) {
17-
$toolSelector.prop('disabled', false);
18-
return; // Abort, project was invalid.
19-
}
11+
// For the form page.
12+
if ($toolSelector.length) {
13+
xtools.autoedits.fetchTools = function (project) {
14+
$toolSelector.prop('disabled', true);
15+
$.get('/api/project/automated_tools/' + project).done(function (tools) {
16+
if (tools.error) {
17+
$toolSelector.prop('disabled', false);
18+
return; // Abort, project was invalid.
19+
}
2020

21-
// These aren't tools, just metadata in the API response.
22-
delete tools.project;
23-
delete tools.elapsed_time;
21+
// These aren't tools, just metadata in the API response.
22+
delete tools.project;
23+
delete tools.elapsed_time;
2424

25-
$toolSelector.html(
26-
'<option value="none">' + $.i18n('none') + '</option>' +
27-
'<option value="all">' + $.i18n('all') + '</option>'
28-
);
29-
Object.keys(tools).forEach(function (tool) {
30-
$toolSelector.append(
31-
'<option value="' + tool + '">' + (tools[tool].label || tool) + '</option>'
32-
);
33-
});
25+
$toolSelector.html(
26+
'<option value="none">' + $.i18n('none') + '</option>' +
27+
'<option value="all">' + $.i18n('all') + '</option>'
28+
);
29+
Object.keys(tools).forEach(function (tool) {
30+
$toolSelector.append(
31+
'<option value="' + tool + '">' + (tools[tool].label || tool) + '</option>'
32+
);
33+
});
3434

35-
$toolSelector.prop('disabled', false);
36-
});
37-
};
35+
$toolSelector.prop('disabled', false);
36+
});
37+
};
3838

39-
$(document).ready(function () {
40-
$('#project_input').on('change.autoedits', function () {
41-
xtools.autoedits.fetchTools($('#project_input').val());
42-
});
43-
});
39+
$(document).ready(function () {
40+
$('#project_input').on('change.autoedits', function () {
41+
xtools.autoedits.fetchTools($('#project_input').val());
42+
});
43+
});
4444

45-
xtools.autoedits.fetchTools($('#project_input').val());
45+
xtools.autoedits.fetchTools($('#project_input').val());
4646

47-
// All the other code below only applies to result pages.
48-
return;
49-
}
47+
// All the other code below only applies to result pages.
48+
return;
49+
}
5050

51-
// For result pages only...
51+
// For result pages only...
5252

53-
xtools.application.setupToggleTable(window.countsByTool, window.toolsChart, 'count', function (newData) {
54-
var total = 0;
55-
Object.keys(newData).forEach(function (tool) {
56-
total += parseInt(newData[tool].count, 10);
57-
});
58-
var toolsCount = Object.keys(newData).length;
59-
/** global: i18nLang */
60-
$('.tools--tools').text(
61-
toolsCount.toLocaleString(i18nLang) + " " +
62-
$.i18n('num-tools', toolsCount)
63-
);
64-
$('.tools--count').text(total.toLocaleString(i18nLang));
65-
});
53+
xtools.application.setupToggleTable(window.countsByTool, window.toolsChart, 'count', function (newData) {
54+
var total = 0;
55+
Object.keys(newData).forEach(function (tool) {
56+
total += parseInt(newData[tool].count, 10);
57+
});
58+
var toolsCount = Object.keys(newData).length;
59+
/** global: i18nLang */
60+
$('.tools--tools').text(
61+
toolsCount.toLocaleString(i18nLang) + " " +
62+
$.i18n('num-tools', toolsCount)
63+
);
64+
$('.tools--count').text(total.toLocaleString(i18nLang));
65+
});
6666

67-
if ($contributionsContainer.length) {
68-
// Load the contributions browser, or set up the listeners if it is already present.
69-
var initFunc = $('.contributions-table').length ? 'setupContributionsNavListeners' : 'loadContributions';
70-
xtools.application[initFunc](
71-
function (params) {
72-
return `${params.target}-contributions/${params.project}/${params.username}` +
73-
`/${params.namespace}/${params.start}/${params.end}`;
74-
},
75-
$contributionsContainer.data('target')
76-
);
77-
}
67+
if ($contributionsContainer.length) {
68+
// Load the contributions browser, or set up the listeners if it is already present.
69+
var initFunc = $('.contributions-table').length ? 'setupContributionsNavListeners' : 'loadContributions';
70+
xtools.application[initFunc](
71+
function (params) {
72+
return `${params.target}-contributions/${params.project}/${params.username}` +
73+
`/${params.namespace}/${params.start}/${params.end}`;
74+
},
75+
$contributionsContainer.data('target')
76+
);
77+
}
7878
});

assets/js/blame.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
xtools.blame = {};
22

33
$(function () {
4-
if (!$('body.blame').length) {
5-
return;
6-
}
4+
if (!$('body.blame').length) {
5+
return;
6+
}
77

8-
if ($('.diff-empty').length === $('.diff tr').length - 1) {
9-
$('.diff-empty').eq(0)
10-
.text(`(${$.i18n('diff-empty').toLowerCase()})`)
11-
.addClass('text-muted text-center')
12-
.prop('width', '20%');
13-
}
8+
if ($('.diff-empty').length === $('.diff tr').length - 1) {
9+
$('.diff-empty').eq(0)
10+
.text(`(${$.i18n('diff-empty').toLowerCase()})`)
11+
.addClass('text-muted text-center')
12+
.prop('width', '20%');
13+
}
1414

15-
$('.diff-addedline').each(function () {
16-
// Escape query to make regex-safe.
17-
const escapedQuery = xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
15+
$('.diff-addedline').each(function () {
16+
// Escape query to make regex-safe.
17+
const escapedQuery = xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
1818

19-
const highlightMatch = selector => {
20-
const regex = new RegExp(`(${escapedQuery})`, 'gi');
21-
$(selector).html(
22-
$(selector).html().replace(regex, `<strong>$1</strong>`)
23-
);
24-
};
19+
const highlightMatch = selector => {
20+
const regex = new RegExp(`(${escapedQuery})`, 'gi');
21+
$(selector).html(
22+
$(selector).html().replace(regex, `<strong>$1</strong>`)
23+
);
24+
};
2525

26-
if ($(this).find('.diffchange-inline').length) {
27-
$('.diffchange-inline').each(function () {
28-
highlightMatch(this);
29-
});
30-
} else {
31-
highlightMatch(this);
32-
}
33-
});
26+
if ($(this).find('.diffchange-inline').length) {
27+
$('.diffchange-inline').each(function () {
28+
highlightMatch(this);
29+
});
30+
} else {
31+
highlightMatch(this);
32+
}
33+
});
3434

35-
// Handles the "Show" dropdown, show/hiding the associated input field accordingly.
36-
const $showSelector = $('#show_selector');
37-
$showSelector.on('change', e => {
38-
$('.show-option').addClass('hidden')
39-
.find('input').prop('disabled', true);
40-
$(`.show-option--${e.target.value}`).removeClass('hidden')
41-
.find('input').prop('disabled', false);
42-
});
43-
window.onload = () => $showSelector.trigger('change');
35+
// Handles the "Show" dropdown, show/hiding the associated input field accordingly.
36+
const $showSelector = $('#show_selector');
37+
$showSelector.on('change', e => {
38+
$('.show-option').addClass('hidden')
39+
.find('input').prop('disabled', true);
40+
$(`.show-option--${e.target.value}`).removeClass('hidden')
41+
.find('input').prop('disabled', false);
42+
});
43+
window.onload = () => $showSelector.trigger('change');
4444
});

0 commit comments

Comments
 (0)