Skip to content

Commit f82751f

Browse files
committed
Merge branch 'REL1_45' of https://github.com/wikimedia/mediawiki into wikimedia-REL1_45
Signed-off-by: MacFan4000 <paulfkeffer@gmail.com>
2 parents 7c4ca66 + fc9b743 commit f82751f

95 files changed

Lines changed: 1756 additions & 716 deletions

Some content is hidden

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

extensions

includes/CommentFormatter/CommentParser.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,6 @@ function ( $match ) use ( $selfLinkTarget, $samePage, $wikiId ) {
242242
']]'
243243
], '', $section );
244244

245-
// We don't want any links in the auto text to be linked, but we still
246-
// want to show any [[ ]]
247-
$sectionText = str_replace( '[[', '&#91;[', $auto );
248-
249245
$section = substr( Parser::guessSectionNameFromStrippedText( $section ), 1 );
250246
if ( $section !== '' ) {
251247
if ( $samePage ) {
@@ -256,7 +252,7 @@ function ( $match ) use ( $selfLinkTarget, $samePage, $wikiId ) {
256252
$auto = $this->makeSectionLink(
257253
$sectionTitle,
258254
$this->userLang->getArrow() .
259-
Html::rawElement( 'bdi', [ 'dir' => $this->userLang->getDir() ], $sectionText ),
255+
Html::rawElement( 'bdi', [ 'dir' => $this->userLang->getDir() ], $auto ),
260256
$wikiId,
261257
$selfLinkTarget
262258
);
@@ -273,7 +269,10 @@ function ( $match ) use ( $selfLinkTarget, $samePage, $wikiId ) {
273269
if ( $auto ) {
274270
$auto = Html::rawElement( 'span', [ 'class' => 'autocomment' ], $auto );
275271
}
276-
return $pre . $auto;
272+
273+
// Make sure any brackets (which the user could have input in the edit summary)
274+
// in the generated autocomment HTML don't trigger additional link processing (T406664).
275+
return str_replace( [ '[', ']' ], [ '&#91;', '&#93;' ], $pre . $auto );
277276
},
278277
$comment
279278
);

includes/Rest/i18n/ko.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,5 @@
127127
"rest-schema-desc-new-page": "소스 (보통 위키텍스트)를 포함한 새 문서",
128128
"rest-schema-desc-bare-page": "내용이 없는 문서",
129129
"rest-schema-desc-search-results": "검색 결과",
130-
"rest-schema-desc-revision-compare": "개정판 비교"
130+
"rest-schema-desc-revision-compare": " 비교"
131131
}

includes/Rest/i18n/ne.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"@metadata": {
3+
"authors": [
4+
"बडा काजी"
5+
]
6+
},
7+
"rest-permission-error": "अनुमति अस्वीकृत: $1",
8+
"rest-permission-denied-anon": "अज्ञात प्रयोगकर्ता द्वारा पहुँचयोग्य छैन",
9+
"rest-permission-denied-title": "प्रयोगकर्तालाई शीर्षक पढ्ने अधिकार छैन ($1)",
10+
"rest-permission-denied-revision": "अनुरोध गरिएको संशोधन ($1)मा प्रयोगकर्ताको पहुँच छैन।",
11+
"rest-mock-error": "ठट्टा त्रुटि।",
12+
"rest-edit-conflict": "सम्पादन बाँझियो ($1)",
13+
"rest-unknown-parsoid-transformation": "अज्ञात रूपान्तरण।",
14+
"rest-module": "मोड्युल",
15+
"rest-module-default": "पूर्वनिर्धारित मोड्युल",
16+
"rest-module-content.v1-title": "पृष्ठ सामग्री",
17+
"rest-module-content.v1-desc": "पृष्ठहरू र संशोधनहरूको सामग्री र मेटाडेटामा पहुँच प्रदान गर्दछ",
18+
"rest-param-desc-mock-desc": "उपहास विवरण।",
19+
"rest-param-desc-page-content-redirect": "पृष्ठ सामग्री अनुप्रेषण",
20+
"rest-param-desc-compare-from-section-level": "खण्ड स्तर",
21+
"rest-param-desc-compare-to-section-level": "खण्ड स्तर",
22+
"rest-param-desc-compare-diff": "संशोधनहरू बीचको भिन्नताहरू",
23+
"rest-param-desc-language-links-title": "विकि पृष्ठको शीर्षक",
24+
"rest-param-desc-media-links-title": "पृष्ठ शीर्षक",
25+
"rest-param-desc-media-file-title": "फाइल शीर्षक",
26+
"rest-param-desc-media-mediatype": "फाइल प्रकार",
27+
"rest-param-desc-pagehistory-count-title": "विकि पृष्ठको शीर्षक",
28+
"rest-param-desc-pagehistory-title": "विकि पृष्ठको शीर्षक",
29+
"rest-param-desc-search-q": "खोज सर्तहरू",
30+
"rest-param-desc-search-limit": "खोज परिणामहरूको अधिकतम सङ्ख्या, १ र १०० बीचमा। पूर्वनिर्धारित: ५०",
31+
"rest-param-desc-transform-from": "बाट रूपान्तरण",
32+
"rest-param-desc-transform-format": "ढाँचा रूपान्तरण",
33+
"rest-param-desc-transform-title": "शीर्षक रूपान्तरण",
34+
"rest-param-desc-transform-revision": "रूपान्तरण संशोधन",
35+
"rest-param-desc-update-title": "अद्यावधिक पृष्ठ शीर्षक",
36+
"rest-property-desc-mock-desc": "उपहास विवरण।",
37+
"rest-property-desc-revision-user": "संशोधन गर्ने प्रयोगकर्ताको बारेमा जानकारी",
38+
"rest-property-desc-revision-id": "संशोधन आईडी",
39+
"rest-property-desc-search-pages": "खोज परिणाम पृष्ठहरूको सूची",
40+
"rest-property-desc-page-id": "पृष्ठ पहिचानकर्ता",
41+
"rest-property-desc-page-title": "पृष्ठ शीर्षक",
42+
"rest-property-desc-page-language-code": "भाषा कोड",
43+
"rest-property-desc-page-language-name": "अनुवादित भाषाको नाम",
44+
"rest-property-desc-page-contentmodel": "पृष्ठ सामग्री प्रकार",
45+
"rest-property-desc-page-history-edit-count": "निर्दिष्ट प्रकारको सम्पादन गणनाहरूको सङ्ख्या",
46+
"rest-property-desc-page-history-edit-limit": "वास्तविक सम्पादन गणनाले त्यस प्रकारका लागि अनुमति दिइएको सीमा नाघेको छ कि छैन",
47+
"rest-property-desc-user": "सम्पादन गर्ने प्रयोगकर्ता",
48+
"rest-property-desc-user-id": "प्रयोगकर्ता पहिचानकर्ता, वा अज्ञात प्रयोगकर्ताहरूका लागि शून्य",
49+
"rest-property-desc-user-name": "अज्ञात प्रयोगकर्ताहरूका लागि प्रयोगकर्ता नाम, वा मूल आईपी ठेगाना",
50+
"rest-property-desc-revision-size": "यो संशोधनको आकार बाइटमा",
51+
"rest-property-desc-revision-delta": "अघिल्लो संशोधनको तुलनामा आकारमा भिन्नता।",
52+
"rest-property-desc-revision-comment": "संशोधनसँग सम्बन्धित लेखकको टिप्पणी",
53+
"rest-property-desc-revision-minor": "यो सानो सम्पादन हो कि होइन",
54+
"rest-property-desc-revision-content-model": "सामग्रीको प्रकार",
55+
"rest-property-desc-revision-page": "संशोधन सम्बन्धित पृष्ठ",
56+
"rest-property-desc-revision-source": "संशोधन स्रोत सामग्री",
57+
"rest-property-desc-search-description": "पृष्ठ विषयको छोटो सारांश वा यदि कुनै सारांश अवस्थित छैन भने शून्य।",
58+
"rest-schema-desc-mock-desc": "उपहास विवरण।",
59+
"rest-schema-desc-revision-metadata": "संशोधन मेटाडेटा",
60+
"rest-schema-desc-bare-page": "सामग्री बिनाको पृष्ठ",
61+
"rest-schema-desc-page-history": "पृष्ठ संशोधन इतिहास",
62+
"rest-schema-desc-page-history-count": "पृष्ठ इतिहास सम्पादन गणना",
63+
"rest-schema-desc-page-language-links": "पृष्ठका लागि अन्तरभाषा लिङ्कहरू",
64+
"rest-schema-desc-search-results": "खोज परिणामहरू",
65+
"rest-schema-desc-revision-compare": "संशोधन तुलना",
66+
"rest-endpoint-desc-mock-desc": "उपहास विवरण।",
67+
"rest-endpoint-desc-post-page": "पृष्ठ सिर्जना गर्छ।",
68+
"rest-endpoint-summ-get-page-history": "पृष्ठ इतिहास प्राप्त गर्नुहोस्",
69+
"rest-endpoint-summ-get-page-history-counts": "पृष्ठ इतिहास गणनाहरू प्राप्त गर्नुहोस्",
70+
"rest-endpoint-summ-get-revision-compare": "संशोधनहरू तुलना गर्नुहोस्",
71+
"rest-endpoint-summ-get-revision-id": "संशोधन स्रोत प्राप्त गर्नुहोस्",
72+
"rest-endpoint-summ-get-revision-id-bare": "संशोधन प्राप्त गर्नुहोस्",
73+
"rest-endpoint-summ-get-search-page": "पृष्ठहरू खोजी गर्नुहोस्",
74+
"rest-endpoint-summ-get-page-title-language": "भाषाहरू प्राप्त गर्नुहोस्",
75+
"rest-endpoint-summ-get-page-title": "पृष्ठ स्रोत प्राप्त गर्नुहोस्",
76+
"rest-endpoint-summ-get-page-title-bare": "पृष्ठ प्राप्त गर्नुहोस्",
77+
"rest-endpoint-summ-get-page-title-html": "एचटिएमएल प्राप्त गर्नुहोस्",
78+
"rest-endpoint-summ-get-page-title-with-html": "एचटिएमएलसँग पृष्ठ प्राप्त गर्नुहोस्",
79+
"rest-endpoint-summ-get-page-title-lint": "पृष्ठ लिन्ट त्रुटिहरू प्राप्त गर्नुहोस्",
80+
"rest-endpoint-summ-get-page-title-media": "पृष्ठमा फाइलहरू प्राप्त गर्नुहोस्",
81+
"rest-endpoint-summ-get-file-title": "फाइल प्राप्त गर्नुहोस्",
82+
"rest-endpoint-summ-put-page-title": "पृष्ठ अद्यावधिक गर्नुहोस्",
83+
"rest-endpoint-summ-post-page": "पृष्ठ सिर्जना गर्नुहोस्"
84+
}

includes/Rest/i18n/pt.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"Caiofernandes",
55
"Hamilton Abreu",
66
"Mansil alfalb",
7-
"Mbs262"
7+
"Mbs262",
8+
"Maria Manuela Silva"
89
]
910
},
1011
"rest-prefix-mismatch": "O caminho pedido ($1) não estava no interior do caminho base da API REST ($2)",
@@ -75,7 +76,7 @@
7576
"rest-unmapped-action-error": "Erro do módulo de operação não mapeado: $1",
7677
"rest-unsupported-transform-input": "Entrada não suportada: $1",
7778
"rest-bad-etag": "ETag incorreta: $1",
78-
"rest-no-stashed-content": "Não foi encontrado nenhum conteúdo escondido para $1",
79+
"rest-no-stashed-content": "Não foi encontrado nenhum conteúdo escondido para $1. Isto deve-se muito provavelmente ao facto de a sua sessão de edição ter expirado. Tente copiar as suas alterações, recarregue a página, e tente novamente.",
7980
"rest-unsupported-profile-version": "Versão do perfil não suportada: $1",
8081
"rest-no-json-decode": "A carga útil não descodifica para uma matriz em JSON",
8182
"rest-parsoid-unsupported-media": "Tipo de multimédia não suportado",
@@ -88,6 +89,10 @@
8889
"rest-unsupported-language-conversion": "Conversão de língua não suportada: $1 para $2",
8990
"rest-unknown-content-model": "Modelo de conteúdo desconhecido: $1",
9091
"rest-page-bundle-validation-error": "PageBundle não coincide com contentVersion: $1",
92+
"rest-module": "Módulo",
93+
"rest-module-default": "Módulo predefinido",
94+
"rest-module-extra-routes-title": "API REST do MediaWiki",
95+
"rest-module-specs.v0-title": "Especificações",
9196
"rest-param-desc-media-links-title": "Título da página",
9297
"rest-property-desc-revision-url-older": "Se disponível, o URL para obter o segmento da revisão anterior",
9398
"rest-property-desc-revision-url-newer": "Se disponível, o URL para obter o seguinte segmento da revisão"

includes/api/ApiQueryRevisionsBase.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ private function extractAllSlotInfo( RevisionRecord $revision, $revDel ): array
524524
$vals['slots'][$role] = $this->extractSlotInfo( $slot, $revDel, $content );
525525
// @todo Move this into extractSlotInfo() (and remove its $content parameter)
526526
// when extractDeprecatedContent() is no more.
527-
if ( $content ) {
527+
if ( $content && $this->getAuthority()->authorizeRead( 'read', $revision->getPage() ) ) {
528528
/** @var Content $content */
529529
$model = $content->getModel();
530530
$format = $this->slotContentFormats[$role] ?? $content->getDefaultFormat();
@@ -624,6 +624,10 @@ private function extractDeprecatedContent( Content $content, RevisionRecord $rev
624624
$vals = [];
625625
$title = Title::newFromPageIdentity( $revision->getPage() );
626626

627+
if ( !$this->getAuthority()->authorizeRead( 'read', $title ) ) {
628+
return [];
629+
}
630+
627631
if ( $this->fld_parsetree || ( $this->fld_content && $this->generateXML ) ) {
628632
if ( $content->getModel() === CONTENT_MODEL_WIKITEXT ) {
629633
/** @var WikitextContent $content */

includes/import/ImportableOldRevisionImporter.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public function import( ImportableOldRevision $importableRevision, $doUpdates =
6666
} else {
6767
$userId = 0;
6868
$userText = $importableRevision->getUser();
69-
$user = $this->userFactory->newAnonymous();
7069
}
7170

7271
// avoid memory leak...?
@@ -203,7 +202,7 @@ public function import( ImportableOldRevision $importableRevision, $doUpdates =
203202
];
204203

205204
$updater->setCause( PageUpdater::CAUSE_IMPORT );
206-
$updater->setPerformer( $user ); // TODO: get the actual performer, not the revision author.
205+
$updater->setPerformer( RequestContext::getMain()->getUser() );
207206
$updater->prepareUpdate( $inserted, $options );
208207
$updater->doUpdates();
209208
}

includes/mail/UserMailer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,8 @@ public static function quotedPrintable( $string, $charset = '' ) {
466466
}
467467

468468
// T344912: Add period '.' char
469-
$replace = $illegal . '.\t ?_';
469+
// T385403: Add comma ',' char
470+
$replace = $illegal . '.,\t ?_';
470471

471472
$out = "=?$charset?Q?";
472473
$out .= preg_replace_callback( "/[$replace]/",

includes/parser/Preprocessor_Hash.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@
3232
// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
3333
class Preprocessor_Hash extends Preprocessor {
3434
/** Cache format version */
35-
protected const CACHE_VERSION = 4;
35+
protected const CACHE_VERSION = 5;
3636

3737
/** @var int|false Min wikitext size for which to cache DOM tree */
3838
protected $cacheThreshold;
3939

40+
private ?string $configurationHash = null;
41+
4042
/**
4143
* @see Preprocessor::__construct()
4244
* @param Parser $parser
@@ -96,6 +98,20 @@ public function newPartNodeArray( $values ) {
9698
return new PPNode_Hash_Array( $list );
9799
}
98100

101+
private function getConfigurationHash(): string {
102+
if ( $this->configurationHash ) {
103+
return $this->configurationHash;
104+
}
105+
106+
$configs = [
107+
'tags' => $this->parser->getTags(),
108+
];
109+
sort( $configs['tags'] );
110+
$this->configurationHash = sha1( json_encode( $configs ) );
111+
112+
return $this->configurationHash;
113+
}
114+
99115
/** @inheritDoc */
100116
public function preprocessToObj( $text, $flags = 0 ) {
101117
if ( $this->disableLangConversion ) {
@@ -110,7 +126,8 @@ public function preprocessToObj( $text, $flags = 0 ) {
110126
( $flags & self::DOM_UNCACHED ) != self::DOM_UNCACHED
111127
) {
112128
$domTreeJson = $this->wanCache->getWithSetCallback(
113-
$this->wanCache->makeKey( 'preprocess-hash', sha1( $text ), $flags ),
129+
$this->wanCache->makeKey(
130+
'preprocess-hash', $this->getConfigurationHash(), sha1( $text ), $flags ),
114131
$this->wanCache::TTL_DAY,
115132
function () use ( $text, $flags, &$domTreeArray ) {
116133
$domTreeArray = $this->buildDomTreeArrayFromText( $text, $flags );

languages/i18n/alt.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"morenotlisted": "Бу тизим јеткил эмес болор аргалу.",
4242
"mypage": "Бӱк",
4343
"mytalk": "Шӱӱжӱ",
44+
"mytalk-appeal-submit": "Кӧндӱгер",
4445
"anontalk": "Шӱӱжӱ",
4546
"navigation": "Навигация",
4647
"and": "&#32;ле",
@@ -608,8 +609,8 @@
608609
"semiprotectedpagewarning": "<strong>Ајарту:</strong> Бу бӱк коруда болгон; оны јӱк ле автоматикалык јӧптӧлгӧн туружаачылар тӱзедер аргалу.\nАлдында болуш этире журналдыҥ калганчы бичимели берилди:",
609610
"cascadeprotectedwarning": "<strong>Ајару:</strong> Бу бӱк корулалган болгон, оны тӱзедерге јӱк ле [[Special:ListGroupRights|аҥылу аргаларлу]] туружаачылар аргалу, нениҥ учун дезе бу бӱк ээчий иштеер корылталу {{PLURAL:$1|бӱкке кирет|бӱктерге кирет}}:",
610611
"titleprotectedwarning": "<strong>Ајарту: Бу бӱк коруда болгон; оны јӱк ле [[Special:ListGroupRights|аҥылу аргаларлу]] туружаачылар баштаар аргалу.</strong>\nАлдында болуш этире журналдыҥ калганчы бичимели берилди:",
611-
"templatesused": "Бу бӱкте эдинген {{PLURAL:$1|ӱлекер}}:",
612-
"templatesusedpreview": "Эдинип турган {{PLURAL:$1|Ӱлекер}} бу озолоткон кӧргӱзӱде:",
612+
"templatesused": "Бу бӱкте эдинген {{PLURAL:$1|бӱктер}}:",
613+
"templatesusedpreview": "Эдинип турган {{PLURAL:$1|бӱктер}} бу озолоткон кӧргӱзӱде:",
613614
"templatesusedsection": "Бу бӧлӱкте эдинген {{PLURAL:$1|ӱлекер}}:",
614615
"template-protected": "(корулалган)",
615616
"template-semiprotected": "(јарымдай корулаган)",
@@ -3940,7 +3941,7 @@
39403941
"newpages-showhide-redirect": "$1 ууландырыштарды",
39413942
"newpages-showhide-registered": "$1 регистрациялу турган туружаачыларды",
39423943
"blockedtext-made-by": "$1 администратор туйуктаган.",
3943-
"blockedtext-reason-comment": "Туйукташтыҥ шылтагы <em>$1</em>.",
3944+
"blockedtext-reason-comment": "Туйукташтыҥ шылтагы: <em>$1</em>.",
39443945
"blockedtext-start-time": "Туйукташтыҥ башталганы: $1",
39453946
"blockedtext-expiration-time": "Туйукташтыҥ божоор ӧйи: $1",
39463947
"blockedtext-expiration-longest-block": "Эҥ ле узак болотон туйукташтыҥ ӧйи: $1",

0 commit comments

Comments
 (0)