MediaWiki master
SpecialUndelete.php
Go to the documentation of this file.
1<?php
6
7namespace MediaWiki\Specials;
8
9use MediaWiki\ChangeTags\ChangeTagsFormatter;
10use MediaWiki\CommentFormatter\CommentFormatter;
11use MediaWiki\CommentStore\CommentStore;
12use MediaWiki\Content\IContentHandlerFactory;
13use MediaWiki\Content\TextContent;
14use MediaWiki\Context\DerivativeContext;
15use MediaWiki\EditPage\DataStashTrait;
16use MediaWiki\Exception\ErrorPageError;
17use MediaWiki\Exception\PermissionsError;
18use MediaWiki\Exception\UserBlockedError;
19use MediaWiki\FileRepo\File\ArchivedFile;
20use MediaWiki\FileRepo\File\File;
21use MediaWiki\FileRepo\LocalRepo;
22use MediaWiki\FileRepo\RepoGroup;
23use MediaWiki\Html\Html;
24use MediaWiki\Linker\Linker;
25use MediaWiki\Linker\LinkTarget;
26use MediaWiki\Logging\LogEventsList;
27use MediaWiki\Logging\LogPage;
28use MediaWiki\MainConfigNames;
29use MediaWiki\Message\Message;
30use MediaWiki\Page\LinkBatch;
31use MediaWiki\Page\LinkBatchFactory;
32use MediaWiki\Page\PageArchive;
33use MediaWiki\Page\UndeletePage;
34use MediaWiki\Page\UndeletePageFactory;
35use MediaWiki\Page\WikiPageFactory;
36use MediaWiki\Parser\ParserOptions;
37use MediaWiki\Permissions\PermissionManager;
38use MediaWiki\Permissions\PermissionStatus;
39use MediaWiki\RecentChanges\ChangesList;
40use MediaWiki\Revision\ArchivedRevisionLookup;
41use MediaWiki\Revision\RevisionAccessException;
42use MediaWiki\Revision\RevisionArchiveRecord;
43use MediaWiki\Revision\RevisionRecord;
44use MediaWiki\Revision\RevisionRenderer;
45use MediaWiki\Revision\RevisionStore;
46use MediaWiki\Revision\SlotRecord;
47use MediaWiki\Search\SearchEngineFactory;
48use MediaWiki\SpecialPage\SpecialPage;
49use MediaWiki\Storage\NameTableAccessException;
50use MediaWiki\Storage\NameTableStore;
51use MediaWiki\Title\Title;
52use MediaWiki\User\Options\UserOptionsLookup;
53use MediaWiki\User\User;
54use MediaWiki\User\UserIdentityValue;
55use MediaWiki\Watchlist\WatchlistManager;
56use OOUI\ActionFieldLayout;
57use OOUI\ButtonInputWidget;
58use OOUI\CheckboxInputWidget;
59use OOUI\DropdownInputWidget;
60use OOUI\FieldLayout;
61use OOUI\FieldsetLayout;
62use OOUI\FormLayout;
63use OOUI\HorizontalLayout;
64use OOUI\HtmlSnippet;
65use OOUI\Layout;
66use OOUI\PanelLayout;
67use OOUI\TextInputWidget;
68use OOUI\Widget;
69use Wikimedia\Rdbms\IConnectionProvider;
70use Wikimedia\Rdbms\IDBAccessObject;
71use Wikimedia\Rdbms\IResultWrapper;
72use Wikimedia\Timestamp\TimestampFormat as TS;
73
81 use DataStashTrait;
82
87 private const REVISION_HISTORY_LIMIT = 500;
88
90 private $mAction;
92 private $mTarget;
94 private $mTimestamp;
96 private $mRestore;
98 private $mRevdel;
100 private $mInvert;
102 private $mFilename;
104 private $mTargetTimestamp = [];
106 private $mAllowed;
108 private $mCanView;
110 private $mComment = '';
112 private $mToken;
114 private $mPreview;
116 private $mDiff;
118 private $mDiffOnly;
120 private $mUnsuppress;
122 private $mFileVersions = [];
124 private $mUndeleteTalk;
126 private $mHistoryOffset;
127
129 private $mTargetObj;
133 private $mSearchPrefix;
134
135 private bool $reauthInProgress = false;
136
137 private ?string $reauthOperation = null;
138
139 private LocalRepo $localRepo;
140
141 public function __construct(
142 private readonly PermissionManager $permissionManager,
143 private readonly RevisionStore $revisionStore,
144 private readonly RevisionRenderer $revisionRenderer,
145 private readonly IContentHandlerFactory $contentHandlerFactory,
146 private readonly NameTableStore $changeTagDefStore,
147 private readonly LinkBatchFactory $linkBatchFactory,
148 RepoGroup $repoGroup,
149 private readonly IConnectionProvider $dbProvider,
150 private readonly UserOptionsLookup $userOptionsLookup,
151 private readonly WikiPageFactory $wikiPageFactory,
152 private readonly SearchEngineFactory $searchEngineFactory,
153 private readonly UndeletePageFactory $undeletePageFactory,
154 private readonly ArchivedRevisionLookup $archivedRevisionLookup,
155 private readonly CommentFormatter $commentFormatter,
156 private readonly WatchlistManager $watchlistManager,
157 private readonly ChangeTagsFormatter $changeTagsFormatter,
158 ) {
159 parent::__construct( 'Undelete' );
160 $this->localRepo = $repoGroup->getLocalRepo();
161 }
162
164 public function getRestriction(): string {
165 return 'deletedhistory';
166 }
167
169 public function doesWrites() {
170 return true;
171 }
172
173 public function getTitle(): Title {
174 return $this->mTargetObj
175 ? $this->getPageTitle( $this->mTargetObj->getPrefixedText() )
176 : $this->getPageTitle();
177 }
178
179 private function getStashKeyForTitle( Title $title ): string {
180 return $this->getName() . ':' . $title->getPrefixedDBkey();
181 }
182
187 private function parseSubmittedFormFields( array $values ): void {
188 $commentList = $values['wpCommentList'] ?? 'other';
189 $comment = $values['wpComment'] ?? '';
190 if ( $commentList === 'other' ) {
191 $this->mComment = $comment;
192 } elseif ( $comment !== '' ) {
193 $this->mComment = $commentList
194 . $this->msg( 'colon-separator' )->inContentLanguage()->text()
195 . $comment;
196 } else {
197 $this->mComment = $commentList;
198 }
199
200 $this->mUnsuppress = !empty( $values['wpUnsuppress'] )
201 && $this->permissionManager->userHasRight( $this->getUser(), 'suppressrevision' );
202 // A browser sends a checkbox only if the user selects it. Older form HTML
203 // sends an empty value, so accept the key alone.
204 $this->mUndeleteTalk = array_key_exists( 'undeletetalk', $values );
205
206 $timestamps = [];
207 $this->mFileVersions = [];
208 foreach ( $values as $key => $val ) {
209 $matches = [];
210 if ( preg_match( '/^ts(\d{14})$/', $key, $matches ) ) {
211 $timestamps[] = $matches[1];
212 } elseif ( preg_match( '/^fileid(\d+)$/', $key, $matches ) ) {
213 $this->mFileVersions[] = (int)$matches[1];
214 }
215 }
216 rsort( $timestamps );
217 $this->mTargetTimestamp = $timestamps;
218 }
219
223 protected function handleRetrievedData( array $data ): void {
224 $this->parseSubmittedFormFields( $data );
225 if ( $this->mAllowed ) {
226 $this->mAction = 'submit';
227 $this->mRestore = true;
228 }
229 }
230
231 private function loadRequest( ?string $par ) {
232 $request = $this->getRequest();
233 $user = $this->getUser();
234
235 $this->mAction = $request->getRawVal( 'action' );
236 if ( $par !== null && $par !== '' ) {
237 $this->mTarget = $par;
238 } else {
239 $this->mTarget = $request->getVal( 'target' );
240 }
241
242 $this->mTargetObj = null;
243
244 if ( $this->mTarget !== null && $this->mTarget !== '' ) {
245 $this->mTargetObj = Title::newFromText( $this->mTarget );
246 }
247
248 $this->mSearchPrefix = $request->getText( 'prefix' );
249 $time = $request->getVal( 'timestamp' );
250 $this->mTimestamp = $time ? wfTimestamp( TS::MW, $time ) : '';
251 $this->mFilename = $request->getVal( 'file' );
252
253 $posted = $request->wasPosted() &&
254 $user->matchEditToken( $request->getVal( 'wpEditToken' ) );
255 $this->mRestore = $request->getCheck( 'restore' ) && $posted;
256 $this->mRevdel = $request->getCheck( 'revdel' ) && $posted;
257 $this->mInvert = $request->getCheck( 'invert' ) && $posted;
258 $this->mPreview = $request->getCheck( 'preview' ) && $posted;
259 $this->mDiff = $request->getCheck( 'diff' );
260 $this->mDiffOnly = $request->getBool( 'diffonly',
261 $this->userOptionsLookup->getOption( $this->getUser(), 'diffonly' ) );
262 $this->mToken = $request->getVal( 'token' );
263 $this->mHistoryOffset = $request->getVal( 'historyoffset' );
264
265 $this->parseSubmittedFormFields( $request->getValues() );
266
267 if ( $this->isAllowed( 'undelete' ) ) {
268 $this->mAllowed = true; // user can restore
269 $this->mCanView = true; // user can view content
270 } elseif ( $this->isAllowed( 'deletedtext' ) ) {
271 $this->mAllowed = false; // user cannot restore
272 $this->mCanView = true; // user can view content
273 $this->mRestore = false;
274 } else { // user can only view the list of revisions
275 $this->mAllowed = false;
276 $this->mCanView = false;
277 $this->mTimestamp = '';
278 $this->mRestore = false;
279 }
280 }
281
290 protected function isAllowed( $permission, ?User $user = null ) {
291 $user ??= $this->getUser();
292 $block = $user->getBlock();
293
294 if ( $this->mTargetObj !== null ) {
295 return $this->permissionManager->userCan( $permission, $user, $this->mTargetObj );
296 } else {
297 $hasRight = $this->permissionManager->userHasRight( $user, $permission );
298 $sitewideBlock = $block && $block->isSitewide();
299 return $permission === 'undelete' ? ( $hasRight && !$sitewideBlock ) : $hasRight;
300 }
301 }
302
304 public function userCanExecute( User $user ) {
305 return $this->isAllowed( $this->getRestriction(), $user );
306 }
307
311 public function checkPermissions() {
312 $user = $this->getUser();
313
314 // First check if user has the right to use this page. If not,
315 // show a permissions error whether they are blocked or not.
316 if ( !parent::userCanExecute( $user ) ) {
318 }
319
320 // If a user has the right to use this page, but is blocked from
321 // the target, show a block error.
322 if (
323 $this->mTargetObj && $this->permissionManager->isBlockedFrom( $user, $this->mTargetObj ) ) {
324 // @phan-suppress-next-line PhanTypeMismatchArgumentNullable Block is checked and not null
325 throw new UserBlockedError( $user->getBlock() );
326 }
327
328 // Finally, do the comprehensive permission check via isAllowed.
329 if ( !$this->userCanExecute( $user ) ) {
331 }
332
333 // Capture whether an undelete on this target would require reauth, so
334 // the form can show a lock icon on the submit button.
335 if ( $this->mTargetObj !== null ) {
336 $status = $this->permissionManager->getPermissionStatus(
337 'undelete', $user, $this->mTargetObj, PermissionManager::RIGOR_FULL
338 );
339 $this->reauthOperation = $status->getReauthOperation();
340 }
341 }
342
344 public function execute( $par ) {
346
347 $user = $this->getUser();
348
349 $this->setHeaders();
350 $this->outputHeader();
351 $this->addHelpLink( 'Help:Deletion_and_undeletion' );
352
353 $this->loadRequest( $par );
354 $this->checkPermissions(); // Needs to be after mTargetObj is set
355
356 $out = $this->getOutput();
357 // This page uses Html::warningBox and Html::errorBox
358 $out->addModuleStyles( 'mediawiki.codex.messagebox.styles' );
359
360 if ( $this->mTargetObj === null ) {
361 $out->addWikiMsg( 'undelete-header' );
362
363 # Not all users can just browse every deleted page from the list
364 if ( $this->permissionManager->userHasRight( $user, 'browsearchive' ) ) {
365 $this->showSearchForm();
366 }
367
368 return;
369 }
370
371 $this->addHelpLink( 'Help:Undelete' );
372 if ( $this->mAllowed ) {
373 $out->setPageTitleMsg( $this->msg( 'undeletepage' ) );
374 } else {
375 $out->setPageTitleMsg( $this->msg( 'viewdeletedpage' ) );
376 }
377
378 $this->getSkin()->setRelevantTitle( $this->mTargetObj );
379
380 // Resume from a stashed submit after reauth. Must come before the
381 // dispatch below, since the return trip is a GET with no form fields.
382 $this->setStashKey( $this->getStashKeyForTitle( $this->mTargetObj ) );
383 if ( $this->retrieveStashedData() ) {
384 $this->undelete();
385 if ( !$this->reauthInProgress ) {
386 $this->destroyStashedData();
387 }
388 return;
389 }
390
391 if ( $this->mTimestamp !== '' ) {
392 $this->showRevision( $this->mTimestamp );
393 } elseif ( $this->mFilename !== null && $this->mTargetObj->inNamespace( NS_FILE ) ) {
394 $file = new ArchivedFile( $this->mTargetObj, 0, $this->mFilename );
395 // Check if user is allowed to see this file
396 if ( !$file->exists() ) {
397 $out->addWikiMsg( 'filedelete-nofile', $this->mFilename );
398 } elseif ( !$file->userCan( File::DELETED_FILE, $user ) ) {
399 if ( $file->isDeleted( File::DELETED_RESTRICTED ) ) {
400 throw new PermissionsError( 'suppressrevision' );
401 } else {
402 throw new PermissionsError( 'deletedtext' );
403 }
404 } elseif ( !$user->matchEditToken( $this->mToken, $this->mFilename ) ) {
405 $this->showFileConfirmationForm( $this->mFilename );
406 } else {
407 $this->showFile( $this->mFilename );
408 }
409 } elseif ( $this->mAction === 'submit' ) {
410 if ( $this->mRestore ) {
411 $this->undelete();
412 } elseif ( $this->mRevdel ) {
413 $this->redirectToRevDel();
414 }
415 } elseif ( $this->mAction === 'render' ) {
416 $this->showMoreHistory();
417 } else {
418 $this->showHistory();
419 }
420 }
421
426 private function redirectToRevDel() {
427 $revisionIds = [];
428 $fileArchiveIds = [];
429
430 foreach ( $this->getRequest()->getValues() as $key => $val ) {
431 $matches = [];
432 if ( preg_match( "/^ts(\d{14})$/", $key, $matches ) ) {
433 $revisionRecord = $this->archivedRevisionLookup
434 ->getRevisionRecordByTimestamp( $this->mTargetObj, $matches[1] );
435 if ( $revisionRecord ) {
436 $revisionIds[] = (int)$revisionRecord->getId();
437 }
438 } elseif ( preg_match( '/^fileid(\d+)$/', $key, $matches ) ) {
439 $fileArchiveIds[] = (int)$matches[1];
440 }
441 }
442
443 $hasRevisions = count( $revisionIds ) > 0;
444 $hasFiles = count( $fileArchiveIds ) > 0;
445
446 // Check selection validity, see if mixed or nothing selected
447 if ( $hasRevisions && $hasFiles ) {
448 $this->renderUndeleteSelectionError( 'mixed' );
449 return;
450 } elseif ( !$hasRevisions && !$hasFiles ) {
451 $this->renderUndeleteSelectionError( 'none' );
452 return;
453 }
454
455 // Exp. assoc array of id => 1 (ids[123]=1)
456 $idsForQuery = $hasFiles
457 ? array_fill_keys( $fileArchiveIds, 1 )
458 : array_fill_keys( $revisionIds, 1 );
459
460 $query = [
461 'type' => $hasFiles ? 'filearchive' : 'revision',
462 'ids' => $idsForQuery,
463 'target' => $this->mTargetObj->getPrefixedText()
464 ];
465
466 $url = SpecialPage::getTitleFor( 'Revisiondelete' )->getFullURL( $query );
467 $this->getOutput()->redirect( $url );
468 }
469
475 private function renderUndeleteSelectionError( string $case ): void {
476 $msg = $case === 'mixed'
477 ? $this->msg( 'undelete-error-mixed' )
478 : $this->msg( 'undelete-error-none' );
479
480 $this->getOutput()->addHTML( Html::errorBox( $msg->parse() ) );
481 }
482
483 private function showSearchForm() {
484 $out = $this->getOutput();
485 $out->setPageTitleMsg( $this->msg( 'undelete-search-title' ) );
486 $fuzzySearch = $this->getRequest()->getVal( 'fuzzy', '1' );
487
488 $out->enableOOUI();
489
490 $fields = [];
491 $fields[] = new ActionFieldLayout(
492 new TextInputWidget( [
493 'name' => 'prefix',
494 'inputId' => 'prefix',
495 'infusable' => true,
496 'value' => $this->mSearchPrefix,
497 'autofocus' => true,
498 ] ),
499 new ButtonInputWidget( [
500 'label' => $this->msg( 'undelete-search-submit' )->text(),
501 'flags' => [ 'primary', 'progressive' ],
502 'inputId' => 'searchUndelete',
503 'type' => 'submit',
504 ] ),
505 [
506 'label' => new HtmlSnippet(
507 $this->msg(
508 $fuzzySearch ? 'undelete-search-full' : 'undelete-search-prefix'
509 )->parse()
510 ),
511 'align' => 'left',
512 ]
513 );
514
515 $fieldset = new FieldsetLayout( [
516 'label' => $this->msg( 'undelete-search-box' )->text(),
517 'items' => $fields,
518 ] );
519
520 $form = new FormLayout( [
521 'method' => 'get',
522 'action' => wfScript(),
523 ] );
524
525 $form->appendContent(
526 $fieldset,
527 new HtmlSnippet(
528 Html::hidden( 'title', $this->getPageTitle()->getPrefixedDBkey() ) .
529 Html::hidden( 'fuzzy', $fuzzySearch )
530 )
531 );
532
533 $out->addHTML(
534 ( new PanelLayout( [
535 'expanded' => false,
536 'padded' => true,
537 'framed' => true,
538 'content' => $form,
539 ] ) )->toString()
540 );
541
542 # List undeletable articles
543 if ( $this->mSearchPrefix ) {
544 // For now, we enable search engine match only when specifically asked to
545 // by using fuzzy=1 parameter.
546 if ( $fuzzySearch ) {
547 $result = PageArchive::listPagesBySearch( $this->mSearchPrefix );
548 } else {
549 $result = PageArchive::listPagesByPrefix( $this->mSearchPrefix );
550 }
551 $this->showList( $result );
552 }
553 }
554
561 private function showList( $result ) {
562 $out = $this->getOutput();
563
564 if ( $result->numRows() == 0 ) {
565 $out->addWikiMsg( 'undelete-no-results' );
566
567 return false;
568 }
569
570 $out->addWikiMsg( 'undeletepagetext', $this->getLanguage()->formatNum( $result->numRows() ) );
571
572 $linkRenderer = $this->getLinkRenderer();
573 $undelete = $this->getPageTitle();
574 $out->addHTML( "<ul id='undeleteResultsList'>\n" );
575 foreach ( $result as $row ) {
576 $title = Title::makeTitleSafe( $row->ar_namespace, $row->ar_title );
577 if ( $title !== null ) {
578 $item = $linkRenderer->makeKnownLink(
579 $undelete,
580 $title->getPrefixedText(),
581 [],
582 [ 'target' => $title->getPrefixedText() ]
583 );
584 } else {
585 // The title is no longer valid, show as text
586 $item = Html::element(
587 'span',
588 [ 'class' => 'mw-invalidtitle' ],
589 Linker::getInvalidTitleDescription(
590 $this->getContext(),
591 $row->ar_namespace,
592 $row->ar_title
593 )
594 );
595 }
596 $revs = $this->msg( 'undeleterevisions' )->numParams( $row->count )->parse();
597 $out->addHTML(
598 Html::rawElement(
599 'li',
600 [ 'class' => 'undeleteResult' ],
601 $item . $this->msg( 'word-separator' )->escaped() .
602 $this->msg( 'parentheses' )->rawParams( $revs )->escaped()
603 )
604 );
605 }
606 $result->free();
607 $out->addHTML( "</ul>\n" );
608
609 return true;
610 }
611
612 private function showRevision( string $timestamp ) {
613 if ( !preg_match( '/[0-9]{14}/', $timestamp ) ) {
614 return;
615 }
616 $out = $this->getOutput();
617 $out->addModuleStyles( 'mediawiki.interface.helpers.styles' );
618
619 // When viewing a specific revision, add a subtitle link back to the overall
620 // history, see T284114
621 $listLink = $this->getLinkRenderer()->makeKnownLink(
622 $this->getPageTitle(),
623 $this->msg( 'undelete-back-to-list' )->text(),
624 [],
625 [ 'target' => $this->mTargetObj->getPrefixedText() ]
626 );
627 // same < arrow as with subpages
628 $subtitle = "&lt; $listLink";
629 $out->setSubtitle( $subtitle );
630
631 $archive = new PageArchive( $this->mTargetObj );
632 // FIXME: This hook must be deprecated, passing PageArchive by ref is awful.
633 if ( !$this->getHookRunner()->onUndeleteForm__showRevision(
634 $archive, $this->mTargetObj )
635 ) {
636 return;
637 }
638 $revRecord = $this->archivedRevisionLookup->getRevisionRecordByTimestamp( $this->mTargetObj, $timestamp );
639
640 $user = $this->getUser();
641
642 if ( !$revRecord ) {
643 $out->addWikiMsg( 'undeleterevision-missing' );
644 return;
645 }
646
647 if ( $revRecord->isDeleted( RevisionRecord::DELETED_TEXT ) ) {
648 // Used in wikilinks, should not contain whitespaces
649 $titleText = $this->mTargetObj->getPrefixedURL();
650 if ( !$revRecord->userCan( RevisionRecord::DELETED_TEXT, $this->getAuthority() ) ) {
651 $msg = $revRecord->isDeleted( RevisionRecord::DELETED_RESTRICTED )
652 ? [ 'rev-suppressed-text-permission', $titleText ]
653 : [ 'rev-deleted-text-permission', $titleText ];
654 $out->addHTML(
655 Html::warningBox(
656 $this->msg( $msg[0], $msg[1] )->parse(),
657 'plainlinks'
658 )
659 );
660 return;
661 }
662
663 $msg = $revRecord->isDeleted( RevisionRecord::DELETED_RESTRICTED )
664 ? [ 'rev-suppressed-text-view', $titleText ]
665 : [ 'rev-deleted-text-view', $titleText ];
666 $out->addHTML(
667 Html::warningBox(
668 $this->msg( $msg[0], $msg[1] )->parse(),
669 'plainlinks'
670 )
671 );
672 // and we are allowed to see...
673 }
674
675 if ( $this->mDiff ) {
676 $previousRevRecord = $this->archivedRevisionLookup
677 ->getPreviousRevisionRecord( $this->mTargetObj, $timestamp );
678 if ( $previousRevRecord ) {
679 $this->showDiff( $previousRevRecord, $revRecord );
680 if ( $this->mDiffOnly ) {
681 return;
682 }
683
684 $out->addHTML( '<hr />' );
685 } else {
686 $out->addWikiMsg( 'undelete-nodiff' );
687 }
688 }
689
690 $link = $this->getLinkRenderer()->makeKnownLink(
691 $this->getPageTitle( $this->mTargetObj->getPrefixedDBkey() ),
692 $this->mTargetObj->getPrefixedText()
693 );
694
695 $lang = $this->getLanguage();
696
697 // date and time are separate parameters to facilitate localisation.
698 // $time is kept for backward compat reasons.
699 $time = $lang->userTimeAndDate( $timestamp, $user );
700 $d = $lang->userDate( $timestamp, $user );
701 $t = $lang->userTime( $timestamp, $user );
702 $userLink = Linker::revUserTools( $revRecord );
703
704 try {
705 $content = $revRecord->getContent(
706 SlotRecord::MAIN,
707 RevisionRecord::FOR_THIS_USER,
708 $user
709 );
710 } catch ( RevisionAccessException ) {
711 $content = null;
712 }
713
714 // TODO: MCR: this will have to become something like $hasTextSlots and $hasNonTextSlots
715 $isText = ( $content instanceof TextContent );
716
717 $undeleteRevisionContent = '';
718 // Revision delete links
719 if ( !$this->mDiff ) {
720 $revdel = Linker::getRevDeleteLink(
721 $user,
722 $revRecord,
723 $this->mTargetObj
724 );
725 if ( $revdel ) {
726 $undeleteRevisionContent = $revdel . ' ';
727 }
728 }
729
730 $undeleteRevisionContent .= $out->msg(
731 'undelete-revision',
732 Message::rawParam( $link ),
733 $time,
734 Message::rawParam( $userLink ),
735 $d,
736 $t
737 )->parseAsBlock();
738
739 if ( $this->mPreview || $isText ) {
740 $out->addHTML(
741 Html::warningBox(
742 $undeleteRevisionContent,
743 'mw-undelete-revision'
744 )
745 );
746 } else {
747 $out->addHTML(
748 Html::rawElement(
749 'div',
750 [ 'class' => 'mw-undelete-revision', ],
751 $undeleteRevisionContent
752 )
753 );
754 }
755
756 if ( $this->mPreview || !$isText ) {
757 // NOTE: non-text content has no source view, so always use rendered preview
758
759 $popts = ParserOptions::newFromContext( $this->getContext() );
760
761 try {
762 $rendered = $this->revisionRenderer->getRenderedRevision(
763 $revRecord,
764 $popts,
765 $user,
766 [ 'audience' => RevisionRecord::FOR_THIS_USER, 'causeAction' => 'undelete-preview' ]
767 );
768
769 // Fail hard if the audience check fails, since we already checked
770 // at the beginning of this method.
771 $pout = $rendered->getRevisionParserOutput();
772
773 $popts->setSuppressSectionEditLinks();
774 $out->addParserOutput( $pout, $popts );
775 // The deleted revision is not the current revision of a page.
776 // Remove its timestamp, so the footer does not show it as the
777 // "last edited" time.
778 $out->getMetadata()->setRevisionTimestamp( null );
779 } catch ( RevisionAccessException ) {
780 }
781 }
782
783 $out->enableOOUI();
784 $buttonFields = [];
785
786 if ( $isText ) {
787 '@phan-var TextContent $content';
788 // TODO: MCR: make this work for multiple slots
789 // source view for textual content
790 $sourceView = Html::element( 'textarea', [
791 'class' => 'mw-undelete-textarea',
792 'readonly' => 'readonly',
793 'cols' => 80,
794 'rows' => 25
795 ], $content->getText() . "\n" );
796
797 $buttonFields[] = new ButtonInputWidget( [
798 'type' => 'submit',
799 'name' => 'preview',
800 'label' => $this->msg( 'showpreview' )->text()
801 ] );
802 } else {
803 $sourceView = '';
804 }
805
806 $buttonFields[] = new ButtonInputWidget( [
807 'name' => 'diff',
808 'type' => 'submit',
809 'label' => $this->msg( 'showdiff' )->text()
810 ] );
811
812 $out->addHTML(
813 $sourceView .
814 Html::openElement( 'div', [
815 'style' => 'clear: both' ] ) .
816 Html::openElement( 'form', [
817 'method' => 'post',
818 'action' => $this->getPageTitle()->getLocalURL( [ 'action' => 'submit' ] ) ] ) .
819 Html::element( 'input', [
820 'type' => 'hidden',
821 'name' => 'target',
822 'value' => $this->mTargetObj->getPrefixedDBkey() ] ) .
823 Html::element( 'input', [
824 'type' => 'hidden',
825 'name' => 'timestamp',
826 'value' => $timestamp ] ) .
827 Html::element( 'input', [
828 'type' => 'hidden',
829 'name' => 'wpEditToken',
830 'value' => $user->getEditToken() ] ) .
831 new FieldLayout(
832 new Widget( [
833 'content' => new HorizontalLayout( [
834 'items' => $buttonFields
835 ] )
836 ] )
837 ) .
838 Html::closeElement( 'form' ) .
839 Html::closeElement( 'div' )
840 );
841 }
842
850 private function showDiff(
851 RevisionRecord $previousRevRecord,
852 RevisionRecord $currentRevRecord
853 ) {
854 $currentTitle = Title::newFromPageIdentity( $currentRevRecord->getPage() );
855
856 $diffContext = new DerivativeContext( $this->getContext() );
857 $diffContext->setTitle( $currentTitle );
858 $diffContext->setWikiPage( $this->wikiPageFactory->newFromTitle( $currentTitle ) );
859
860 $contentModel = $currentRevRecord->getSlot(
861 SlotRecord::MAIN,
862 RevisionRecord::RAW
863 )->getModel();
864
865 $diffEngine = $this->contentHandlerFactory->getContentHandler( $contentModel )
866 ->createDifferenceEngine( $diffContext );
867
868 $diffEngine->setRevisions( $previousRevRecord, $currentRevRecord );
869 $diffEngine->showDiffStyle();
870 $formattedDiff = $diffEngine->getDiff(
871 $this->diffHeader( $previousRevRecord, 'o' ),
872 $this->diffHeader( $currentRevRecord, 'n' )
873 );
874
875 if ( $formattedDiff === false ) {
876 if ( $diffEngine->hasSuppressedRevision() ) {
877 $error = 'rev-suppressed-no-diff';
878 } elseif ( $diffEngine->hasDeletedRevision() ) {
879 $error = 'rev-deleted-no-diff';
880 } else {
881 // Something else went wrong when loading the diff - at least explain that something was wrong ...
882 $error = 'undelete-error-loading-diff';
883 }
884 $this->getOutput()->addHTML( $this->msg( $error )->parse() );
885 } else {
886 $this->getOutput()->addHTML( "<div>$formattedDiff</div>\n" );
887 }
888 }
889
895 private function diffHeader( RevisionRecord $revRecord, $prefix ) {
896 if ( $revRecord instanceof RevisionArchiveRecord ) {
897 // Revision in the archive table, only viewable via this special page
898 $targetPage = $this->getPageTitle();
899 $targetQuery = [
900 'target' => $this->mTargetObj->getPrefixedText(),
901 'timestamp' => wfTimestamp( TS::MW, $revRecord->getTimestamp() )
902 ];
903 } else {
904 // Revision in the revision table, viewable by oldid
905 $targetPage = $revRecord->getPageAsLinkTarget();
906 $targetQuery = [ 'oldid' => $revRecord->getId() ];
907 }
908
909 // Add show/hide deletion links if available
910 $user = $this->getUser();
911 $lang = $this->getLanguage();
912 $rdel = Linker::getRevDeleteLink( $user, $revRecord, $this->mTargetObj );
913
914 if ( $rdel ) {
915 $rdel = " $rdel";
916 }
917
918 $minor = $revRecord->isMinor() ? ChangesList::flag( 'minor', $this->getContext() ) : '';
919
920 $dbr = $this->dbProvider->getReplicaDatabase();
921 $tagIds = $dbr->newSelectQueryBuilder()
922 ->select( 'ct_tag_id' )
923 ->from( 'change_tag' )
924 ->where( [ 'ct_rev_id' => $revRecord->getId() ] )
925 ->caller( __METHOD__ )->fetchFieldValues();
926 $tags = [];
927 foreach ( $tagIds as $tagId ) {
928 try {
929 $tags[] = $this->changeTagDefStore->getName( (int)$tagId );
930 } catch ( NameTableAccessException ) {
931 continue;
932 }
933 }
934 $tags = implode( ',', $tags );
935 $tagSummary = $this->changeTagsFormatter->formatTagsAsSummaryList(
936 $tags,
937 $this->getContext(),
938 $this->getAuthority()
939 );
940 $asof = $this->getLinkRenderer()->makeLink(
941 $targetPage,
942 $this->msg(
943 'revisionasof',
944 $lang->userTimeAndDate( $revRecord->getTimestamp(), $user ),
945 $lang->userDate( $revRecord->getTimestamp(), $user ),
946 $lang->userTime( $revRecord->getTimestamp(), $user )
947 )->text(),
948 [],
949 $targetQuery
950 );
951 if ( $revRecord->isDeleted( RevisionRecord::DELETED_TEXT ) ) {
952 $asof = Html::rawElement(
953 'span',
954 [ 'class' => Linker::getRevisionDeletedClass( $revRecord ) ],
955 $asof
956 );
957 }
958
959 // FIXME This is reimplementing DifferenceEngine#getRevisionHeader
960 // and partially #showDiffPage, but worse
961 return '<div id="mw-diff-' . $prefix . 'title1"><strong>' .
962 $asof .
963 '</strong></div>' .
964 '<div id="mw-diff-' . $prefix . 'title2">' .
965 Linker::revUserTools( $revRecord ) . '<br />' .
966 '</div>' .
967 '<div id="mw-diff-' . $prefix . 'title3">' .
968 $minor . $this->commentFormatter->formatRevision( $revRecord, $user ) . $rdel . '<br />' .
969 '</div>' .
970 '<div id="mw-diff-' . $prefix . 'title5">' .
971 $tagSummary[0] . '<br />' .
972 '</div>';
973 }
974
979 private function showFileConfirmationForm( $key ) {
980 $out = $this->getOutput();
981 $lang = $this->getLanguage();
982 $user = $this->getUser();
983 $file = new ArchivedFile( $this->mTargetObj, 0, $this->mFilename );
984 $out->addWikiMsg( 'undelete-show-file-confirm',
985 $this->mTargetObj->getText(),
986 $lang->userDate( $file->getTimestamp(), $user ),
987 $lang->userTime( $file->getTimestamp(), $user ) );
988 $out->addHTML(
989 Html::rawElement( 'form', [
990 'method' => 'POST',
991 'action' => $this->getPageTitle()->getLocalURL( [
992 'target' => $this->mTarget,
993 'file' => $key,
994 'token' => $user->getEditToken( $key ),
995 ] ),
996 ],
997 Html::submitButton( $this->msg( 'undelete-show-file-submit' )->text() )
998 )
999 );
1000 }
1001
1006 private function showFile( $key ) {
1007 $this->getOutput()->disable();
1008
1009 # We mustn't allow the output to be CDN cached, otherwise
1010 # if an admin previews a deleted image, and it's cached, then
1011 # a user without appropriate permissions can toddle off and
1012 # nab the image, and CDN will serve it
1013 $response = $this->getRequest()->response();
1014 $response->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' );
1015 $response->header( 'Cache-Control: no-cache, no-store, max-age=0, must-revalidate' );
1016
1017 $path = $this->localRepo->getZonePath( 'deleted' ) . '/' . $this->localRepo->getDeletedHashPath( $key ) . $key;
1018 $this->localRepo->streamFileWithStatus( $path );
1019 }
1020
1021 private function addRevisionsToBatch( LinkBatch $batch, IResultWrapper $revisions ) {
1022 foreach ( $revisions as $row ) {
1023 $batch->addUser( new UserIdentityValue( (int)$row->ar_user, $row->ar_user_text ) );
1024 }
1025 }
1026
1027 private function addFilesToBatch( LinkBatch $batch, IResultWrapper $files ) {
1028 foreach ( $files as $row ) {
1029 $batch->add( NS_USER, $row->fa_user_text );
1030 $batch->add( NS_USER_TALK, $row->fa_user_text );
1031 }
1032 }
1033
1037 protected function showMoreHistory() {
1038 $out = $this->getOutput();
1039 $out->setArticleBodyOnly( true );
1040 $dbr = $this->dbProvider->getReplicaDatabase();
1041 if ( $this->mHistoryOffset ) {
1042 $extraConds = [ $dbr->expr( 'ar_timestamp', '<', $dbr->timestamp( $this->mHistoryOffset ) ) ];
1043 } else {
1044 $extraConds = [];
1045 }
1046 $revisions = $this->archivedRevisionLookup->listArchivedRevisions(
1047 $this->mTargetObj,
1048 $this->getAuthority(),
1049 $extraConds,
1050 self::REVISION_HISTORY_LIMIT + 1
1051 );
1052 $batch = $this->linkBatchFactory->newLinkBatch()->setCaller( __METHOD__ );
1053 $this->addRevisionsToBatch( $batch, $revisions );
1054 $batch->execute();
1055 $out->addHTML( $this->formatRevisionHistory( $revisions ) );
1056
1057 if ( $revisions->numRows() > self::REVISION_HISTORY_LIMIT ) {
1058 // Indicate to JS that the "show more" button should remain active
1059 $out->setStatusCode( 206 );
1060 }
1061 }
1062
1069 protected function formatRevisionHistory( IResultWrapper $revisions ) {
1070 $history = Html::openElement( 'ul', [ 'class' => 'mw-undelete-revlist' ] );
1071
1072 // Exclude the last data row if there is more data than history limit amount
1073 $numRevisions = $revisions->numRows();
1074 $displayCount = min( $numRevisions, self::REVISION_HISTORY_LIMIT );
1075 $firstRev = $this->revisionStore->getFirstRevision( $this->mTargetObj );
1076 $earliestLiveTime = $firstRev ? $firstRev->getTimestamp() : null;
1077
1078 $sizes = [];
1079 foreach ( $revisions as $rev ) {
1080 $sizes[$rev->ar_rev_id] = $rev->ar_len;
1081 }
1082
1083 $revisions->rewind();
1084 for ( $i = 0; $i < $displayCount; $i++ ) {
1085 $row = $revisions->fetchObject();
1086 // The $remaining parameter controls diff links and so must
1087 // include the undisplayed row beyond the display limit.
1088 $history .= $this->formatRevisionRow( $row, $earliestLiveTime, $numRevisions - $i, $sizes );
1089 }
1090 $history .= Html::closeElement( 'ul' );
1091 return $history;
1092 }
1093
1094 protected function showHistory() {
1095 $this->checkReadOnly();
1096
1097 $out = $this->getOutput();
1098 if ( $this->mAllowed ) {
1099 $out->addModules( 'mediawiki.misc-authed-ooui' );
1100 $out->addModuleStyles( 'mediawiki.special' );
1101 }
1102 $out->addModuleStyles( 'mediawiki.interface.helpers.styles' );
1103 $out->addModuleStyles( 'mediawiki.special.changeslist' );
1104
1105 $out->wrapWikiMsg(
1106 "<div class='mw-undelete-pagetitle'>\n$1\n</div>\n",
1107 [ 'undeletepagetitle', wfEscapeWikiText( $this->mTargetObj->getPrefixedText() ) ]
1108 );
1109
1110 $archive = new PageArchive( $this->mTargetObj );
1111 // FIXME: This hook must be deprecated, passing PageArchive by ref is awful.
1112 $this->getHookRunner()->onUndeleteForm__showHistory( $archive, $this->mTargetObj );
1113
1114 $out->addHTML( Html::openElement( 'div', [ 'class' => 'mw-undelete-history' ] ) );
1115 if ( $this->mAllowed ) {
1116 $out->addWikiMsg( 'undeletehistory' );
1117 $out->addWikiMsg( 'undeleterevdel' );
1118 } else {
1119 $out->addWikiMsg( 'undeletehistorynoadmin' );
1120 }
1121 $out->addHTML( Html::closeElement( 'div' ) );
1122
1123 # List all stored revisions
1124 $revisions = $this->archivedRevisionLookup->listArchivedRevisions(
1125 $this->mTargetObj,
1126 $this->getAuthority(),
1127 limit: self::REVISION_HISTORY_LIMIT + 1
1128 );
1129 $files = $archive->listFiles();
1130 $numRevisions = $revisions->numRows();
1131 $showLoadMore = $numRevisions > self::REVISION_HISTORY_LIMIT;
1132 $haveRevisions = $numRevisions > 0;
1133 $haveFiles = $files && $files->numRows() > 0;
1134
1135 # Batch existence check on user and talk pages
1136 if ( $haveRevisions || $haveFiles ) {
1137 $batch = $this->linkBatchFactory->newLinkBatch()->setCaller( __METHOD__ );
1138 $this->addRevisionsToBatch( $batch, $revisions );
1139 if ( $haveFiles ) {
1140 // @phan-suppress-next-line PhanTypeMismatchArgumentNullable -- $files is non-null
1141 $this->addFilesToBatch( $batch, $files );
1142 }
1143 $batch->execute();
1144 }
1145
1146 if ( $this->mAllowed ) {
1147 $out->enableOOUI();
1148
1149 $action = $this->getPageTitle()->getLocalURL( [ 'action' => 'submit' ] );
1150 # Start the form here
1151 $form = new FormLayout( [
1152 'method' => 'post',
1153 'action' => $action,
1154 'id' => 'undelete',
1155 ] );
1156 }
1157
1158 # Show relevant lines from the deletion log:
1159 $deleteLogPage = new LogPage( 'delete' );
1160 $out->addHTML( Html::element( 'h2', [], $deleteLogPage->getName()->text() ) . "\n" );
1161 LogEventsList::showLogExtract( $out, 'delete', $this->mTargetObj );
1162 # Show relevant lines from the suppression log:
1163 $suppressLogPage = new LogPage( 'suppress' );
1164 if ( $this->permissionManager->userHasRight( $this->getUser(), 'suppressionlog' ) ) {
1165 $out->addHTML( Html::element( 'h2', [], $suppressLogPage->getName()->text() ) . "\n" );
1166 LogEventsList::showLogExtract( $out, 'suppress', $this->mTargetObj );
1167 }
1168
1169 if ( $this->mAllowed && ( $haveRevisions || $haveFiles ) ) {
1170 $unsuppressAllowed = $this->permissionManager->userHasRight( $this->getUser(), 'suppressrevision' );
1171 $fields = [];
1172 $fields[] = new Layout( [
1173 'content' => new HtmlSnippet( $this->msg( 'undeleteextrahelp' )->parseAsBlock() )
1174 ] );
1175
1176 $dropdownComment = $this->msg( 'undelete-comment-dropdown' )
1177 ->page( $this->mTargetObj )->inContentLanguage()->text();
1178 // Add additional specific reasons for unsuppress
1179 if ( $unsuppressAllowed ) {
1180 $dropdownComment .= "\n" . $this->msg( 'undelete-comment-dropdown-unsuppress' )
1181 ->page( $this->mTargetObj )->inContentLanguage()->text();
1182 }
1183 $options = Html::listDropdownOptions(
1184 $dropdownComment,
1185 [ 'other' => $this->msg( 'undeletecommentotherlist' )->text() ]
1186 );
1187 $options = Html::listDropdownOptionsOoui( $options );
1188
1189 $fields[] = new FieldLayout(
1190 new DropdownInputWidget( [
1191 'name' => 'wpCommentList',
1192 'inputId' => 'wpCommentList',
1193 'infusable' => true,
1194 'value' => $this->getRequest()->getText( 'wpCommentList', 'other' ),
1195 'options' => $options,
1196 ] ),
1197 [
1198 'label' => $this->msg( 'undeletecomment' )->text(),
1199 'align' => 'top',
1200 ]
1201 );
1202
1203 $fields[] = new FieldLayout(
1204 new TextInputWidget( [
1205 'name' => 'wpComment',
1206 'inputId' => 'wpComment',
1207 'infusable' => true,
1208 'value' => $this->getRequest()->getText( 'wpComment' ),
1209 'autofocus' => true,
1210 // HTML maxlength uses "UTF-16 code units", which means that characters outside BMP
1211 // (e.g. emojis) count for two each. This limit is overridden in JS to instead count
1212 // Unicode codepoints.
1213 'maxLength' => CommentStore::COMMENT_CHARACTER_LIMIT,
1214 ] ),
1215 [
1216 'label' => $this->msg( 'undeleteothercomment' )->text(),
1217 'align' => 'top',
1218 ]
1219 );
1220
1221 if ( $this->getUser()->isRegistered() ) {
1222 $checkWatch = $this->watchlistManager->isWatched( $this->getUser(), $this->mTargetObj )
1223 || $this->getRequest()->getText( 'wpWatch' );
1224 $fields[] = new FieldLayout(
1225 new CheckboxInputWidget( [
1226 'name' => 'wpWatch',
1227 'inputId' => 'mw-undelete-watch',
1228 'value' => '1',
1229 'selected' => $checkWatch,
1230 ] ),
1231 [
1232 'label' => $this->msg( 'watchthis' )->text(),
1233 'align' => 'inline',
1234 ]
1235 );
1236 }
1237
1238 if ( $unsuppressAllowed ) {
1239 $fields[] = new FieldLayout(
1240 new CheckboxInputWidget( [
1241 'name' => 'wpUnsuppress',
1242 'inputId' => 'mw-undelete-unsuppress',
1243 'value' => '1',
1244 ] ),
1245 [
1246 'label' => $this->msg( 'revdelete-unsuppress' )->text(),
1247 'align' => 'inline',
1248 ]
1249 );
1250 }
1251
1252 $undelPage = $this->undeletePageFactory->newUndeletePage(
1253 $this->wikiPageFactory->newFromTitle( $this->mTargetObj ),
1254 $this->getContext()->getAuthority()
1255 );
1256 if ( $undelPage->canProbablyUndeleteAssociatedTalk()->isGood() ) {
1257 $fields[] = new FieldLayout(
1258 new CheckboxInputWidget( [
1259 'name' => 'undeletetalk',
1260 'inputId' => 'mw-undelete-undeletetalk',
1261 'value' => '1',
1262 'selected' => false,
1263 ] ),
1264 [
1265 'label' => $this->msg( 'undelete-undeletetalk' )->text(),
1266 'align' => 'inline',
1267 ]
1268 );
1269 }
1270
1271 $fields[] = new FieldLayout(
1272 new Widget( [
1273 'content' => new HorizontalLayout( [
1274 'items' => [
1275 new ButtonInputWidget( [
1276 'name' => 'restore',
1277 'inputId' => 'mw-undelete-submit',
1278 'value' => '1',
1279 'label' => $this->msg( 'undeletebtn' )->text(),
1280 'flags' => [ 'primary', 'progressive' ],
1281 'type' => 'submit',
1282 ] + ( $this->reauthOperation !== null
1283 ? $this->getReauthLockButtonAttribs()
1284 : [] ) ),
1285 new ButtonInputWidget( [
1286 'name' => 'invert',
1287 'inputId' => 'mw-undelete-invert',
1288 'value' => '1',
1289 'label' => $this->msg( 'undeleteinvert' )->text()
1290 ] ),
1291 ]
1292 ] )
1293 ] )
1294 );
1295
1296 $fieldset = new FieldsetLayout( [
1297 'label' => $this->msg( 'undelete-fieldset-title' )->text(),
1298 'id' => 'mw-undelete-table',
1299 'items' => $fields,
1300 ] );
1301
1302 $link = '';
1303 if ( $this->getAuthority()->isAllowed( 'editinterface' ) ) {
1304 if ( $unsuppressAllowed ) {
1305 $link .= $this->getLinkRenderer()->makeKnownLink(
1306 $this->msg( 'undelete-comment-dropdown-unsuppress' )->inContentLanguage()->getTitle(),
1307 $this->msg( 'undelete-edit-commentlist-unsuppress' )->text(),
1308 [],
1309 [ 'action' => 'edit' ]
1310 );
1311 $link .= $this->msg( 'pipe-separator' )->escaped();
1312 }
1313 $link .= $this->getLinkRenderer()->makeKnownLink(
1314 $this->msg( 'undelete-comment-dropdown' )->inContentLanguage()->getTitle(),
1315 $this->msg( 'undelete-edit-commentlist' )->text(),
1316 [],
1317 [ 'action' => 'edit' ]
1318 );
1319
1320 $link = Html::rawElement( 'p', [ 'class' => 'mw-undelete-editcomments' ], $link );
1321 }
1322
1323 // @phan-suppress-next-line PhanPossiblyUndeclaredVariable form is set, when used here
1324 $form->appendContent(
1325 new PanelLayout( [
1326 'expanded' => false,
1327 'padded' => true,
1328 'framed' => true,
1329 'content' => $fieldset,
1330 ] ),
1331 new HtmlSnippet(
1332 $link .
1333 Html::hidden( 'target', $this->mTarget ) .
1334 Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() )
1335 )
1336 );
1337 }
1338
1339 $history = '';
1340 $history .= Html::element( 'h2', [], $this->msg( 'history' )->text() ) . "\n";
1341
1342 if ( $haveRevisions ) {
1343 # Show the page's stored (deleted) history
1344
1345 if ( $this->mAllowed && $this->permissionManager->userHasRight( $this->getUser(), 'deleterevision' ) ) {
1346 $history .= Html::element(
1347 'button',
1348 [
1349 'name' => 'revdel',
1350 'type' => 'submit',
1351 'class' => [ 'deleterevision-log-submit', 'mw-log-deleterevision-button' ]
1352 ],
1353 $this->msg( 'showhideselectedversions' )->text()
1354 ) . "\n";
1355 }
1356
1357 $history .= $this->formatRevisionHistory( $revisions );
1358
1359 if ( $showLoadMore ) {
1360 $history .= Html::rawElement( 'div', [],
1361 Html::element( 'span', [ 'id' => 'mw-load-more-revisions' ],
1362 $this->msg( 'undelete-load-more-revisions' )->text()
1363 )
1364 ) . "\n";
1365 }
1366 } else {
1367 $out->addWikiMsg( 'nohistory' );
1368 }
1369
1370 if ( $haveFiles ) {
1371 $history .= Html::element( 'h2', [], $this->msg( 'filehist' )->text() ) . "\n";
1372 $history .= Html::openElement( 'ul', [ 'class' => 'mw-undelete-revlist' ] );
1373 foreach ( $files as $row ) {
1374 $history .= $this->formatFileRow( $row );
1375 }
1376 $files->free();
1377 $history .= Html::closeElement( 'ul' );
1378 }
1379
1380 if ( $this->mAllowed ) {
1381 # Slip in the hidden controls here
1382 $misc = Html::hidden( 'target', $this->mTarget );
1383 $misc .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() );
1384 $history .= $misc;
1385
1386 // @phan-suppress-next-line PhanPossiblyUndeclaredVariable form is set, when used here
1387 $form->appendContent( new HtmlSnippet( $history ) );
1388 // @phan-suppress-next-line PhanPossiblyUndeclaredVariable form is set, when used here
1389 $out->addHTML( (string)$form );
1390 } else {
1391 $out->addHTML( $history );
1392 }
1393 }
1394
1402 protected function formatRevisionRow( $row, $earliestLiveTime, $remaining, $sizes ) {
1403 $revRecord = $this->revisionStore->newRevisionFromArchiveRow(
1404 $row,
1405 IDBAccessObject::READ_NORMAL,
1406 $this->mTargetObj
1407 );
1408
1409 $revTextSize = '';
1410 $ts = wfTimestamp( TS::MW, $row->ar_timestamp );
1411 // Build checkboxen...
1412 if ( $this->mAllowed ) {
1413 if ( $this->mInvert ) {
1414 if ( in_array( $ts, $this->mTargetTimestamp ) ) {
1415 $checkBox = Html::check( "ts$ts" );
1416 } else {
1417 $checkBox = Html::check( "ts$ts", true );
1418 }
1419 } else {
1420 $checkBox = Html::check( "ts$ts" );
1421 }
1422 } else {
1423 $checkBox = '';
1424 }
1425
1426 // Build page & diff links...
1427 $user = $this->getUser();
1428 if ( $this->mCanView ) {
1429 $titleObj = $this->getPageTitle();
1430 # Last link
1431 if ( !$revRecord->userCan( RevisionRecord::DELETED_TEXT, $this->getAuthority() ) ) {
1432 $pageLink = htmlspecialchars( $this->getLanguage()->userTimeAndDate( $ts, $user ) );
1433 $last = $this->msg( 'diff' )->escaped();
1434 } elseif ( $remaining > 0 || ( $earliestLiveTime && $ts > $earliestLiveTime ) ) {
1435 $pageLink = $this->getPageLink( $revRecord, $titleObj, $ts );
1436 $last = $this->getLinkRenderer()->makeKnownLink(
1437 $titleObj,
1438 $this->msg( 'diff' )->text(),
1439 [],
1440 [
1441 'target' => $this->mTargetObj->getPrefixedText(),
1442 'timestamp' => $ts,
1443 'diff' => 'prev'
1444 ]
1445 );
1446 } else {
1447 $pageLink = $this->getPageLink( $revRecord, $titleObj, $ts );
1448 $last = $this->msg( 'diff' )->escaped();
1449 }
1450 } else {
1451 $pageLink = htmlspecialchars( $this->getLanguage()->userTimeAndDate( $ts, $user ) );
1452 $last = $this->msg( 'diff' )->escaped();
1453 }
1454
1455 // User links
1456 $userLink = Linker::revUserTools( $revRecord );
1457
1458 // Minor edit
1459 $minor = $revRecord->isMinor() ? ChangesList::flag( 'minor', $this->getContext() ) : '';
1460
1461 // Revision text size
1462 $size = $row->ar_len;
1463 if ( $size !== null ) {
1464 $revTextSize = Linker::formatRevisionSize( $size );
1465 $prevSize = $sizes[$row->ar_parent_id ?? 0] ?? 0;
1466 $sDiff = ChangesList::showCharacterDifference( $prevSize, $size, $this->getContext() );
1467 $revTextSize = "$revTextSize $sDiff";
1468 }
1469
1470 // Edit summary
1471 $comment = $this->commentFormatter->formatRevision( $revRecord, $user );
1472
1473 // Tags
1474 $attribs = [];
1475 [ $tagSummary, $classes ] = $this->changeTagsFormatter->formatTagsAsSummaryList(
1476 $row->ts_tags,
1477 $this->getContext(),
1478 $this->getAuthority()
1479 );
1480 $attribs['class'] = $classes;
1481
1482 $revisionRow = $this->msg( 'undelete-revision-row2' )
1483 ->rawParams(
1484 $checkBox,
1485 $last,
1486 $pageLink,
1487 $userLink,
1488 $minor,
1489 $revTextSize,
1490 $comment,
1491 $tagSummary
1492 )
1493 ->escaped();
1494
1495 return Html::rawElement( 'li', $attribs, $revisionRow ) . "\n";
1496 }
1497
1498 private function formatFileRow( \stdClass $row ): string {
1499 $file = ArchivedFile::newFromRow( $row );
1500 $ts = wfTimestamp( TS::MW, $row->fa_timestamp );
1501 $user = $this->getUser();
1502
1503 $checkBox = '';
1504 if ( $this->mCanView && $row->fa_storage_key ) {
1505 if ( $this->mAllowed ) {
1506 $checkBox = Html::check( 'fileid' . $row->fa_id );
1507 }
1508 $key = urlencode( $row->fa_storage_key );
1509 $pageLink = $this->getFileLink( $file, $this->getPageTitle(), $ts, $key );
1510 } else {
1511 $pageLink = htmlspecialchars( $this->getLanguage()->userTimeAndDate( $ts, $user ) );
1512 }
1513 $userLink = $this->getFileUser( $file );
1514 $data = $this->msg( 'widthheight' )->numParams( $row->fa_width, $row->fa_height )->text();
1515 $bytes = $this->msg( 'parentheses' )
1516 ->plaintextParams( $this->msg( 'nbytes' )->numParams( $row->fa_size )->text() )
1517 ->plain();
1518 $data = htmlspecialchars( $data . ' ' . $bytes );
1519 $comment = $this->getFileComment( $file );
1520
1521 // Add show/hide deletion links if available
1522 $canHide = $this->isAllowed( 'deleterevision' );
1523 if ( $canHide || ( $file->getVisibility() && $this->isAllowed( 'deletedhistory' ) ) ) {
1524 if ( !$file->userCan( File::DELETED_RESTRICTED, $user ) ) {
1525 // Revision was hidden from sysops
1526 $revdlink = Linker::revDeleteLinkDisabled( $canHide );
1527 } else {
1528 $query = [
1529 'type' => 'filearchive',
1530 'target' => $this->mTargetObj->getPrefixedDBkey(),
1531 'ids' => $row->fa_id
1532 ];
1533 $revdlink = Linker::revDeleteLink( $query,
1534 $file->isDeleted( File::DELETED_RESTRICTED ), $canHide );
1535 }
1536 } else {
1537 $revdlink = '';
1538 }
1539
1540 return "<li>$checkBox $revdlink $pageLink . . $userLink $data $comment</li>\n";
1541 }
1542
1551 private function getPageLink( RevisionRecord $revRecord, LinkTarget $target, $ts ) {
1552 $user = $this->getUser();
1553 $time = $this->getLanguage()->userTimeAndDate( $ts, $user );
1554
1555 if ( !$revRecord->userCan( RevisionRecord::DELETED_TEXT, $this->getAuthority() ) ) {
1556 // TODO The condition cannot be true when the function is called
1557 return Html::element(
1558 'span',
1559 [ 'class' => 'history-deleted' ],
1560 $time
1561 );
1562 }
1563
1564 $link = $this->getLinkRenderer()->makeKnownLink(
1565 $target,
1566 $time,
1567 [],
1568 [
1569 'target' => $this->mTargetObj->getPrefixedText(),
1570 'timestamp' => $ts
1571 ]
1572 );
1573
1574 if ( $revRecord->isDeleted( RevisionRecord::DELETED_TEXT ) ) {
1575 $class = Linker::getRevisionDeletedClass( $revRecord );
1576 $link = '<span class="' . $class . '">' . $link . '</span>';
1577 }
1578
1579 return $link;
1580 }
1581
1592 private function getFileLink( $file, LinkTarget $target, $ts, $key ) {
1593 $user = $this->getUser();
1594 $time = $this->getLanguage()->userTimeAndDate( $ts, $user );
1595
1596 if ( !$file->userCan( File::DELETED_FILE, $user ) ) {
1597 return Html::element(
1598 'span',
1599 [ 'class' => 'history-deleted' ],
1600 $time
1601 );
1602 }
1603
1604 if ( $file->exists() ) {
1605 $link = $this->getLinkRenderer()->makeKnownLink(
1606 $target,
1607 $time,
1608 [],
1609 [
1610 'target' => $this->mTargetObj->getPrefixedText(),
1611 'file' => $key,
1612 'token' => $user->getEditToken( $key )
1613 ]
1614 );
1615 } else {
1616 $link = htmlspecialchars( $time );
1617 }
1618
1619 if ( $file->isDeleted( File::DELETED_FILE ) ) {
1620 $link = '<span class="history-deleted">' . $link . '</span>';
1621 }
1622
1623 return $link;
1624 }
1625
1632 private function getFileUser( $file ) {
1633 $uploader = $file->getUploader( File::FOR_THIS_USER, $this->getAuthority() );
1634 if ( !$uploader ) {
1635 return Html::element( 'span',
1636 [ 'class' => 'history-deleted' ],
1637 $this->msg( 'rev-deleted-user' )->text()
1638 );
1639 }
1640
1641 $link = Linker::userLink( $uploader->getId(), $uploader->getName() ) .
1642 Linker::userToolLinks( $uploader->getId(), $uploader->getName() );
1643
1644 if ( $file->isDeleted( File::DELETED_USER ) ) {
1645 $link = Html::rawElement(
1646 'span',
1647 [ 'class' => 'history-deleted' ],
1648 $link
1649 );
1650 }
1651
1652 return $link;
1653 }
1654
1661 private function getFileComment( $file ) {
1662 if ( !$file->userCan( File::DELETED_COMMENT, $this->getAuthority() ) ) {
1663 return Html::rawElement(
1664 'span',
1665 [ 'class' => 'history-deleted' ],
1666 Html::element( 'span',
1667 [ 'class' => 'comment' ],
1668 $this->msg( 'rev-deleted-comment' )->text()
1669 )
1670 );
1671 }
1672
1673 $comment = $file->getDescription( File::FOR_THIS_USER, $this->getAuthority() );
1674 $link = $this->commentFormatter->formatBlock( $comment );
1675
1676 if ( $file->isDeleted( File::DELETED_COMMENT ) ) {
1677 $link = Html::rawElement(
1678 'span',
1679 [ 'class' => 'history-deleted' ],
1680 $link
1681 );
1682 }
1683
1684 return $link;
1685 }
1686
1687 private function undelete() {
1688 $this->reauthInProgress = false;
1689
1690 if ( $this->getConfig()->get( MainConfigNames::UploadMaintenance )
1691 && $this->mTargetObj->getNamespace() === NS_FILE
1692 ) {
1693 throw new ErrorPageError( 'undelete-error', 'filedelete-maintenance' );
1694 }
1695
1696 $this->checkReadOnly();
1697
1698 $out = $this->getOutput();
1699 $undeletePage = $this->undeletePageFactory->newUndeletePage(
1700 $this->wikiPageFactory->newFromTitle( $this->mTargetObj ),
1701 $this->getAuthority()
1702 );
1703 if ( $this->mUndeleteTalk && $undeletePage->canProbablyUndeleteAssociatedTalk()->isGood() ) {
1704 $undeletePage->setUndeleteAssociatedTalk( true );
1705 }
1706 $status = $undeletePage
1707 ->setUndeleteOnlyTimestamps( $this->mTargetTimestamp )
1708 ->setUndeleteOnlyFileVersions( $this->mFileVersions )
1709 ->setUnsuppress( $this->mUnsuppress )
1710 // TODO This is currently duplicating some permission checks, but we do need it (T305680)
1711 ->undeleteIfAllowed( $this->mComment );
1712
1713 if ( !$status->isGood() ) {
1714 if ( $status instanceof PermissionStatus && $status->getReauthOperation() !== null ) {
1715 $this->setStashKey( $this->getStashKeyForTitle( $this->mTargetObj ) );
1716 $queryParams = $this->stashDataOnPost();
1717 $this->doReauthRedirect( $status, $queryParams, 'undelete' );
1718 $this->reauthInProgress = true;
1719 return;
1720 }
1721 $out->setPageTitleMsg( $this->msg( 'undelete-error' ) );
1722 foreach ( $status->getMessages() as $msg ) {
1723 $out->addHTML( Html::errorBox(
1724 $this->msg( $msg )->parse()
1725 ) );
1726 }
1727 return;
1728 }
1729
1730 $restoredRevs = $status->getValue()[UndeletePage::REVISIONS_RESTORED];
1731 $restoredFiles = $status->getValue()[UndeletePage::FILES_RESTORED];
1732
1733 if ( $restoredRevs === 0 && $restoredFiles === 0 ) {
1734 // TODO Should use a different message here
1735 $out->setPageTitleMsg( $this->msg( 'undelete-error' ) );
1736 } else {
1737 if ( $status->getValue()[UndeletePage::FILES_RESTORED] !== 0 ) {
1738 $this->getHookRunner()->onFileUndeleteComplete(
1739 $this->mTargetObj, $this->mFileVersions, $this->getUser(), $this->mComment );
1740 }
1741
1742 $link = $this->getLinkRenderer()->makeKnownLink( $this->mTargetObj );
1743 $out->addWikiMsg( 'undeletedpage', Message::rawParam( $link ) );
1744
1745 $this->watchlistManager->setWatch(
1746 $this->getRequest()->getCheck( 'wpWatch' ),
1747 $this->getAuthority(),
1748 $this->mTargetObj
1749 );
1750 }
1751 }
1752
1761 public function prefixSearchSubpages( $search, $limit, $offset ) {
1762 return $this->prefixSearchString( $search, $limit, $offset, $this->searchEngineFactory );
1763 }
1764
1766 protected function getGroupName() {
1767 return 'pagetools';
1768 }
1769}
1770
1771// @codeCoverageIgnoreStart
1776class_alias( SpecialUndelete::class, 'SpecialUndelete' );
1777// @codeCoverageIgnoreEnd
const NS_USER
Definition Defines.php:53
const NS_FILE
Definition Defines.php:57
const NS_USER_TALK
Definition Defines.php:54
wfEscapeWikiText( $input)
Escapes the given text so that it may be output using addWikiText() without any linking,...
wfTimestamp( $outputtype=TS::UNIX, $ts=0)
Get a timestamp string in one of various formats.
wfScript( $script='index')
Get the URL path to a MediaWiki entry point.
Formats change tags for display in HTML and use filter dropdown menus.
This is the main service interface for converting single-line comments from various DB comment fields...
Show an error when a user tries to do something they do not have the necessary permissions for.
Show an error when the user tries to do something whilst blocked.
Deleted file in the 'filearchive' table.
Local repository that stores files in the local filesystem and registers them in the wiki's own datab...
Definition LocalRepo.php:43
Prioritized list of file repositories.
Definition RepoGroup.php:30
getLocalRepo()
Get the local repository, i.e.
Class to simplify the use of log pages.
Definition LogPage.php:34
Factory for LinkBatch objects to batch query page metadata.
Used to show archived pages and eventually restore them.
Service for creating WikiPage objects.
A service class for checking permissions To obtain an instance, use MediaWikiServices\getInstance()->...
The RevisionRenderer service provides access to rendered output for revisions.
Service for looking up page revisions.
Factory class for SearchEngine.
Parent class for all special pages.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getSkin()
Shortcut to get the skin being used for this instance.
displayRestrictionError()
Output an error message telling the user what access level they have to have.
getUser()
Shortcut to get the User executing this instance.
useTransactionalTimeLimit()
Call wfTransactionalTimeLimit() if this request was POSTed.
getPageTitle( $subpage=false)
Get a self-referential title object.
checkReadOnly()
If the wiki is currently in readonly mode, throws a ReadOnlyError.
getContext()
Gets the context this SpecialPage is executed in.
getRequest()
Get the WebRequest being used for this instance.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
prefixSearchString( $search, $limit, $offset, ?SearchEngineFactory $searchEngineFactory=null)
Perform a regular substring search for prefixSearchSubpages.
getAuthority()
Shortcut to get the Authority executing this instance.
getLanguage()
Shortcut to get user's language.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages By default the message key is the canonical name of...
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
Special page allowing users with the appropriate permissions to view and restore deleted content.
formatRevisionRow( $row, $earliestLiveTime, $remaining, $sizes)
doesWrites()
Indicates whether POST requests to this special page require write access to the wiki....
checkPermissions()
Checks if userCanExecute, and if not throws a PermissionsError.to override 1.19 void
handleRetrievedData(array $data)
Restore submitted undelete form state from the stash on the reauth return trip.
isAllowed( $permission, ?User $user=null)
Checks whether a user is allowed the permission for the specific title if one is set.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
prefixSearchSubpages( $search, $limit, $offset)
Return an array of subpages beginning with $search that this special page will accept.
formatRevisionHistory(IResultWrapper $revisions)
Generate the.
__construct(private readonly PermissionManager $permissionManager, private readonly RevisionStore $revisionStore, private readonly RevisionRenderer $revisionRenderer, private readonly IContentHandlerFactory $contentHandlerFactory, private readonly NameTableStore $changeTagDefStore, private readonly LinkBatchFactory $linkBatchFactory, RepoGroup $repoGroup, private readonly IConnectionProvider $dbProvider, private readonly UserOptionsLookup $userOptionsLookup, private readonly WikiPageFactory $wikiPageFactory, private readonly SearchEngineFactory $searchEngineFactory, private readonly UndeletePageFactory $undeletePageFactory, private readonly ArchivedRevisionLookup $archivedRevisionLookup, private readonly CommentFormatter $commentFormatter, private readonly WatchlistManager $watchlistManager, private readonly ChangeTagsFormatter $changeTagsFormatter,)
execute( $par)
Default execute method Checks user permissions.This must be overridden by subclasses; it will be made...
userCanExecute(User $user)
Checks if the given user (identified by an object) can execute this special page (as defined by getRe...
getRestriction()
Get the permission that a user must have to execute this page, e.g.block or delete,...
showMoreHistory()
Handle XHR "show more history" requests (T249977).
Represents a title within MediaWiki.
Definition Title.php:69
Provides access to user options.
User class for the MediaWiki software.
Definition User.php:129
return[ 'config-schema-inverse'=>['default'=>['ConfigRegistry'=>['main'=> 'MediaWiki\\Config\\GlobalVarConfig::newInstance',], 'Sitename'=> 'MediaWiki', 'Server'=> false, 'CanonicalServer'=> false, 'ServerName'=> false, 'AssumeProxiesUseDefaultProtocolPorts'=> true, 'HttpsPort'=> 443, 'ForceHTTPS'=> false, 'ScriptPath'=> '/wiki', 'UsePathInfo'=> null, 'Script'=> false, 'LoadScript'=> false, 'RestPath'=> false, 'StylePath'=> false, 'LocalStylePath'=> false, 'ExtensionAssetsPath'=> false, 'ExtensionDirectory'=> null, 'StyleDirectory'=> null, 'ArticlePath'=> false, 'UploadPath'=> false, 'ImgAuthPath'=> false, 'ThumbPath'=> false, 'UploadDirectory'=> false, 'FileCacheDirectory'=> false, 'Logo'=> false, 'Logos'=> false, 'Favicon'=> '/favicon.ico', 'AppleTouchIcon'=> false, 'ReferrerPolicy'=> false, 'TmpDirectory'=> false, 'UploadBaseUrl'=> '', 'UploadStashScalerBaseUrl'=> false, 'ActionPaths'=>[], 'MainPageIsDomainRoot'=> false, 'EnableUploads'=> false, 'UploadStashMaxAge'=> 21600, 'EnableAsyncUploads'=> false, 'EnableAsyncUploadsByURL'=> false, 'EnableChunkedUploads'=> false, 'UploadMaintenance'=> false, 'IllegalFileChars'=> ':\\/\\\\', 'DeletedDirectory'=> false, 'ImgAuthDetails'=> false, 'ImgAuthUrlPathMap'=>[], 'LocalFileRepo'=>['class'=> 'MediaWiki\\FileRepo\\LocalRepo', 'name'=> 'local', 'directory'=> null, 'scriptDirUrl'=> null, 'favicon'=> null, 'url'=> null, 'hashLevels'=> null, 'thumbScriptUrl'=> null, 'transformVia404'=> null, 'deletedDir'=> null, 'deletedHashLevels'=> null, 'updateCompatibleMetadata'=> null, 'reserializeMetadata'=> null,], 'ForeignFileRepos'=>[], 'UseInstantCommons'=> false, 'UseSharedUploads'=> false, 'SharedUploadDirectory'=> null, 'SharedUploadPath'=> null, 'HashedSharedUploadDirectory'=> true, 'RepositoryBaseUrl'=> 'https:'FetchCommonsDescriptions'=> false, 'SharedUploadDBname'=> false, 'SharedUploadDBprefix'=> '', 'SharedUploadDBschema'=> null, 'CacheSharedUploads'=> true, 'ForeignUploadTargets'=>['local',], 'UploadDialog'=>['fields'=>['description'=> true, 'date'=> false, 'categories'=> false,], 'licensemessages'=>['local'=> 'generic-local', 'foreign'=> 'generic-foreign',], 'comment'=>['local'=> '', 'foreign'=> '',], 'format'=>['filepage'=> ' $DESCRIPTION', 'description'=> ' $TEXT', 'ownwork'=> '', 'license'=> '', 'uncategorized'=> '',],], 'FileBackends'=>[], 'LockManagers'=>[], 'DefaultLockManager'=> null, 'ShowEXIF'=> null, 'UpdateCompatibleMetadata'=> false, 'AllowCopyUploads'=> false, 'CopyUploadsDomains'=>[], 'CopyUploadsFromSpecialUpload'=> false, 'CopyUploadProxy'=> false, 'CopyUploadTimeout'=> false, 'CopyUploadAllowOnWikiDomainConfig'=> false, 'MaxUploadSize'=> 104857600, 'MinUploadChunkSize'=> 1024, 'UploadNavigationUrl'=> false, 'UploadMissingFileUrl'=> false, 'ThumbnailScriptPath'=> false, 'SharedThumbnailScriptPath'=> false, 'HashedUploadDirectory'=> true, 'CSPUploadEntryPoint'=> true, 'FileExtensions'=>['png', 'gif', 'jpg', 'jpeg', 'webp',], 'ProhibitedFileExtensions'=>['html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht', 'php', 'phtml', 'php3', 'php4', 'php5', 'phps', 'phar', 'shtml', 'jhtml', 'pl', 'py', 'cgi', 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl', 'xml',], 'MimeTypeExclusions'=>['text/html', 'application/javascript', 'text/javascript', 'text/x-javascript', 'application/x-shellscript', 'application/x-php', 'text/x-php', 'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh', 'text/scriptlet', 'application/x-msdownload', 'application/x-msmetafile', 'application/java', 'application/xml', 'text/xml',], 'CheckFileExtensions'=> true, 'StrictFileExtensions'=> true, 'DisableUploadScriptChecks'=> false, 'UploadSizeWarning'=> false, 'TrustedMediaFormats'=>['BITMAP', 'AUDIO', 'VIDEO', 'image/svg+xml', 'application/pdf',], 'MediaHandlers'=>[], 'NativeImageLazyLoading'=> true, 'ParserTestMediaHandlers'=>['image/jpeg'=> 'MockBitmapHandler', 'image/png'=> 'MockBitmapHandler', 'image/gif'=> 'MockBitmapHandler', 'image/tiff'=> 'MockBitmapHandler', 'image/webp'=> 'MockBitmapHandler', 'image/x-ms-bmp'=> 'MockBitmapHandler', 'image/x-bmp'=> 'MockBitmapHandler', 'image/x-xcf'=> 'MockBitmapHandler', 'image/svg+xml'=> 'MockSvgHandler', 'image/vnd.djvu'=> 'MockDjVuHandler',], 'UseImageResize'=> true, 'UseImageMagick'=> false, 'ImageMagickConvertCommand'=> '/usr/bin/convert', 'MaxInterlacingAreas'=>[], 'SharpenParameter'=> '0x0.4', 'SharpenReductionThreshold'=> 0.85, 'ImageMagickTempDir'=> false, 'CustomConvertCommand'=> false, 'JpegTran'=> '/usr/bin/jpegtran', 'JpegPixelFormat'=> 'yuv420', 'JpegQuality'=> 80, 'Exiv2Command'=> '/usr/bin/exiv2', 'Exiftool'=> '/usr/bin/exiftool', 'SVGConverters'=>['ImageMagick'=> ' $path/convert -background "#ffffff00" -thumbnail $widthx$height\\! $input PNG:$output', 'inkscape'=> ' $path/inkscape -w $width -o $output $input', 'batik'=> 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input', 'rsvg'=> ' $path/rsvg-convert -w $width -h $height -l $lang -o $output $input', 'ImagickExt'=>['SvgHandler::rasterizeImagickExt',],], 'SVGConverter'=> 'ImageMagick', 'SVGConverterPath'=> '', 'SVGMaxSize'=> 5120, 'SVGMetadataCutoff'=> 5242880, 'SVGNativeRendering'=> true, 'SVGNativeRenderingSizeLimit'=> 51200, 'MediaInTargetLanguage'=> true, 'MaxImageArea'=> 12500000, 'MaxAnimatedGifArea'=> 12500000, 'MaxAnimatedWebPArea'=> 12500000, 'TiffThumbnailType'=>[], 'ThumbnailEpoch'=> '20030516000000', 'AttemptFailureEpoch'=> 1, 'IgnoreImageErrors'=> false, 'GenerateThumbnailOnParse'=> true, 'ShowArchiveThumbnails'=> true, 'EnableAutoRotation'=> null, 'Antivirus'=> null, 'AntivirusSetup'=>['clamav'=>['command'=> 'clamscan --no-summary ', 'codemap'=>[0=> 0, 1=> 1, 52=> -1, ' *'=> false,], 'messagepattern'=> '/.*?:(.*)/sim',],], 'AntivirusRequired'=> true, 'VerifyMimeType'=> true, 'MimeTypeFile'=> 'internal', 'MimeInfoFile'=> 'internal', 'MimeDetectorCommand'=> null, 'TrivialMimeDetection'=> false, 'XMLMimeTypes'=>['http:'svg'=> 'image/svg+xml', 'http:'http:'html'=> 'text/html',], 'ImageLimits'=>[[320, 240,], [640, 480,], [800, 600,], [1024, 768,], [1280, 1024,], [2560, 2048,],], 'ThumbLimits'=>[120, 150, 180, 200, 220, 250, 300, 400,], 'ThumbnailNamespaces'=>[6,], 'ThumbnailSteps'=> null, 'ThumbnailBuckets'=> null, 'ThumbnailMinimumBucketDistance'=> 50, 'UploadThumbnailRenderMap'=>[], 'UploadThumbnailRenderMethod'=> 'jobqueue', 'UploadThumbnailRenderHttpCustomHost'=> false, 'UploadThumbnailRenderHttpCustomDomain'=> false, 'UseTinyRGBForJPGThumbnails'=> false, 'GalleryOptions'=>[], 'ThumbUpright'=> 0.75, 'DirectoryMode'=> 511, 'ResponsiveImages'=> true, 'ImagePreconnect'=> false, 'TrackMediaRequestProvenance'=> false, 'DjvuUseBoxedCommand'=> false, 'DjvuDump'=> null, 'DjvuRenderer'=> null, 'DjvuTxt'=> null, 'DjvuPostProcessor'=> 'pnmtojpeg', 'DjvuOutputExtension'=> 'jpg', 'EmergencyContact'=> false, 'PasswordSender'=> false, 'NoReplyAddress'=> false, 'EnableEmail'=> true, 'EnableUserEmail'=> true, 'UserEmailUseReplyTo'=> true, 'PasswordReminderResendTime'=> 24, 'NewPasswordExpiry'=> 604800, 'UserEmailConfirmationTokenExpiry'=> 604800, 'PasswordExpirationDays'=> false, 'PasswordExpireGrace'=> 604800, 'SMTP'=> false, 'AdditionalMailParams'=> null, 'AllowHTMLEmail'=> false, 'EnotifFromEditor'=> false, 'EmailAuthentication'=> true, 'EmailConfirmationBanner'=> false, 'EnotifWatchlist'=> false, 'EnotifUserTalk'=> false, 'EnotifRevealEditorAddress'=> false, 'EnotifMinorEdits'=> true, 'EnotifUseRealName'=> false, 'UsersNotifiedOnAllChanges'=>[], 'DBname'=> 'my_wiki', 'DBmwschema'=> null, 'DBprefix'=> '', 'DBserver'=> 'localhost', 'DBport'=> 5432, 'DBuser'=> 'wikiuser', 'DBpassword'=> '', 'DBtype'=> 'mysql', 'DBssl'=> false, 'DBcompress'=> false, 'DBStrictWarnings'=> false, 'DBadminuser'=> null, 'DBadminpassword'=> null, 'SearchType'=> null, 'SearchTypeAlternatives'=> null, 'DBTableOptions'=> 'ENGINE=InnoDB, DEFAULT CHARSET=binary', 'SQLMode'=> '', 'SQLiteDataDir'=> '', 'SharedDB'=> null, 'SharedPrefix'=> false, 'SharedTables'=>['user', 'user_properties', 'user_autocreate_serial',], 'SharedSchema'=> false, 'DBservers'=> false, 'LBFactoryConf'=>['class'=> 'Wikimedia\\Rdbms\\LBFactorySimple',], 'DataCenterUpdateStickTTL'=> 10, 'DBerrorLog'=> false, 'DBerrorLogTZ'=> false, 'LocalDatabases'=>[], 'DatabaseReplicaLagWarning'=> 10, 'DatabaseReplicaLagCritical'=> 30, 'MaxExecutionTimeForExpensiveQueries'=> 0, 'VirtualDomainsMapping'=>[], 'RemoteVirtualDomainsMapping'=>[], 'FileSchemaMigrationStage'=> 3, 'ExternalLinksDomainGaps'=>[], 'ContentHandlers'=>['wikitext'=>['class'=> 'MediaWiki\\Content\\WikitextContentHandler', 'services'=>['TitleFactory', 'ParserFactory', 'GlobalIdGenerator', 'LanguageNameUtils', 'LinkRenderer', 'MagicWordFactory', 'ParsoidParserFactory',],], 'javascript'=>['class'=> 'MediaWiki\\Content\\JavaScriptContentHandler', 'services'=>['MainConfig', 'ParserFactory', 'UserOptionsLookup', 'CodeHighlighter',],], 'json'=>['class'=> 'MediaWiki\\Content\\JsonContentHandler', 'services'=>['ParsoidParserFactory', 'TitleFactory',],], 'css'=>['class'=> 'MediaWiki\\Content\\CssContentHandler', 'services'=>['MainConfig', 'ParserFactory', 'UserOptionsLookup', 'CodeHighlighter',],], 'vue'=>['class'=> 'MediaWiki\\Content\\VueContentHandler', 'services'=>['MainConfig', 'ParserFactory', 'CodeHighlighter',],], 'text'=> 'MediaWiki\\Content\\TextContentHandler', 'unknown'=> 'MediaWiki\\Content\\FallbackContentHandler',], 'NamespaceContentModels'=>[], 'TextModelsToParse'=>['wikitext', 'javascript', 'css',], 'CompressRevisions'=> false, 'ExternalStores'=>[], 'ExternalServers'=>[], 'DefaultExternalStore'=> false, 'RevisionCacheExpiry'=> 604800, 'PageLanguageUseDB'=> false, 'DiffEngine'=> null, 'ExternalDiffEngine'=> false, 'Wikidiff2Options'=>[], 'RequestTimeLimit'=> null, 'TransactionalTimeLimit'=> 120, 'CriticalSectionTimeLimit'=> 180.0, 'MiserMode'=> false, 'DisableQueryPages'=> false, 'QueryCacheLimit'=> 1000, 'WantedPagesThreshold'=> 1, 'AllowSlowParserFunctions'=> false, 'AllowSchemaUpdates'=> true, 'MaxArticleSize'=> 2048, 'MemoryLimit'=> '50M', 'PoolCounterConf'=> null, 'PoolCountClientConf'=>['servers'=>['127.0.0.1',], 'timeout'=> 0.1,], 'MaxUserDBWriteDuration'=> false, 'MaxJobDBWriteDuration'=> false, 'LinkHolderBatchSize'=> 1000, 'MaximumMovedPages'=> 100, 'ForceDeferredUpdatesPreSend'=> false, 'MultiShardSiteStats'=> false, 'CacheDirectory'=> false, 'MainCacheType'=> 0, 'MessageCacheType'=> -1, 'ParserCacheType'=> -1, 'SessionCacheType'=> -1, 'AnonSessionCacheType'=> false, 'LanguageConverterCacheType'=> -1, 'ObjectCaches'=>[0=>['class'=> 'Wikimedia\\ObjectCache\\EmptyBagOStuff', 'reportDupes'=> false,], 1=>['class'=> 'MediaWiki\\ObjectCache\\SqlBagOStuff', 'loggroup'=> 'SQLBagOStuff',], 'memcached-php'=>['class'=> 'Wikimedia\\ObjectCache\\MemcachedPhpBagOStuff', 'loggroup'=> 'memcached',], 'memcached-pecl'=>['class'=> 'Wikimedia\\ObjectCache\\MemcachedPeclBagOStuff', 'loggroup'=> 'memcached',], 'hash'=>['class'=> 'Wikimedia\\ObjectCache\\HashBagOStuff', 'reportDupes'=> false,], 'apc'=>['class'=> 'Wikimedia\\ObjectCache\\APCUBagOStuff', 'reportDupes'=> false,], 'apcu'=>['class'=> 'Wikimedia\\ObjectCache\\APCUBagOStuff', 'reportDupes'=> false,],], 'WANObjectCache'=>[], 'MicroStashType'=> -1, 'MainStash'=> 1, 'ParsoidCacheConfig'=>['StashType'=> null, 'StashDuration'=> 86400,], 'ParsoidSelectiveUpdateSampleRate'=> 0, 'SplitParsoidParserCache'=> false, 'ParserCacheFilterConfig'=>['pcache'=>['default'=>['minCpuTime'=> 0,],], 'postproc-pcache'=>['default'=>['minCpuTime'=> 9223372036854775807,],], 'parsoid-pcache'=>['default'=>['minCpuTime'=> 0,],], 'postproc-parsoid-pcache'=>['default'=>['minCpuTime'=> 0,],],], 'ChronologyProtectorSecret'=> '', 'ParserCacheExpireTime'=> 86400, 'ParserCacheAsyncExpireTime'=> 60, 'ParserCacheAsyncRefreshJobs'=> true, 'OldRevisionParserCacheExpireTime'=> 3600, 'ObjectCacheSessionExpiry'=> 3600, 'SuspiciousIpExpiry'=> false, 'SessionPbkdf2Iterations'=> 10001, 'UseSessionCookieJwt'=> false, 'JwtSessionCookieIssuer'=> null, 'MemCachedServers'=>['127.0.0.1:11211',], 'MemCachedPersistent'=> false, 'MemCachedTimeout'=> 500000, 'UseLocalMessageCache'=> false, 'AdaptiveMessageCache'=> false, 'LocalisationCacheConf'=>['class'=> 'MediaWiki\\Language\\LocalisationCache', 'store'=> 'detect', 'storeClass'=> false, 'storeDirectory'=> false, 'storeServer'=>[], 'forceRecache'=> false, 'manualRecache'=> false,], 'CachePages'=> true, 'CacheEpoch'=> '20030516000000', 'GitInfoCacheDirectory'=> false, 'UseFileCache'=> false, 'FileCacheDepth'=> 2, 'RenderHashAppend'=> '', 'EnableSidebarCache'=> false, 'SidebarCacheExpiry'=> 86400, 'UseGzip'=> false, 'InvalidateCacheOnLocalSettingsChange'=> true, 'ExtensionInfoMTime'=> false, 'EnableRemoteBagOStuffTests'=> false, 'UseCdn'=> false, 'VaryOnXFP'=> false, 'InternalServer'=> false, 'CdnMaxAge'=> 18000, 'CdnMaxageLagged'=> 30, 'CdnMaxageStale'=> 10, 'CdnReboundPurgeDelay'=> 0, 'CdnMaxageSubstitute'=> 60, 'CdnServers'=>[], 'CdnServersNoPurge'=>[], 'HTCPRouting'=>[], 'HTCPMulticastTTL'=> 1, 'UsePrivateIPs'=> false, 'CdnMatchParameterOrder'=> true, 'LanguageCode'=> 'en', 'GrammarForms'=>[], 'InterwikiMagic'=> true, 'HideInterlanguageLinks'=> false, 'ExtraInterlanguageLinkPrefixes'=>[], 'InterlanguageLinkCodeMap'=>[], 'ExtraLanguageNames'=>[], 'ExtraLanguageCodes'=>['bh'=> 'bho', 'no'=> 'nb', 'simple'=> 'en',], 'DummyLanguageCodes'=>[], 'AllUnicodeFixes'=> false, 'LegacyEncoding'=> false, 'AmericanDates'=> false, 'TranslateNumerals'=> true, 'UseDatabaseMessages'=> true, 'MaxMsgCacheEntrySize'=> 10000, 'DisableLangConversion'=> false, 'DisableTitleConversion'=> false, 'DefaultLanguageVariant'=> false, 'UsePigLatinVariant'=> false, 'DisabledVariants'=>[], 'VariantArticlePath'=> false, 'UseXssLanguage'=> false, 'LoginLanguageSelector'=> false, 'ForceUIMsgAsContentMsg'=>[], 'RawHtmlMessages'=>[], 'Localtimezone'=> null, 'LocalTZoffset'=> null, 'OverrideUcfirstCharacters'=>[], 'MimeType'=> 'text/html', 'Html5Version'=> null, 'EditSubmitButtonLabelPublish'=> false, 'XhtmlNamespaces'=>[], 'SiteNotice'=> '', 'BrowserFormatDetection'=> 'telephone=no', 'SkinMetaTags'=>[], 'DefaultSkin'=> 'vector-2022', 'FallbackSkin'=> 'fallback', 'SkipSkins'=>[], 'DisableOutputCompression'=> false, 'FragmentMode'=>['html5', 'legacy',], 'ExternalInterwikiFragmentMode'=> 'legacy', 'FooterIcons'=>['copyright'=>['copyright'=>[],], 'poweredby'=>['mediawiki'=>['src'=> null, 'url'=> 'https:'alt'=> 'Powered by MediaWiki', 'lang'=> 'en',],],], 'EnableSectionShare'=> false, 'PageShareSkinsEnabled'=>[], 'UseCombinedLoginLink'=> false, 'Edititis'=> false, 'Send404Code'=> true, 'ShowRollbackEditCount'=> 10, 'EnableCanonicalServerLink'=> false, 'InterwikiLogoOverride'=>[], 'ResourceModules'=>[], 'ResourceModuleSkinStyles'=>[], 'ResourceLoaderSources'=>[], 'ResourceBasePath'=> null, 'ResourceLoaderMaxage'=>[], 'ResourceLoaderDebug'=> false, 'ResourceLoaderMaxQueryLength'=> false, 'ResourceLoaderValidateJS'=> true, 'ResourceLoaderEnableJSProfiler'=> false, 'ResourceLoaderStorageEnabled'=> true, 'ResourceLoaderStorageVersion'=> 1, 'ResourceLoaderEnableSourceMapLinks'=> true, 'AllowSiteCSSOnRestrictedPages'=> false, 'VueDevelopmentMode'=> false, 'CodexDevelopmentDir'=> null, 'MetaNamespace'=> false, 'MetaNamespaceTalk'=> false, 'CanonicalNamespaceNames'=>[-2=> 'Media', -1=> 'Special', 0=> '', 1=> 'Talk', 2=> 'User', 3=> 'User_talk', 4=> 'Project', 5=> 'Project_talk', 6=> 'File', 7=> 'File_talk', 8=> 'MediaWiki', 9=> 'MediaWiki_talk', 10=> 'Template', 11=> 'Template_talk', 12=> 'Help', 13=> 'Help_talk', 14=> 'Category', 15=> 'Category_talk',], 'ExtraNamespaces'=>[], 'ExtraGenderNamespaces'=>[], 'NamespaceAliases'=>[], 'LegalTitleChars'=> ' %!"$&\'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+', 'CapitalLinks' => true, 'CapitalLinkOverrides' => [ ], 'NamespacesWithSubpages' => [ 1 => true, 2 => true, 3 => true, 4 => true, 5 => true, 7 => true, 8 => true, 9 => true, 10 => true, 11 => true, 12 => true, 13 => true, 15 => true, ], 'NamespacesWithoutAutoSummaries' => [ ], 'ContentNamespaces' => [ 0, ], 'ShortPagesNamespaceExclusions' => [ ], 'ExtraSignatureNamespaces' => [ ], 'InvalidRedirectTargets' => [ 'Filepath', 'Mypage', 'Mytalk', 'Redirect', 'Mylog', ], 'DisableHardRedirects' => false, 'FixDoubleRedirects' => false, 'LocalInterwikis' => [ ], 'InterwikiExpiry' => 10800, 'InterwikiCache' => false, 'InterwikiScopes' => 3, 'InterwikiFallbackSite' => 'wiki', 'RedirectSources' => false, 'SiteTypes' => [ 'mediawiki' => 'MediaWiki\\Site\\MediaWikiSite', ], 'MaxTocLevel' => 999, 'MaxPPNodeCount' => 1000000, 'MaxTemplateDepth' => 100, 'MaxPPExpandDepth' => 100, 'UrlProtocols' => [ 'bitcoin:', 'ftp: 'ftps: 'geo:', 'git: 'gopher: 'http: 'https: 'irc: 'ircs: 'magnet:', 'mailto:', 'matrix:', 'mms: 'news:', 'nntp: 'redis: 'sftp: 'sip:', 'sips:', 'sms:', 'ssh: 'svn: 'tel:', 'telnet: 'urn:', 'wikipedia: 'worldwind: 'xmpp:', ' ], 'CleanSignatures' => true, 'AllowExternalImages' => false, 'AllowExternalImagesFrom' => '', 'EnableImageWhitelist' => false, 'TidyConfig' => [ ], 'ParsoidSettings' => [ 'useSelser' => true, ], 'ParsoidExperimentalParserFunctionOutput' => false, 'RawHtml' => false, 'ExternalLinkTarget' => false, 'NoFollowLinks' => true, 'NoFollowNsExceptions' => [ ], 'NoFollowDomainExceptions' => [ 'mediawiki.org', ], 'RegisterInternalExternals' => false, 'ExternalLinksIgnoreDomains' => [ ], 'AllowDisplayTitle' => true, 'RestrictDisplayTitle' => true, 'ExpensiveParserFunctionLimit' => 100, 'PreprocessorCacheThreshold' => 1000, 'EnableScaryTranscluding' => false, 'TranscludeCacheExpiry' => 3600, 'EnableMagicLinks' => [ 'ISBN' => false, 'PMID' => false, 'RFC' => false, ], 'ParserEnableUserLanguage' => false, 'ArticleCountMethod' => 'link', 'ActiveUserDays' => 30, 'LearnerEdits' => 10, 'LearnerMemberSince' => 4, 'ExperiencedUserEdits' => 500, 'ExperiencedUserMemberSince' => 30, 'ManualRevertSearchRadius' => 15, 'RevertedTagMaxDepth' => 15, 'CentralIdLookupProviders' => [ 'local' => [ 'class' => 'MediaWiki\\User\\CentralId\\LocalIdLookup', 'services' => [ 'MainConfig', 'DBLoadBalancerFactory', 'HideUserUtils', ], ], ], 'CentralIdLookupProvider' => 'local', 'UserRegistrationProviders' => [ 'local' => [ 'class' => 'MediaWiki\\User\\Registration\\LocalUserRegistrationProvider', 'services' => [ 'ConnectionProvider', ], ], ], 'PasswordPolicy' => [ 'policies' => [ 'bureaucrat' => [ 'MinimalPasswordLength' => 10, 'MinimumPasswordLengthToLogin' => 1, ], 'sysop' => [ 'MinimalPasswordLength' => 10, 'MinimumPasswordLengthToLogin' => 1, ], 'interface-admin' => [ 'MinimalPasswordLength' => 10, 'MinimumPasswordLengthToLogin' => 1, ], 'bot' => [ 'MinimalPasswordLength' => 10, 'MinimumPasswordLengthToLogin' => 1, ], 'default' => [ 'MinimalPasswordLength' => [ 'value' => 8, 'suggestChangeOnLogin' => true, ], 'PasswordCannotBeSubstringInUsername' => [ 'value' => true, 'suggestChangeOnLogin' => true, ], 'PasswordCannotMatchDefaults' => [ 'value' => true, 'suggestChangeOnLogin' => true, ], 'MaximalPasswordLength' => [ 'value' => 4096, 'suggestChangeOnLogin' => true, ], 'PasswordNotInCommonList' => [ 'value' => true, 'suggestChangeOnLogin' => true, ], ], ], 'checks' => [ 'MinimalPasswordLength' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkMinimalPasswordLength', ], 'MinimumPasswordLengthToLogin' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkMinimumPasswordLengthToLogin', ], 'PasswordCannotBeSubstringInUsername' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkPasswordCannotBeSubstringInUsername', ], 'PasswordCannotMatchDefaults' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkPasswordCannotMatchDefaults', ], 'MaximalPasswordLength' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkMaximalPasswordLength', ], 'PasswordNotInCommonList' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkPasswordNotInCommonList', ], ], ], 'AuthManagerConfig' => null, 'AuthManagerAutoConfig' => [ 'preauth' => [ 'MediaWiki\\Auth\\ThrottlePreAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\ThrottlePreAuthenticationProvider', 'sort' => 0, ], 'MediaWiki\\Auth\\PreviouslyRenamedAccountPreAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\PreviouslyRenamedAccountPreAuthenticationProvider', 'services' => [ 'ConnectionProvider', 'UserFactory', ], 'sort' => 0, ], ], 'primaryauth' => [ 'MediaWiki\\Auth\\TemporaryPasswordPrimaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\TemporaryPasswordPrimaryAuthenticationProvider', 'services' => [ 'DBLoadBalancerFactory', 'UserOptionsLookup', ], 'args' => [ [ 'authoritative' => false, ], ], 'sort' => 0, ], 'MediaWiki\\Auth\\LocalPasswordPrimaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\LocalPasswordPrimaryAuthenticationProvider', 'services' => [ 'DBLoadBalancerFactory', ], 'args' => [ [ 'authoritative' => true, ], ], 'sort' => 100, ], ], 'secondaryauth' => [ 'MediaWiki\\Auth\\CheckBlocksSecondaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\CheckBlocksSecondaryAuthenticationProvider', 'sort' => 0, ], 'MediaWiki\\Auth\\ResetPasswordSecondaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\ResetPasswordSecondaryAuthenticationProvider', 'sort' => 100, ], 'MediaWiki\\Auth\\EmailNotificationSecondaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\EmailNotificationSecondaryAuthenticationProvider', 'services' => [ 'DBLoadBalancerFactory', ], 'sort' => 200, ], ], ], 'RememberMe' => 'choose', 'ReauthenticateTime' => [ 'default' => 3600, ], 'ChangeCredentialsBlacklist' => [ 'MediaWiki\\Auth\\TemporaryPasswordAuthenticationRequest', ], 'RemoveCredentialsBlacklist' => [ 'MediaWiki\\Auth\\PasswordAuthenticationRequest', ], 'InvalidPasswordReset' => true, 'PasswordDefault' => 'pbkdf2', 'PasswordConfig' => [ 'A' => [ 'class' => 'MediaWiki\\Password\\MWOldPassword', ], 'B' => [ 'class' => 'MediaWiki\\Password\\MWSaltedPassword', ], 'pbkdf2-legacyA' => [ 'class' => 'MediaWiki\\Password\\LayeredParameterizedPassword', 'types' => [ 'A', 'pbkdf2', ], ], 'pbkdf2-legacyB' => [ 'class' => 'MediaWiki\\Password\\LayeredParameterizedPassword', 'types' => [ 'B', 'pbkdf2', ], ], 'bcrypt' => [ 'class' => 'MediaWiki\\Password\\BcryptPassword', 'cost' => 9, ], 'pbkdf2' => [ 'class' => 'MediaWiki\\Password\\Pbkdf2PasswordUsingOpenSSL', 'algo' => 'sha512', 'cost' => '30000', 'length' => '64', ], 'argon2' => [ 'class' => 'MediaWiki\\Password\\Argon2Password', 'algo' => 'auto', ], ], 'PasswordResetRoutes' => [ 'username' => true, 'email' => true, ], 'MaxSigChars' => 255, 'SignatureValidation' => 'warning', 'SignatureAllowedLintErrors' => [ 'obsolete-tag', ], 'MaxNameChars' => 255, 'ReservedUsernames' => [ 'MediaWiki default', 'Conversion script', 'Maintenance script', 'Template namespace initialisation script', 'ScriptImporter', 'Delete page script', 'Move page script', 'Command line script', 'Unknown user', 'msg:double-redirect-fixer', 'msg:usermessage-editor', 'msg:proxyblocker', 'msg:sorbs', 'msg:spambot_username', 'msg:autochange-username', ], 'DefaultUserOptions' => [ 'ccmeonemails' => 0, 'date' => 'default', 'diffonly' => 0, 'diff-type' => 'table', 'disablemail' => 0, 'editfont' => 'monospace', 'editondblclick' => 0, 'editrecovery' => 0, 'editsectiononrightclick' => 0, 'email-allow-new-users' => 1, 'enotifminoredits' => 0, 'enotifrevealaddr' => 0, 'enotifusertalkpages' => 1, 'enotifwatchlistpages' => 1, 'extendwatchlist' => 1, 'fancysig' => 0, 'forceeditsummary' => 0, 'forcesafemode' => 0, 'gender' => 'unknown', 'hidecategorization' => 1, 'hideminor' => 0, 'hidepatrolled' => 0, 'imagesize' => 2, 'minordefault' => 0, 'newpageshidepatrolled' => 0, 'nickname' => '', 'norollbackdiff' => 0, 'prefershttps' => 1, 'previewonfirst' => 0, 'previewontop' => 1, 'pst-cssjs' => 1, 'rcdays' => 7, 'rcenhancedfilters-disable' => 0, 'rclimit' => 50, 'requireemail' => 0, 'search-match-redirect' => true, 'search-special-page' => 'Search', 'search-thumbnail-extra-namespaces' => true, 'searchlimit' => 20, 'showhiddencats' => 0, 'shownumberswatching' => 1, 'showrollbackconfirmation' => 0, 'skin' => false, 'skin-responsive' => 1, 'thumbsize' => 5, 'underline' => 2, 'useeditwarning' => 1, 'uselivepreview' => 0, 'usenewrc' => 1, 'watchcreations' => 1, 'watchcreations-expiry' => 'infinite', 'watchdefault' => 1, 'watchdefault-expiry' => 'infinite', 'watchdeletion' => 0, 'watchlistdays' => 7, 'watchlisthideanons' => 0, 'watchlisthidebots' => 0, 'watchlisthidecategorization' => 1, 'watchlisthideliu' => 0, 'watchlisthideminor' => 0, 'watchlisthideown' => 0, 'watchlisthidepatrolled' => 0, 'watchlistreloadautomatically' => 0, 'watchlistunwatchlinks' => 0, 'watchmoves' => 0, 'watchrollback' => 0, 'watchuploads' => 1, 'watchrollback-expiry' => 'infinite', 'watchstar-expiry' => 'infinite', 'wlenhancedfilters-disable' => 0, 'wllimit' => 250, ], 'ConditionalUserOptions' => [ ], 'HiddenPrefs' => [ ], 'UserJsPrefLimit' => 100, 'InvalidUsernameCharacters' => '@:>=', 'UserrightsInterwikiDelimiter' => '@', 'SecureLogin' => false, 'AuthenticationTokenVersion' => null, 'SessionProviders' => [ 'MediaWiki\\Session\\CookieSessionProvider' => [ 'class' => 'MediaWiki\\Session\\CookieSessionProvider', 'args' => [ [ 'priority' => 30, ], ], 'services' => [ 'JwtCodec', 'UrlUtils', ], ], 'MediaWiki\\Session\\BotPasswordSessionProvider' => [ 'class' => 'MediaWiki\\Session\\BotPasswordSessionProvider', 'args' => [ [ 'priority' => 75, ], ], 'services' => [ 'GrantsInfo', ], ], ], 'AutoCreateTempUser' => [ 'known' => false, 'enabled' => false, 'actions' => [ 'edit', ], 'genPattern' => '~$1', 'matchPattern' => null, 'reservedPattern' => '~$1', 'serialProvider' => [ 'type' => 'local', 'useYear' => true, ], 'serialMapping' => [ 'type' => 'readable-numeric', ], 'expireAfterDays' => 90, 'notifyBeforeExpirationDays' => 10, ], 'AutoblockExemptions' => [ ], 'AutoblockExpiry' => 86400, 'BlockAllowsUTEdit' => true, 'BlockCIDRLimit' => [ 'IPv4' => 16, 'IPv6' => 19, ], 'BlockDisablesLogin' => false, 'EnableMultiBlocks' => false, 'WhitelistRead' => false, 'WhitelistReadRegexp' => false, 'EmailConfirmToEdit' => false, 'HideIdentifiableRedirects' => true, 'GroupPermissions' => [ '*' => [ 'createaccount' => true, 'autocreateaccount' => true, 'read' => true, 'edit' => true, 'createpage' => true, 'createtalk' => true, 'viewmyprivateinfo' => true, 'editmyprivateinfo' => true, 'editmyoptions' => true, ], 'user' => [ 'move' => true, 'move-subpages' => true, 'move-rootuserpages' => true, 'move-categorypages' => true, 'movefile' => true, 'read' => true, 'edit' => true, 'createpage' => true, 'createtalk' => true, 'upload' => true, 'reupload' => true, 'reupload-shared' => true, 'minoredit' => true, 'editmyusercss' => true, 'editmyuserjson' => true, 'editmyuserjs' => true, 'editmyuserjsredirect' => true, 'sendemail' => true, 'applychangetags' => true, 'changetags' => true, 'viewmywatchlist' => true, 'editmywatchlist' => true, 'createwithcontentmodel' => true, 'logout' => true, ], 'autoconfirmed' => [ 'autoconfirmed' => true, 'editsemiprotected' => true, ], 'bot' => [ 'bot' => true, 'autoconfirmed' => true, 'editsemiprotected' => true, 'nominornewtalk' => true, 'autopatrol' => true, 'suppressredirect' => true, 'apihighlimits' => true, ], 'sysop' => [ 'block' => true, 'createaccount' => true, 'createpreviouslyrenamedaccount' => true, 'delete' => true, 'bigdelete' => true, 'deletedhistory' => true, 'deletedtext' => true, 'undelete' => true, 'editcontentmodel' => true, 'editinterface' => true, 'editsitejson' => true, 'edituserjson' => true, 'import' => true, 'importupload' => true, 'move' => true, 'move-subpages' => true, 'move-rootuserpages' => true, 'move-categorypages' => true, 'patrol' => true, 'autopatrol' => true, 'protect' => true, 'editprotected' => true, 'rollback' => true, 'upload' => true, 'reupload' => true, 'reupload-shared' => true, 'unwatchedpages' => true, 'autoconfirmed' => true, 'editsemiprotected' => true, 'ipblock-exempt' => true, 'blockemail' => true, 'markbotedits' => true, 'apihighlimits' => true, 'browsearchive' => true, 'noratelimit' => true, 'movefile' => true, 'unblockself' => true, 'suppressredirect' => true, 'mergehistory' => true, 'managechangetags' => true, 'deletechangetags' => true, ], 'interface-admin' => [ 'editinterface' => true, 'editsitecss' => true, 'editsitejson' => true, 'editsitejs' => true, 'editusercss' => true, 'edituserjson' => true, 'edituserjs' => true, ], 'bureaucrat' => [ 'userrights' => true, 'noratelimit' => true, 'renameuser' => true, ], 'suppress' => [ 'hideuser' => true, 'suppressrevision' => true, 'viewsuppressed' => true, 'suppressionlog' => true, 'deleterevision' => true, 'deletelogentry' => true, ], ], 'PrivilegedGroups' => [ 'bureaucrat', 'interface-admin', 'suppress', 'sysop', ], 'RevokePermissions' => [ ], 'GroupInheritsPermissions' => [ ], 'ImplicitGroups' => [ '*', 'user', 'autoconfirmed', ], 'GroupsAddToSelf' => [ ], 'GroupsRemoveFromSelf' => [ ], 'RestrictedGroups' => [ ], 'UserRequirementsPrivateConditions' => [ ], 'RestrictionTypes' => [ 'create', 'edit', 'move', 'upload', ], 'RestrictionLevels' => [ '', 'autoconfirmed', 'sysop', ], 'CascadingRestrictionLevels' => [ 'sysop', ], 'SemiprotectedRestrictionLevels' => [ 'autoconfirmed', ], 'NamespaceProtection' => [ ], 'RestrictUserPageEditing' => false, 'NonincludableNamespaces' => [ ], 'AutoConfirmAge' => 0, 'AutoConfirmCount' => 0, 'Autopromote' => [ 'autoconfirmed' => [ '&', [ 1, null, ], [ 2, null, ], ], ], 'AutopromoteOnce' => [ 'onEdit' => [ ], ], 'AutopromoteOnceLogInRC' => true, 'AutopromoteOnceRCExcludedGroups' => [ ], 'AddGroups' => [ ], 'RemoveGroups' => [ ], 'AvailableRights' => [ ], 'ImplicitRights' => [ ], 'DeleteRevisionsLimit' => 0, 'DeleteRevisionsBatchSize' => 1000, 'HideUserContribLimit' => 1000, 'AccountCreationThrottle' => [ [ 'count' => 0, 'seconds' => 86400, ], ], 'TempAccountCreationThrottle' => [ [ 'count' => 1, 'seconds' => 600, ], [ 'count' => 6, 'seconds' => 86400, ], ], 'TempAccountNameAcquisitionThrottle' => [ [ 'count' => 60, 'seconds' => 86400, ], ], 'SpamRegex' => [ ], 'SummarySpamRegex' => [ ], 'EnableDnsBlacklist' => false, 'DnsBlacklistUrls' => [ ], 'ProxyList' => [ ], 'ProxyWhitelist' => [ ], 'SoftBlockRanges' => [ ], 'ApplyIpBlocksToXff' => false, 'RateLimits' => [ 'edit' => [ 'ip' => [ 8, 60, ], 'newbie' => [ 8, 60, ], 'user' => [ 90, 60, ], ], 'move' => [ 'newbie' => [ 2, 120, ], 'user' => [ 8, 60, ], ], 'upload' => [ 'ip' => [ 8, 60, ], 'newbie' => [ 8, 60, ], ], 'rollback' => [ 'user' => [ 10, 60, ], 'newbie' => [ 5, 120, ], ], 'mailpassword' => [ 'ip' => [ 5, 3600, ], ], 'sendemail' => [ 'ip' => [ 5, 86400, ], 'newbie' => [ 5, 86400, ], 'user' => [ 20, 86400, ], ], 'changeemail' => [ 'ip-all' => [ 10, 3600, ], 'user' => [ 4, 86400, ], ], 'confirmemail' => [ 'ip-all' => [ 10, 3600, ], 'user' => [ 4, 86400, ], ], 'purge' => [ 'ip' => [ 30, 60, ], 'user' => [ 30, 60, ], ], 'linkpurge' => [ 'ip' => [ 30, 60, ], 'user' => [ 30, 60, ], ], 'renderfile' => [ 'ip' => [ 700, 30, ], 'user' => [ 700, 30, ], ], 'renderfile-nonstandard' => [ 'ip' => [ 70, 30, ], 'user' => [ 70, 30, ], ], 'stashedit' => [ 'ip' => [ 30, 60, ], 'newbie' => [ 30, 60, ], ], 'stashbasehtml' => [ 'ip' => [ 5, 60, ], 'newbie' => [ 5, 60, ], ], 'changetags' => [ 'ip' => [ 8, 60, ], 'newbie' => [ 8, 60, ], ], 'editcontentmodel' => [ 'newbie' => [ 2, 120, ], 'user' => [ 8, 60, ], ], ], 'RateLimitsExcludedIPs' => [ ], 'PutIPinRC' => true, 'QueryPageDefaultLimit' => 50, 'ExternalQuerySources' => [ ], 'PasswordAttemptThrottle' => [ [ 'count' => 5, 'seconds' => 300, ], [ 'count' => 150, 'seconds' => 172800, ], ], 'GrantPermissions' => [ 'basic' => [ 'autocreateaccount' => true, 'autoconfirmed' => true, 'autopatrol' => true, 'editsemiprotected' => true, 'ipblock-exempt' => true, 'nominornewtalk' => true, 'patrolmarks' => true, 'read' => true, 'unwatchedpages' => true, ], 'highvolume' => [ 'bot' => true, 'apihighlimits' => true, 'noratelimit' => true, 'markbotedits' => true, ], 'import' => [ 'import' => true, 'importupload' => true, ], 'editpage' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'pagelang' => true, ], 'editprotected' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editprotected' => true, ], 'editmycssjs' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editmyusercss' => true, 'editmyuserjson' => true, 'editmyuserjs' => true, ], 'editmyoptions' => [ 'editmyoptions' => true, 'editmyuserjson' => true, ], 'editinterface' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editinterface' => true, 'edituserjson' => true, 'editsitejson' => true, ], 'editsiteconfig' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editinterface' => true, 'edituserjson' => true, 'editsitejson' => true, 'editusercss' => true, 'edituserjs' => true, 'editsitecss' => true, 'editsitejs' => true, ], 'createeditmovepage' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'createpage' => true, 'createtalk' => true, 'delete-redirect' => true, 'move' => true, 'move-rootuserpages' => true, 'move-subpages' => true, 'move-categorypages' => true, 'suppressredirect' => true, ], 'uploadfile' => [ 'upload' => true, 'reupload-own' => true, ], 'uploadeditmovefile' => [ 'upload' => true, 'reupload-own' => true, 'reupload' => true, 'reupload-shared' => true, 'upload_by_url' => true, 'movefile' => true, 'suppressredirect' => true, ], 'patrol' => [ 'patrol' => true, ], 'rollback' => [ 'rollback' => true, ], 'blockusers' => [ 'block' => true, 'blockemail' => true, ], 'viewdeleted' => [ 'browsearchive' => true, 'deletedhistory' => true, 'deletedtext' => true, ], 'viewrestrictedlogs' => [ 'suppressionlog' => true, ], 'delete' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'browsearchive' => true, 'deletedhistory' => true, 'deletedtext' => true, 'delete' => true, 'bigdelete' => true, 'deletelogentry' => true, 'deleterevision' => true, 'undelete' => true, ], 'oversight' => [ 'suppressrevision' => true, 'viewsuppressed' => true, ], 'protect' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editprotected' => true, 'protect' => true, ], 'viewmywatchlist' => [ 'viewmywatchlist' => true, ], 'editmywatchlist' => [ 'editmywatchlist' => true, ], 'sendemail' => [ 'sendemail' => true, ], 'createaccount' => [ 'createaccount' => true, ], 'privateinfo' => [ 'viewmyprivateinfo' => true, ], 'mergehistory' => [ 'mergehistory' => true, ], 'managesessions' => [ 'logout' => true, ], ], 'GrantPermissionGroups' => [ 'basic' => 'hidden', 'editpage' => 'page-interaction', 'createeditmovepage' => 'page-interaction', 'editprotected' => 'page-interaction', 'patrol' => 'page-interaction', 'uploadfile' => 'file-interaction', 'uploadeditmovefile' => 'file-interaction', 'sendemail' => 'email', 'viewmywatchlist' => 'watchlist-interaction', 'editmywatchlist' => 'watchlist-interaction', 'editmycssjs' => 'customization', 'editmyoptions' => 'customization', 'editinterface' => 'administration', 'editsiteconfig' => 'administration', 'rollback' => 'administration', 'blockusers' => 'administration', 'delete' => 'administration', 'viewdeleted' => 'administration', 'viewrestrictedlogs' => 'administration', 'protect' => 'administration', 'oversight' => 'administration', 'createaccount' => 'administration', 'mergehistory' => 'administration', 'import' => 'administration', 'highvolume' => 'high-volume', 'privateinfo' => 'private-information', 'managesessions' => 'private-information', ], 'GrantRiskGroups' => [ 'basic' => 'low', 'editpage' => 'low', 'createeditmovepage' => 'low', 'editprotected' => 'vandalism', 'patrol' => 'low', 'uploadfile' => 'low', 'uploadeditmovefile' => 'low', 'sendemail' => 'security', 'viewmywatchlist' => 'low', 'editmywatchlist' => 'low', 'editmycssjs' => 'security', 'editmyoptions' => 'security', 'editinterface' => 'vandalism', 'editsiteconfig' => 'security', 'rollback' => 'low', 'blockusers' => 'vandalism', 'delete' => 'vandalism', 'viewdeleted' => 'vandalism', 'viewrestrictedlogs' => 'security', 'protect' => 'vandalism', 'oversight' => 'security', 'createaccount' => 'low', 'mergehistory' => 'vandalism', 'import' => 'security', 'highvolume' => 'low', 'privateinfo' => 'low', 'managesessions' => 'low', ], 'EnableBotPasswords' => true, 'BotPasswordsCluster' => false, 'BotPasswordsDatabase' => false, 'BotPasswordsLimit' => 100, 'SecretKey' => false, 'JwtPrivateKey' => false, 'JwtPublicKey' => false, 'AllowUserJs' => false, 'ReauthenticateForActions' => [ 'edituserjs' => 'edituserjscss', 'editusercss' => 'edituserjscss', 'editsitejs' => 'editsitejscss', 'editsitecss' => 'editsitejscss', ], 'AllowUserCss' => false, 'AllowUserCssPrefs' => true, 'UseSiteJs' => true, 'UseSiteCss' => true, 'BreakFrames' => false, 'EditPageFrameOptions' => 'DENY', 'ApiFrameOptions' => 'DENY', 'CSPHeader' => false, 'CSPReportOnlyHeader' => false, 'CSPUseReportURIDirective' => false, 'CSPFalsePositiveUrls' => [ 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'chrome-extension' => true, ], 'AllowCrossOrigin' => false, 'RestAllowCrossOriginCookieAuth' => false, 'SessionSecret' => false, 'CookieExpiration' => 2592000, 'ExtendedLoginCookieExpiration' => 15552000, 'SessionCookieJwtExpiration' => 14400, 'CookieDomain' => '', 'CookiePath' => '/', 'CookieSecure' => 'detect', 'CookiePrefix' => false, 'CookieHttpOnly' => true, 'CookieSameSite' => null, 'CacheVaryCookies' => [ ], 'SessionName' => false, 'CookieSetOnAutoblock' => true, 'CookieSetOnIpBlock' => true, 'DeviceBoundSessions' => false, 'DeviceBoundSessionsReportOnly' => true, 'DeviceBoundSessionCookieName' => '__Host-dbsc', 'DeviceBoundSessionCredentialTTL' => 600, 'DeviceBoundSessionChallengeTTL' => 900, 'DeviceBoundSessionBindingTTL' => 2592000, 'DeviceBoundSessionScopeExcludes' => [ ], 'DebugLogFile' => '', 'DebugLogPrefix' => '', 'DebugRedirects' => false, 'DebugRawPage' => false, 'DebugComments' => false, 'DebugDumpSql' => false, 'TrxProfilerLimits' => [ 'GET' => [ 'masterConns' => 0, 'writes' => 0, 'readQueryTime' => 5, 'readQueryRows' => 10000, ], 'POST' => [ 'readQueryTime' => 5, 'writeQueryTime' => 1, 'readQueryRows' => 100000, 'maxAffected' => 1000, ], 'POST-nonwrite' => [ 'writes' => 0, 'readQueryTime' => 5, 'readQueryRows' => 10000, ], 'PostSend-GET' => [ 'readQueryTime' => 5, 'writeQueryTime' => 1, 'readQueryRows' => 10000, 'maxAffected' => 1000, 'masterConns' => 0, 'writes' => 0, ], 'PostSend-POST' => [ 'readQueryTime' => 5, 'writeQueryTime' => 1, 'readQueryRows' => 100000, 'maxAffected' => 1000, ], 'JobRunner' => [ 'readQueryTime' => 30, 'writeQueryTime' => 5, 'readQueryRows' => 100000, 'maxAffected' => 500, ], 'Maintenance' => [ 'writeQueryTime' => 5, 'maxAffected' => 1000, ], ], 'DebugLogGroups' => [ ], 'MWLoggerDefaultSpi' => [ 'class' => 'MediaWiki\\Logger\\LegacySpi', ], 'ShowDebug' => false, 'SpecialVersionShowHooks' => false, 'ShowExceptionDetails' => false, 'LogExceptionBacktrace' => true, 'PropagateErrors' => true, 'ShowHostnames' => false, 'OverrideHostname' => false, 'DevelopmentWarnings' => false, 'DeprecationReleaseLimit' => false, 'Profiler' => [ ], 'StatsTarget' => null, 'StatsFormat' => null, 'StatsPrefix' => 'mediawiki', 'OpenTelemetryConfig' => null, 'PageInfoTransclusionLimit' => 50, 'EnableJavaScriptTest' => false, 'DebugToolbar' => false, 'ApiClientErrorSampleRate' => 1.0, 'DisableTextSearch' => false, 'AdvancedSearchHighlighting' => false, 'SearchHighlightBoundaries' => '[\\p{Z}\\p{P}\\p{C}]', 'OpenSearchTemplates' => [ 'application/x-suggestions+json' => false, 'application/x-suggestions+xml' => false, ], 'OpenSearchDefaultLimit' => 10, 'OpenSearchDescriptionLength' => 100, 'SearchSuggestCacheExpiry' => 1200, 'DisableSearchUpdate' => false, 'NamespacesToBeSearchedDefault' => [ true, ], 'DisableInternalSearch' => false, 'SearchForwardUrl' => null, 'SitemapNamespaces' => false, 'SitemapNamespacesPriorities' => false, 'SitemapApiConfig' => [ ], 'SpecialSearchFormOptions' => [ ], 'SearchMatchRedirectPreference' => false, 'SearchRunSuggestedQuery' => true, 'Diff3' => '/usr/bin/diff3', 'Diff' => '/usr/bin/diff', 'PreviewOnOpenNamespaces' => [ 14 => true, ], 'UniversalEditButton' => true, 'UseAutomaticEditSummaries' => true, 'CommandLineDarkBg' => false, 'ReadOnly' => null, 'ReadOnlyWatchedItemStore' => false, 'ReadOnlyFile' => false, 'UpgradeKey' => false, 'GitBin' => '/usr/bin/git', 'GitRepositoryViewers' => [ 'https: 'ssh: 'https: 'git@github\\.com:(.*?)(\\.git)?' => 'https: ], 'InstallerInitialPages' => [ [ 'titlemsg' => 'mainpage', 'text' => '{{subst:int:mainpagetext}}{{subst:int:mainpagedocfooter}}', ], ], 'RCMaxAge' => 7776000, 'WatchersMaxAge' => 15552000, 'UnwatchedPageSecret' => 1, 'RCFilterByAge' => false, 'RCLinkLimits' => [ 50, 100, 250, 500, ], 'RCLinkDays' => [ 1, 3, 7, 14, 30, ], 'RCFeeds' => [ ], 'RCWatchCategoryMembership' => false, 'UseRCPatrol' => true, 'StructuredChangeFiltersLiveUpdatePollingRate' => 3, 'UseNPPatrol' => true, 'UseFilePatrol' => true, 'Feed' => true, 'FeedLimit' => 50, 'FeedCacheTimeout' => 60, 'FeedDiffCutoff' => 32768, 'OverrideSiteFeed' => [ ], 'FeedClasses' => [ 'rss' => 'MediaWiki\\Feed\\RSSFeed', 'atom' => 'MediaWiki\\Feed\\AtomFeed', ], 'AdvertisedFeedTypes' => [ 'atom', ], 'RCShowWatchingUsers' => false, 'RCShowChangedSize' => true, 'RCChangedSizeThreshold' => 500, 'ShowUpdatedMarker' => true, 'DisableAnonTalk' => false, 'UseTagFilter' => true, 'SoftwareTags' => [ 'mw-contentmodelchange' => true, 'mw-new-redirect' => true, 'mw-removed-redirect' => true, 'mw-changed-redirect-target' => true, 'mw-blank' => true, 'mw-replace' => true, 'mw-recreated' => true, 'mw-rollback' => true, 'mw-undo' => true, 'mw-manual-revert' => true, 'mw-reverted' => true, 'mw-server-side-upload' => true, 'mw-ipblock-appeal' => true, 'mw-edited-other-users-js' => true, 'mw-edited-other-users-css' => true, ], 'RestrictedTagViewRights' => [ ], 'UnwatchedPageThreshold' => false, 'RecentChangesFlags' => [ 'newpage' => [ 'letter' => 'newpageletter', 'title' => 'recentchanges-label-newpage', 'legend' => 'recentchanges-legend-newpage', 'grouping' => 'any', ], 'minor' => [ 'letter' => 'minoreditletter', 'title' => 'recentchanges-label-minor', 'legend' => 'recentchanges-legend-minor', 'class' => 'minoredit', 'grouping' => 'all', ], 'bot' => [ 'letter' => 'boteditletter', 'title' => 'recentchanges-label-bot', 'legend' => 'recentchanges-legend-bot', 'class' => 'botedit', 'grouping' => 'all', ], 'unpatrolled' => [ 'letter' => 'unpatrolledletter', 'title' => 'recentchanges-label-unpatrolled', 'legend' => 'recentchanges-legend-unpatrolled', 'grouping' => 'any', ], ], 'WatchlistExpiry' => false, 'EnableWatchstarPopover' => false, 'EnableWatchlistLabels' => false, 'WatchlistLabelsMaxPerUser' => 100, 'WatchlistPurgeRate' => 0.1, 'WatchlistExpiryMaxDuration' => '1 year', 'EnableChangesListQueryPartitioning' => false, 'RightsPage' => null, 'RightsUrl' => null, 'RightsText' => null, 'RightsIcon' => null, 'UseCopyrightUpload' => false, 'MaxCredits' => 0, 'ShowCreditsIfMax' => true, 'ImportSources' => [ ], 'ImportTargetNamespace' => null, 'ExportAllowHistory' => true, 'ExportMaxHistory' => 0, 'ExportAllowListContributors' => false, 'ExportMaxLinkDepth' => 0, 'ExportFromNamespaces' => false, 'ExportAllowAll' => false, 'ExportPagelistLimit' => 5000, 'XmlDumpSchemaVersion' => '0.11', 'WikiFarmSettingsDirectory' => null, 'WikiFarmSettingsExtension' => 'yaml', 'ExtensionFunctions' => [ ], 'ExtensionMessagesFiles' => [ ], 'MessagesDirs' => [ ], 'TranslationAliasesDirs' => [ ], 'ExtensionEntryPointListFiles' => [ ], 'EnableParserLimitReporting' => true, 'ValidSkinNames' => [ ], 'SpecialPages' => [ ], 'ExtensionCredits' => [ ], 'Hooks' => [ ], 'ServiceWiringFiles' => [ ], 'JobClasses' => [ 'deletePage' => 'MediaWiki\\Page\\DeletePageJob', 'refreshLinks' => 'MediaWiki\\JobQueue\\Jobs\\RefreshLinksJob', 'deleteLinks' => 'MediaWiki\\Page\\DeleteLinksJob', 'htmlCacheUpdate' => 'MediaWiki\\JobQueue\\Jobs\\HTMLCacheUpdateJob', 'sendMail' => [ 'class' => 'MediaWiki\\Mail\\EmaillingJob', 'services' => [ 'Emailer', ], ], 'enotifNotify' => [ 'class' => 'MediaWiki\\RecentChanges\\RecentChangeNotifyJob', 'services' => [ 'RecentChangeLookup', ], ], 'fixDoubleRedirect' => [ 'class' => 'MediaWiki\\JobQueue\\Jobs\\DoubleRedirectJob', 'services' => [ 'RevisionLookup', 'MagicWordFactory', 'WikiPageFactory', ], 'needsPage' => true, ], 'AssembleUploadChunks' => 'MediaWiki\\JobQueue\\Jobs\\AssembleUploadChunksJob', 'PublishStashedFile' => 'MediaWiki\\JobQueue\\Jobs\\PublishStashedFileJob', 'ThumbnailRender' => 'MediaWiki\\JobQueue\\Jobs\\ThumbnailRenderJob', 'UploadFromUrl' => 'MediaWiki\\JobQueue\\Jobs\\UploadFromUrlJob', 'recentChangesUpdate' => 'MediaWiki\\RecentChanges\\RecentChangesUpdateJob', 'refreshLinksPrioritized' => 'MediaWiki\\JobQueue\\Jobs\\RefreshLinksJob', 'refreshLinksDynamic' => 'MediaWiki\\JobQueue\\Jobs\\RefreshLinksJob', 'activityUpdateJob' => 'MediaWiki\\Watchlist\\ActivityUpdateJob', 'categoryMembershipChange' => [ 'class' => 'MediaWiki\\RecentChanges\\CategoryMembershipChangeJob', 'services' => [ 'RecentChangeFactory', ], ], 'CategoryCountUpdateJob' => [ 'class' => 'MediaWiki\\JobQueue\\Jobs\\CategoryCountUpdateJob', 'services' => [ 'ConnectionProvider', 'NamespaceInfo', ], ], 'clearUserWatchlist' => 'MediaWiki\\Watchlist\\ClearUserWatchlistJob', 'watchlistExpiry' => [ 'class' => 'MediaWiki\\Watchlist\\WatchlistExpiryJob', 'needsPage' => false, ], 'cdnPurge' => 'MediaWiki\\JobQueue\\Jobs\\CdnPurgeJob', 'userGroupExpiry' => 'MediaWiki\\User\\UserGroupExpiryJob', 'clearWatchlistNotifications' => 'MediaWiki\\Watchlist\\ClearWatchlistNotificationsJob', 'userOptionsUpdate' => 'MediaWiki\\User\\Options\\UserOptionsUpdateJob', 'revertedTagUpdate' => 'MediaWiki\\JobQueue\\Jobs\\RevertedTagUpdateJob', 'null' => 'MediaWiki\\JobQueue\\Jobs\\NullJob', 'userEditCountInit' => 'MediaWiki\\User\\UserEditCountInitJob', 'renameUserTable' => [ 'class' => 'MediaWiki\\RenameUser\\Job\\RenameUserTableJob', 'services' => [ 'MainConfig', 'DBLoadBalancerFactory', ], ], 'renameUserDerived' => [ 'class' => 'MediaWiki\\RenameUser\\Job\\RenameUserDerivedJob', 'services' => [ 'RenameUserFactory', 'UserFactory', ], ], 'renameUser' => [ 'class' => 'MediaWiki\\RenameUser\\Job\\RenameUserTableJob', 'services' => [ 'MainConfig', 'DBLoadBalancerFactory', ], ], ], 'JobTypesExcludedFromDefaultQueue' => [ 'AssembleUploadChunks', 'PublishStashedFile', 'UploadFromUrl', ], 'JobBackoffThrottling' => [ ], 'JobTypeConf' => [ 'default' => [ 'class' => 'MediaWiki\\JobQueue\\JobQueueDB', 'order' => 'random', 'claimTTL' => 3600, ], ], 'JobQueueIncludeInMaxLagFactor' => false, 'SpecialPageCacheUpdates' => [ 'Statistics' => [ 'MediaWiki\\Deferred\\SiteStatsUpdate', 'cacheUpdate', ], ], 'PagePropLinkInvalidations' => [ 'hiddencat' => 'categorylinks', ], 'CategoryMagicGallery' => true, 'CategoryPagingLimit' => 200, 'CategoryCollation' => 'uppercase', 'TempCategoryCollations' => [ ], 'SortedCategories' => false, 'TrackingCategories' => [ ], 'LogTypes' => [ '', 'block', 'protect', 'rights', 'delete', 'upload', 'move', 'import', 'interwiki', 'patrol', 'merge', 'suppress', 'tag', 'managetags', 'contentmodel', 'renameuser', ], 'LogRestrictions' => [ 'suppress' => 'suppressionlog', ], 'FilterLogTypes' => [ 'patrol' => true, 'tag' => true, 'newusers' => false, ], 'LogNames' => [ '' => 'all-logs-page', 'block' => 'blocklogpage', 'protect' => 'protectlogpage', 'rights' => 'rightslog', 'delete' => 'dellogpage', 'upload' => 'uploadlogpage', 'move' => 'movelogpage', 'import' => 'importlogpage', 'patrol' => 'patrol-log-page', 'merge' => 'mergelog', 'suppress' => 'suppressionlog', ], 'LogHeaders' => [ '' => 'alllogstext', 'block' => 'blocklogtext', 'delete' => 'dellogpagetext', 'import' => 'importlogpagetext', 'merge' => 'mergelogpagetext', 'move' => 'movelogpagetext', 'patrol' => 'patrol-log-header', 'protect' => 'protectlogtext', 'rights' => 'rightslogtext', 'suppress' => 'suppressionlogtext', 'upload' => 'uploadlogpagetext', ], 'LogActions' => [ ], 'LogActionsHandlers' => [ 'block/block' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'block/reblock' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'block/unblock' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'contentmodel/change' => 'MediaWiki\\Logging\\ContentModelLogFormatter', 'contentmodel/new' => 'MediaWiki\\Logging\\ContentModelLogFormatter', 'delete/delete' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/delete_redir' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/delete_redir2' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/event' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/restore' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/revision' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'import/interwiki' => 'MediaWiki\\Logging\\ImportLogFormatter', 'import/upload' => 'MediaWiki\\Logging\\ImportLogFormatter', 'interwiki/iw_add' => 'MediaWiki\\Logging\\InterwikiLogFormatter', 'interwiki/iw_delete' => 'MediaWiki\\Logging\\InterwikiLogFormatter', 'interwiki/iw_edit' => 'MediaWiki\\Logging\\InterwikiLogFormatter', 'managetags/activate' => 'MediaWiki\\Logging\\LogFormatter', 'managetags/create' => 'MediaWiki\\Logging\\LogFormatter', 'managetags/deactivate' => 'MediaWiki\\Logging\\LogFormatter', 'managetags/delete' => 'MediaWiki\\Logging\\LogFormatter', 'merge/merge' => [ 'class' => 'MediaWiki\\Logging\\MergeLogFormatter', 'services' => [ 'TitleParser', ], ], 'merge/merge-into' => [ 'class' => 'MediaWiki\\Logging\\MergeLogFormatter', 'services' => [ 'TitleParser', ], ], 'move/move' => [ 'class' => 'MediaWiki\\Logging\\MoveLogFormatter', 'services' => [ 'TitleParser', ], ], 'move/move_redir' => [ 'class' => 'MediaWiki\\Logging\\MoveLogFormatter', 'services' => [ 'TitleParser', ], ], 'patrol/patrol' => 'MediaWiki\\Logging\\PatrolLogFormatter', 'patrol/autopatrol' => 'MediaWiki\\Logging\\PatrolLogFormatter', 'protect/modify' => [ 'class' => 'MediaWiki\\Logging\\ProtectLogFormatter', 'services' => [ 'TitleParser', ], ], 'protect/move_prot' => [ 'class' => 'MediaWiki\\Logging\\ProtectLogFormatter', 'services' => [ 'TitleParser', ], ], 'protect/protect' => [ 'class' => 'MediaWiki\\Logging\\ProtectLogFormatter', 'services' => [ 'TitleParser', ], ], 'protect/unprotect' => [ 'class' => 'MediaWiki\\Logging\\ProtectLogFormatter', 'services' => [ 'TitleParser', ], ], 'renameuser/renameuser' => [ 'class' => 'MediaWiki\\Logging\\RenameuserLogFormatter', 'services' => [ 'TitleParser', ], ], 'rights/autopromote' => 'MediaWiki\\Logging\\RightsLogFormatter', 'rights/rights' => 'MediaWiki\\Logging\\RightsLogFormatter', 'suppress/block' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'suppress/delete' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'suppress/event' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'suppress/reblock' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'suppress/revision' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'tag/update' => 'MediaWiki\\Logging\\TagLogFormatter', 'upload/overwrite' => 'MediaWiki\\Logging\\UploadLogFormatter', 'upload/revert' => 'MediaWiki\\Logging\\UploadLogFormatter', 'upload/upload' => 'MediaWiki\\Logging\\UploadLogFormatter', ], 'ActionFilteredLogs' => [ 'block' => [ 'block' => [ 'block', ], 'reblock' => [ 'reblock', ], 'unblock' => [ 'unblock', ], ], 'contentmodel' => [ 'change' => [ 'change', ], 'new' => [ 'new', ], ], 'delete' => [ 'delete' => [ 'delete', ], 'delete_redir' => [ 'delete_redir', 'delete_redir2', ], 'restore' => [ 'restore', ], 'event' => [ 'event', ], 'revision' => [ 'revision', ], ], 'import' => [ 'interwiki' => [ 'interwiki', ], 'upload' => [ 'upload', ], ], 'managetags' => [ 'create' => [ 'create', ], 'delete' => [ 'delete', ], 'activate' => [ 'activate', ], 'deactivate' => [ 'deactivate', ], ], 'move' => [ 'move' => [ 'move', ], 'move_redir' => [ 'move_redir', ], ], 'newusers' => [ 'create' => [ 'create', 'newusers', ], 'create2' => [ 'create2', ], 'autocreate' => [ 'autocreate', ], 'byemail' => [ 'byemail', ], ], 'protect' => [ 'protect' => [ 'protect', ], 'modify' => [ 'modify', ], 'unprotect' => [ 'unprotect', ], 'move_prot' => [ 'move_prot', ], ], 'rights' => [ 'rights' => [ 'rights', ], 'autopromote' => [ 'autopromote', ], ], 'suppress' => [ 'event' => [ 'event', ], 'revision' => [ 'revision', ], 'delete' => [ 'delete', ], 'block' => [ 'block', ], 'reblock' => [ 'reblock', ], ], 'upload' => [ 'upload' => [ 'upload', ], 'overwrite' => [ 'overwrite', ], 'revert' => [ 'revert', ], ], ], 'NewUserLog' => true, 'WatchUserPageOnAccountCreation' => true, 'PageCreationLog' => true, 'AllowSpecialInclusion' => true, 'DisableQueryPageUpdate' => false, 'CountCategorizedImagesAsUsed' => false, 'MaxRedirectLinksRetrieved' => 500, 'RangeContributionsCIDRLimit' => [ 'IPv4' => 16, 'IPv6' => 32, ], 'Actions' => [ ], 'DefaultRobotPolicy' => 'index,follow', 'NamespaceRobotPolicies' => [ ], 'ArticleRobotPolicies' => [ ], 'ExemptFromUserRobotsControl' => null, 'DebugAPI' => false, 'APIModules' => [ ], 'APIFormatModules' => [ ], 'APIMetaModules' => [ ], 'APIPropModules' => [ ], 'APIListModules' => [ ], 'APIMaxDBRows' => 5000, 'APIMaxResultSize' => 8388608, 'APIMaxUncachedDiffs' => 1, 'APIMaxLagThreshold' => 7, 'APICacheHelpTimeout' => 3600, 'APIUselessQueryPages' => [ 'MIMEsearch', 'LinkSearch', ], 'AjaxLicensePreview' => true, 'CrossSiteAJAXdomains' => [ ], 'CrossSiteAJAXdomainExceptions' => [ ], 'AllowedCorsHeaders' => [ 'Accept', 'Accept-Language', 'Content-Language', 'Content-Type', 'Accept-Encoding', 'DNT', 'Origin', 'User-Agent', 'Api-User-Agent', 'Promise-Non-Write-API-Action', 'Access-Control-Max-Age', 'Authorization', ], 'RestAPIAdditionalRouteFiles' => [ ], 'RestLocalModuleTestBaseUrl' => null, 'RestModuleOverrides' => [ ], 'RestExternalModules' => [ ], 'RestTermsOfServiceUrl' => null, 'MaxShellMemory' => 307200, 'MaxShellFileSize' => 102400, 'MaxShellTime' => 180, 'MaxShellWallClockTime' => 180, 'ShellCgroup' => false, 'PhpCli' => '/usr/bin/php', 'ShellRestrictionMethod' => 'autodetect', 'ShellboxUrls' => [ 'default' => null, ], 'ShellboxSecretKey' => null, 'ShellboxShell' => '/bin/sh', 'HTTPTimeout' => 25, 'HTTPConnectTimeout' => 5.0, 'HTTPMaxTimeout' => 0, 'HTTPMaxConnectTimeout' => 0, 'HTTPImportTimeout' => 25, 'HTTPUserAgentContact' => false, 'AsyncHTTPTimeout' => 25, 'HTTPProxy' => '', 'LocalVirtualHosts' => [ ], 'LocalHTTPProxy' => false, 'AllowExternalReqID' => false, 'GenerateReqIDFormat' => 'rand24', 'JobRunRate' => 1, 'RunJobsAsync' => false, 'UpdateRowsPerJob' => 300, 'UpdateRowsPerQuery' => 100, 'RedirectOnLogin' => null, 'EventRelayerConfig' => [ 'default' => [ 'class' => 'Wikimedia\\EventRelayer\\EventRelayerNull', ], ], 'Pingback' => false, 'OriginTrials' => [ ], 'ReportToExpiry' => 86400, 'ReportToEndpoints' => [ ], 'FeaturePolicyReportOnly' => [ ], 'SkinsPreferred' => [ 'vector-2022', 'vector', ], 'SpecialContributeSkinsEnabled' => [ ], 'SpecialContributeNewPageTarget' => null, 'EnableEditRecovery' => false, 'EditRecoveryExpiry' => 2592000, 'UseCodexSpecialBlock' => false, 'ShowLogoutConfirmation' => false, 'EnableProtectionIndicators' => true, 'OutputPipelineStages' => [ ], 'FeatureShutdown' => [ ], 'UseLeximorph' => false, 'UsePostprocCacheLegacy' => false, 'UsePostprocCacheParsoid' => true, 'ParserOptionsLogUnsafeSampleRate' => 0, 'ReturnExperimentalPFragmentTypes' => [ ], 'UseParsoidLinksUpdate' => null, 'UseParsoidMessages' => false, 'UseParsoidParser' => true, 'SiteLookup' => [ ], ], 'type' => [ 'ConfigRegistry' => 'object', 'AssumeProxiesUseDefaultProtocolPorts' => 'boolean', 'ForceHTTPS' => 'boolean', 'ExtensionDirectory' => [ 'string', 'null', ], 'StyleDirectory' => [ 'string', 'null', ], 'UploadDirectory' => [ 'string', 'boolean', 'null', ], 'Logos' => [ 'object', 'boolean', ], 'ReferrerPolicy' => [ 'array', 'string', 'boolean', ], 'ActionPaths' => 'object', 'MainPageIsDomainRoot' => 'boolean', 'ImgAuthUrlPathMap' => 'object', 'LocalFileRepo' => 'object', 'ForeignFileRepos' => 'array', 'UseSharedUploads' => 'boolean', 'SharedUploadDirectory' => [ 'string', 'null', ], 'SharedUploadPath' => [ 'string', 'null', ], 'HashedSharedUploadDirectory' => 'boolean', 'FetchCommonsDescriptions' => 'boolean', 'SharedUploadDBname' => [ 'boolean', 'string', ], 'SharedUploadDBprefix' => 'string', 'SharedUploadDBschema' => [ 'string', 'null', ], 'CacheSharedUploads' => 'boolean', 'ForeignUploadTargets' => 'array', 'UploadDialog' => 'object', 'FileBackends' => 'object', 'LockManagers' => 'array', 'DefaultLockManager' => [ 'string', 'null', ], 'CopyUploadsDomains' => 'array', 'CopyUploadTimeout' => [ 'boolean', 'integer', ], 'SharedThumbnailScriptPath' => [ 'string', 'boolean', ], 'HashedUploadDirectory' => 'boolean', 'CSPUploadEntryPoint' => 'boolean', 'FileExtensions' => 'array', 'ProhibitedFileExtensions' => 'array', 'MimeTypeExclusions' => 'array', 'TrustedMediaFormats' => 'array', 'MediaHandlers' => 'object', 'NativeImageLazyLoading' => 'boolean', 'ParserTestMediaHandlers' => 'object', 'MaxInterlacingAreas' => 'object', 'SVGConverters' => 'object', 'SVGNativeRendering' => [ 'string', 'boolean', ], 'MaxImageArea' => [ 'string', 'integer', 'boolean', ], 'TiffThumbnailType' => 'array', 'GenerateThumbnailOnParse' => 'boolean', 'EnableAutoRotation' => [ 'boolean', 'null', ], 'Antivirus' => [ 'string', 'null', ], 'AntivirusSetup' => 'object', 'MimeDetectorCommand' => [ 'string', 'null', ], 'XMLMimeTypes' => 'object', 'ImageLimits' => 'array', 'ThumbLimits' => 'array', 'ThumbnailNamespaces' => 'array', 'ThumbnailSteps' => [ 'array', 'null', ], 'ThumbnailBuckets' => [ 'array', 'null', ], 'UploadThumbnailRenderMap' => 'object', 'GalleryOptions' => 'object', 'DjvuDump' => [ 'string', 'null', ], 'DjvuRenderer' => [ 'string', 'null', ], 'DjvuTxt' => [ 'string', 'null', ], 'DjvuPostProcessor' => [ 'string', 'null', ], 'SMTP' => [ 'boolean', 'object', ], 'EnotifFromEditor' => 'boolean', 'EmailConfirmationBanner' => 'boolean', 'EnotifRevealEditorAddress' => 'boolean', 'UsersNotifiedOnAllChanges' => 'object', 'DBmwschema' => [ 'string', 'null', ], 'SharedTables' => 'array', 'DBservers' => [ 'boolean', 'array', ], 'LBFactoryConf' => 'object', 'LocalDatabases' => 'array', 'VirtualDomainsMapping' => 'object', 'RemoteVirtualDomainsMapping' => 'object', 'FileSchemaMigrationStage' => 'integer', 'ExternalLinksDomainGaps' => 'object', 'ContentHandlers' => 'object', 'NamespaceContentModels' => 'object', 'TextModelsToParse' => 'array', 'ExternalStores' => 'array', 'ExternalServers' => 'object', 'DefaultExternalStore' => [ 'array', 'boolean', ], 'RevisionCacheExpiry' => 'integer', 'PageLanguageUseDB' => 'boolean', 'DiffEngine' => [ 'string', 'null', ], 'ExternalDiffEngine' => [ 'string', 'boolean', ], 'Wikidiff2Options' => 'object', 'RequestTimeLimit' => [ 'integer', 'null', ], 'CriticalSectionTimeLimit' => 'number', 'PoolCounterConf' => [ 'object', 'null', ], 'PoolCountClientConf' => 'object', 'MaxUserDBWriteDuration' => [ 'integer', 'boolean', ], 'MaxJobDBWriteDuration' => [ 'integer', 'boolean', ], 'MultiShardSiteStats' => 'boolean', 'ObjectCaches' => 'object', 'WANObjectCache' => 'object', 'MicroStashType' => [ 'string', 'integer', ], 'ParsoidCacheConfig' => 'object', 'ParsoidSelectiveUpdateSampleRate' => 'integer', 'SplitParsoidParserCache' => 'boolean', 'ParserCacheFilterConfig' => 'object', 'ChronologyProtectorSecret' => 'string', 'SuspiciousIpExpiry' => [ 'integer', 'boolean', ], 'MemCachedServers' => 'array', 'LocalisationCacheConf' => 'object', 'ExtensionInfoMTime' => [ 'integer', 'boolean', ], 'CdnServers' => 'object', 'CdnServersNoPurge' => 'object', 'HTCPRouting' => 'object', 'GrammarForms' => 'object', 'ExtraInterlanguageLinkPrefixes' => 'array', 'InterlanguageLinkCodeMap' => 'object', 'ExtraLanguageNames' => 'object', 'ExtraLanguageCodes' => 'object', 'DummyLanguageCodes' => 'object', 'DisabledVariants' => 'object', 'ForceUIMsgAsContentMsg' => 'object', 'RawHtmlMessages' => 'array', 'OverrideUcfirstCharacters' => 'object', 'XhtmlNamespaces' => 'object', 'BrowserFormatDetection' => 'string', 'SkinMetaTags' => 'object', 'SkipSkins' => 'object', 'FragmentMode' => 'array', 'FooterIcons' => 'object', 'PageShareSkinsEnabled' => 'array', 'InterwikiLogoOverride' => 'array', 'ResourceModules' => 'object', 'ResourceModuleSkinStyles' => 'object', 'ResourceLoaderSources' => 'object', 'ResourceLoaderMaxage' => 'object', 'ResourceLoaderMaxQueryLength' => [ 'integer', 'boolean', ], 'CanonicalNamespaceNames' => 'object', 'ExtraNamespaces' => 'object', 'ExtraGenderNamespaces' => 'object', 'NamespaceAliases' => 'object', 'CapitalLinkOverrides' => 'object', 'NamespacesWithSubpages' => 'object', 'NamespacesWithoutAutoSummaries' => 'array', 'ContentNamespaces' => 'array', 'ShortPagesNamespaceExclusions' => 'array', 'ExtraSignatureNamespaces' => 'array', 'InvalidRedirectTargets' => 'array', 'LocalInterwikis' => 'array', 'InterwikiCache' => [ 'boolean', 'object', ], 'SiteTypes' => 'object', 'UrlProtocols' => 'array', 'TidyConfig' => 'object', 'ParsoidSettings' => 'object', 'ParsoidExperimentalParserFunctionOutput' => 'boolean', 'NoFollowNsExceptions' => 'array', 'NoFollowDomainExceptions' => 'array', 'ExternalLinksIgnoreDomains' => 'array', 'EnableMagicLinks' => 'object', 'ManualRevertSearchRadius' => 'integer', 'RevertedTagMaxDepth' => 'integer', 'CentralIdLookupProviders' => 'object', 'CentralIdLookupProvider' => 'string', 'UserRegistrationProviders' => 'object', 'PasswordPolicy' => 'object', 'AuthManagerConfig' => [ 'object', 'null', ], 'AuthManagerAutoConfig' => 'object', 'RememberMe' => 'string', 'ReauthenticateTime' => 'object', 'ChangeCredentialsBlacklist' => 'array', 'RemoveCredentialsBlacklist' => 'array', 'PasswordConfig' => 'object', 'PasswordResetRoutes' => 'object', 'SignatureAllowedLintErrors' => 'array', 'ReservedUsernames' => 'array', 'DefaultUserOptions' => 'object', 'ConditionalUserOptions' => 'object', 'HiddenPrefs' => 'array', 'UserJsPrefLimit' => 'integer', 'AuthenticationTokenVersion' => [ 'string', 'null', ], 'SessionProviders' => 'object', 'AutoCreateTempUser' => 'object', 'AutoblockExemptions' => 'array', 'BlockCIDRLimit' => 'object', 'EnableMultiBlocks' => 'boolean', 'GroupPermissions' => 'object', 'PrivilegedGroups' => 'array', 'RevokePermissions' => 'object', 'GroupInheritsPermissions' => 'object', 'ImplicitGroups' => 'array', 'GroupsAddToSelf' => 'object', 'GroupsRemoveFromSelf' => 'object', 'RestrictedGroups' => 'object', 'UserRequirementsPrivateConditions' => 'array', 'RestrictionTypes' => 'array', 'RestrictionLevels' => 'array', 'CascadingRestrictionLevels' => 'array', 'SemiprotectedRestrictionLevels' => 'array', 'NamespaceProtection' => 'object', 'RestrictUserPageEditing' => 'boolean', 'NonincludableNamespaces' => 'object', 'Autopromote' => 'object', 'AutopromoteOnce' => 'object', 'AutopromoteOnceRCExcludedGroups' => 'array', 'AddGroups' => 'object', 'RemoveGroups' => 'object', 'AvailableRights' => 'array', 'ImplicitRights' => 'array', 'AccountCreationThrottle' => [ 'integer', 'array', ], 'TempAccountCreationThrottle' => 'array', 'TempAccountNameAcquisitionThrottle' => 'array', 'SpamRegex' => 'array', 'SummarySpamRegex' => 'array', 'DnsBlacklistUrls' => 'array', 'ProxyList' => [ 'string', 'array', ], 'ProxyWhitelist' => 'array', 'SoftBlockRanges' => 'array', 'RateLimits' => 'object', 'RateLimitsExcludedIPs' => 'array', 'ExternalQuerySources' => 'object', 'PasswordAttemptThrottle' => 'array', 'GrantPermissions' => 'object', 'GrantPermissionGroups' => 'object', 'GrantRiskGroups' => 'object', 'EnableBotPasswords' => 'boolean', 'BotPasswordsCluster' => [ 'string', 'boolean', ], 'BotPasswordsDatabase' => [ 'string', 'boolean', ], 'BotPasswordsLimit' => 'integer', 'ReauthenticateForActions' => 'object', 'CSPHeader' => [ 'boolean', 'object', ], 'CSPReportOnlyHeader' => [ 'boolean', 'object', ], 'CSPUseReportURIDirective' => [ 'boolean', 'object', ], 'CSPFalsePositiveUrls' => 'object', 'AllowCrossOrigin' => 'boolean', 'RestAllowCrossOriginCookieAuth' => 'boolean', 'CookieSameSite' => [ 'string', 'null', ], 'CacheVaryCookies' => 'array', 'DeviceBoundSessions' => 'boolean', 'DeviceBoundSessionsReportOnly' => 'boolean', 'DeviceBoundSessionCookieName' => 'string', 'DeviceBoundSessionCredentialTTL' => 'integer', 'DeviceBoundSessionChallengeTTL' => 'integer', 'DeviceBoundSessionBindingTTL' => 'integer', 'DeviceBoundSessionScopeExcludes' => 'array', 'TrxProfilerLimits' => 'object', 'DebugLogGroups' => 'object', 'MWLoggerDefaultSpi' => 'object', 'Profiler' => 'object', 'StatsTarget' => [ 'string', 'null', ], 'StatsFormat' => [ 'string', 'null', ], 'StatsPrefix' => 'string', 'OpenTelemetryConfig' => [ 'object', 'null', ], 'OpenSearchTemplates' => 'object', 'NamespacesToBeSearchedDefault' => 'object', 'SitemapNamespaces' => [ 'boolean', 'array', ], 'SitemapNamespacesPriorities' => [ 'boolean', 'object', ], 'SitemapApiConfig' => 'object', 'SpecialSearchFormOptions' => 'object', 'SearchMatchRedirectPreference' => 'boolean', 'SearchRunSuggestedQuery' => 'boolean', 'PreviewOnOpenNamespaces' => 'object', 'ReadOnlyWatchedItemStore' => 'boolean', 'GitRepositoryViewers' => 'object', 'InstallerInitialPages' => 'array', 'RCLinkLimits' => 'array', 'RCLinkDays' => 'array', 'RCFeeds' => 'object', 'OverrideSiteFeed' => 'object', 'FeedClasses' => 'object', 'AdvertisedFeedTypes' => 'array', 'SoftwareTags' => 'object', 'RestrictedTagViewRights' => 'object', 'RecentChangesFlags' => 'object', 'WatchlistExpiry' => 'boolean', 'EnableWatchstarPopover' => 'boolean', 'EnableWatchlistLabels' => 'boolean', 'WatchlistLabelsMaxPerUser' => 'integer', 'WatchlistPurgeRate' => 'number', 'WatchlistExpiryMaxDuration' => [ 'string', 'null', ], 'EnableChangesListQueryPartitioning' => 'boolean', 'ImportSources' => 'object', 'ExtensionFunctions' => 'array', 'ExtensionMessagesFiles' => 'object', 'MessagesDirs' => 'object', 'TranslationAliasesDirs' => 'object', 'ExtensionEntryPointListFiles' => 'object', 'ValidSkinNames' => 'object', 'SpecialPages' => 'object', 'ExtensionCredits' => 'object', 'Hooks' => 'object', 'ServiceWiringFiles' => 'array', 'JobClasses' => 'object', 'JobTypesExcludedFromDefaultQueue' => 'array', 'JobBackoffThrottling' => 'object', 'JobTypeConf' => 'object', 'SpecialPageCacheUpdates' => 'object', 'PagePropLinkInvalidations' => 'object', 'TempCategoryCollations' => 'array', 'SortedCategories' => 'boolean', 'TrackingCategories' => 'array', 'LogTypes' => 'array', 'LogRestrictions' => 'object', 'FilterLogTypes' => 'object', 'LogNames' => 'object', 'LogHeaders' => 'object', 'LogActions' => 'object', 'LogActionsHandlers' => 'object', 'ActionFilteredLogs' => 'object', 'WatchUserPageOnAccountCreation' => 'boolean', 'RangeContributionsCIDRLimit' => 'object', 'Actions' => 'object', 'NamespaceRobotPolicies' => 'object', 'ArticleRobotPolicies' => 'object', 'ExemptFromUserRobotsControl' => [ 'array', 'null', ], 'APIModules' => 'object', 'APIFormatModules' => 'object', 'APIMetaModules' => 'object', 'APIPropModules' => 'object', 'APIListModules' => 'object', 'APIUselessQueryPages' => 'array', 'CrossSiteAJAXdomains' => 'object', 'CrossSiteAJAXdomainExceptions' => 'object', 'AllowedCorsHeaders' => 'array', 'RestAPIAdditionalRouteFiles' => 'array', 'RestLocalModuleTestBaseUrl' => [ 'string', 'null', ], 'RestModuleOverrides' => 'object', 'RestExternalModules' => 'object', 'RestTermsOfServiceUrl' => [ 'string', 'null', ], 'ShellRestrictionMethod' => [ 'string', 'boolean', ], 'ShellboxUrls' => 'object', 'ShellboxSecretKey' => [ 'string', 'null', ], 'ShellboxShell' => [ 'string', 'null', ], 'HTTPTimeout' => 'number', 'HTTPConnectTimeout' => 'number', 'HTTPMaxTimeout' => 'number', 'HTTPMaxConnectTimeout' => 'number', 'HTTPUserAgentContact' => [ 'string', 'boolean', ], 'LocalVirtualHosts' => 'object', 'LocalHTTPProxy' => [ 'string', 'boolean', ], 'GenerateReqIDFormat' => 'string', 'EventRelayerConfig' => 'object', 'Pingback' => 'boolean', 'OriginTrials' => 'array', 'ReportToExpiry' => 'integer', 'ReportToEndpoints' => 'array', 'FeaturePolicyReportOnly' => 'array', 'SkinsPreferred' => 'array', 'SpecialContributeSkinsEnabled' => 'array', 'SpecialContributeNewPageTarget' => [ 'string', 'null', ], 'EnableEditRecovery' => 'boolean', 'EditRecoveryExpiry' => 'integer', 'UseCodexSpecialBlock' => 'boolean', 'ShowLogoutConfirmation' => 'boolean', 'EnableProtectionIndicators' => 'boolean', 'OutputPipelineStages' => 'object', 'FeatureShutdown' => 'array', 'UseLeximorph' => 'boolean', 'UsePostprocCacheLegacy' => 'boolean', 'UsePostprocCacheParsoid' => 'boolean', 'ParserOptionsLogUnsafeSampleRate' => 'integer', 'ReturnExperimentalPFragmentTypes' => 'array', 'UseParsoidLinksUpdate' => [ 'boolean', 'null', ], 'UseParsoidMessages' => [ 'boolean', 'null', ], 'UseParsoidParser' => 'boolean', 'SiteLookup' => 'object', ], 'mergeStrategy' => [ 'TiffThumbnailType' => 'replace', 'LBFactoryConf' => 'replace', 'InterwikiCache' => 'replace', 'PasswordPolicy' => 'array_replace_recursive', 'AuthManagerAutoConfig' => 'array_plus_2d', 'GroupPermissions' => 'array_plus_2d', 'RevokePermissions' => 'array_plus_2d', 'AddGroups' => 'array_merge_recursive', 'RemoveGroups' => 'array_merge_recursive', 'RateLimits' => 'array_plus_2d', 'GrantPermissions' => 'array_plus_2d', 'MWLoggerDefaultSpi' => 'replace', 'Profiler' => 'replace', 'Hooks' => 'array_merge_recursive', 'RestModuleOverrides' => 'array_replace_recursive', 'RestExternalModules' => 'array_replace_recursive', ], 'dynamicDefault' => [ 'UsePathInfo' => [ 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultUsePathInfo', ], ], 'Script' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultScript', ], ], 'LoadScript' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLoadScript', ], ], 'RestPath' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultRestPath', ], ], 'StylePath' => [ 'use' => [ 'ResourceBasePath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultStylePath', ], ], 'LocalStylePath' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLocalStylePath', ], ], 'ExtensionAssetsPath' => [ 'use' => [ 'ResourceBasePath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultExtensionAssetsPath', ], ], 'ArticlePath' => [ 'use' => [ 'Script', 'UsePathInfo', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultArticlePath', ], ], 'UploadPath' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultUploadPath', ], ], 'FileCacheDirectory' => [ 'use' => [ 'UploadDirectory', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultFileCacheDirectory', ], ], 'Logo' => [ 'use' => [ 'ResourceBasePath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLogo', ], ], 'DeletedDirectory' => [ 'use' => [ 'UploadDirectory', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultDeletedDirectory', ], ], 'ShowEXIF' => [ 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultShowEXIF', ], ], 'SharedPrefix' => [ 'use' => [ 'DBprefix', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultSharedPrefix', ], ], 'SharedSchema' => [ 'use' => [ 'DBmwschema', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultSharedSchema', ], ], 'DBerrorLogTZ' => [ 'use' => [ 'Localtimezone', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultDBerrorLogTZ', ], ], 'Localtimezone' => [ 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLocaltimezone', ], ], 'LocalTZoffset' => [ 'use' => [ 'Localtimezone', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLocalTZoffset', ], ], 'ResourceBasePath' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultResourceBasePath', ], ], 'MetaNamespace' => [ 'use' => [ 'Sitename', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultMetaNamespace', ], ], 'CookieSecure' => [ 'use' => [ 'ForceHTTPS', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultCookieSecure', ], ], 'CookiePrefix' => [ 'use' => [ 'SharedDB', 'SharedPrefix', 'SharedTables', 'DBname', 'DBprefix', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultCookiePrefix', ], ], 'ReadOnlyFile' => [ 'use' => [ 'UploadDirectory', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultReadOnlyFile', ], ], ], ], 'config-schema' => [ 'UploadStashScalerBaseUrl' => [ 'deprecated' => 'since 1.36 Use thumbProxyUrl in $wgLocalFileRepo', ], 'IllegalFileChars' => [ 'deprecated' => 'since 1.41; no longer customizable', ], 'ThumbnailNamespaces' => [ 'items' => [ 'type' => 'integer', ], ], 'LocalDatabases' => [ 'items' => [ 'type' => 'string', ], ], 'ParserCacheFilterConfig' => [ 'additionalProperties' => [ 'type' => 'object', 'description' => 'A map of namespace IDs to filter definitions.', 'additionalProperties' => [ 'type' => 'object', 'description' => 'A map of filter names to values.', 'properties' => [ 'minCpuTime' => [ 'type' => 'number', ], ], ], ], ], 'RawHtmlMessages' => [ 'items' => [ 'type' => 'string', ], ], 'InterwikiLogoOverride' => [ 'items' => [ 'type' => 'string', ], ], 'LegalTitleChars' => [ 'deprecated' => 'since 1.41; use Extension:TitleBlacklist to customize', ], 'ReauthenticateTime' => [ 'additionalProperties' => [ 'type' => [ 'integer', 'array', ], ], ], 'ChangeCredentialsBlacklist' => [ 'items' => [ 'type' => 'string', ], ], 'RemoveCredentialsBlacklist' => [ 'items' => [ 'type' => 'string', ], ], 'GroupPermissions' => [ 'additionalProperties' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'boolean', ], ], ], 'GroupInheritsPermissions' => [ 'additionalProperties' => [ 'type' => 'string', ], ], 'AvailableRights' => [ 'items' => [ 'type' => 'string', ], ], 'ImplicitRights' => [ 'items' => [ 'type' => 'string', ], ], 'SoftBlockRanges' => [ 'items' => [ 'type' => 'string', ], ], 'ExternalQuerySources' => [ 'additionalProperties' => [ 'type' => 'object', 'properties' => [ 'enabled' => [ 'type' => 'boolean', 'default' => false, ], 'url' => [ 'type' => 'string', 'format' => 'uri', ], 'timeout' => [ 'type' => 'integer', 'default' => 10, ], ], 'required' => [ 'enabled', 'url', ], 'additionalProperties' => false, ], ], 'GrantPermissions' => [ 'additionalProperties' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'boolean', ], ], ], 'GrantPermissionGroups' => [ 'additionalProperties' => [ 'type' => 'string', ], ], 'SitemapNamespacesPriorities' => [ 'deprecated' => 'since 1.45 and ignored', ], 'SitemapApiConfig' => [ 'additionalProperties' => [ 'enabled' => [ 'type' => 'bool', ], 'sitemapsPerIndex' => [ 'type' => 'int', ], 'pagesPerSitemap' => [ 'type' => 'int', ], 'expiry' => [ 'type' => 'int', ], 'skipRedirects' => [ 'type' => 'bool', ], ], ], 'SoftwareTags' => [ 'additionalProperties' => [ 'type' => 'boolean', ], ], 'UseCopyrightUpload' => [ 'deprecated' => 'since 1.47 This feature is being removed.', ], 'JobBackoffThrottling' => [ 'additionalProperties' => [ 'type' => 'number', ], ], 'JobTypeConf' => [ 'additionalProperties' => [ 'type' => 'object', 'properties' => [ 'class' => [ 'type' => 'string', ], 'order' => [ 'type' => 'string', ], 'claimTTL' => [ 'type' => 'integer', ], ], ], ], 'TrackingCategories' => [ 'deprecated' => 'since 1.25 Extensions should now register tracking categories using the new extension registration system.', ], 'RangeContributionsCIDRLimit' => [ 'additionalProperties' => [ 'type' => 'integer', ], ], 'RestModuleOverrides' => [ 'additionalProperties' => [ 'type' => 'object', 'properties' => [ 'availability' => [ 'type' => 'string', ], 'groups' => [ 'type' => 'array', ], ], ], ], 'RestExternalModules' => [ 'additionalProperties' => [ 'type' => 'object', 'properties' => [ 'info' => [ 'type' => 'object', 'properties' => [ 'version' => [ 'type' => 'string', ], 'title' => [ 'type' => 'string', ], 'x-i18n-title' => [ 'type' => 'string', ], 'description' => [ 'type' => 'string', ], 'x-i18n-description' => [ 'type' => 'string', ], ], 'required' => [ 'version', ], ], 'base' => [ 'type' => 'string', 'format' => 'uri', ], 'spec' => [ 'type' => 'string', 'format' => 'uri', ], ], 'required' => [ 'info', 'base', 'spec', ], ], ], 'ShellboxUrls' => [ 'additionalProperties' => [ 'type' => [ 'string', 'boolean', 'null', ], ], ], ], 'obsolete-config' => [ 'MangleFlashPolicy' => 'Since 1.39; no longer has any effect.', 'EnableOpenSearchSuggest' => 'Since 1.35, no longer used', 'AutoloadAttemptLowercase' => 'Since 1.40; no longer has any effect.', ],]
Service for page undelete actions.
Provide primary and replica IDatabase connections.
Result wrapper for grabbing data queried from an IDatabase object.
fetchObject()
Fetch the next row from the given result object, in object form.
numRows()
Get the number of rows in a result object.
setStashKey(string $keyValue)
doReauthRedirect(PermissionStatus $status, array $queryParams, ?string $subaction=null)
Redirect to the reauth flow on Special:UserLogin.
element(SerializerNode $parent, SerializerNode $node, $contents)
msg( $key,... $params)