MediaWiki master
File.php
Go to the documentation of this file.
1<?php
10
11use LogicException;
18use MediaWiki\HookContainer\ProtectedHookAccessorTrait;
36use RuntimeException;
37use Shellbox\Command\BoxedCommand;
38use StatusValue;
43
80abstract class File implements MediaHandlerState {
81 use ProtectedHookAccessorTrait;
82
83 // Bitfield values akin to the revision deletion constants
84 public const DELETED_FILE = 1;
85 public const DELETED_COMMENT = 2;
86 public const DELETED_USER = 4;
87 public const DELETED_RESTRICTED = 8;
88
90 public const RENDER_NOW = 1;
95 public const RENDER_FORCE = 2;
96
97 public const DELETE_SOURCE = 1;
98
99 // Audience options for File::getDescription()
100 public const FOR_PUBLIC = 1;
101 public const FOR_THIS_USER = 2;
102 public const RAW = 3;
103
104 // Options for File::thumbName()
105 public const THUMB_FULL_NAME = 1;
106
127 public $repo;
128
130 protected $title;
131
133 protected $lastError;
134
139 protected $redirected;
140
143
145 protected $fsFile;
146
148 protected $handler;
149
151 protected $url;
152
154 protected $extension;
155
157 protected $name;
158
160 protected $path;
161
163 protected $hashPath;
164
168 protected $pageCount;
169
172
174 protected $redirectTitle;
175
177 protected $canRender;
178
182 protected $isSafeFile;
183
185 protected $repoClass = FileRepo::class;
186
189
191 private $handlerState = [];
192
204 public function __construct( $title, $repo ) {
205 // Some subclasses do not use $title, but set name/title some other way
206 if ( $title !== false ) {
207 $title = self::normalizeTitle( $title, 'exception' );
208 }
209 $this->title = $title;
210 $this->repo = $repo;
211 }
212
221 public static function normalizeTitle( $title, $exception = false ) {
222 $ret = $title;
223
224 if ( !$ret instanceof Title ) {
225 if ( $ret instanceof PageIdentity ) {
226 $ret = Title::castFromPageIdentity( $ret );
227 } elseif ( $ret instanceof LinkTarget ) {
228 $ret = Title::castFromLinkTarget( $ret );
229 }
230 }
231
232 if ( $ret instanceof Title ) {
233 # Normalize NS_MEDIA -> NS_FILE
234 if ( $ret->getNamespace() === NS_MEDIA ) {
235 $ret = Title::makeTitleSafe( NS_FILE, $ret->getDBkey() );
236 # Double check the titles namespace
237 } elseif ( $ret->getNamespace() !== NS_FILE ) {
238 $ret = null;
239 }
240 } else {
241 # Convert strings to Title objects
242 $ret = Title::makeTitleSafe( NS_FILE, (string)$ret );
243 }
244 if ( !$ret && $exception !== false ) {
245 throw new RuntimeException( "`$title` is not a valid file title." );
246 }
247
248 return $ret;
249 }
250
251 public function __get( $name ) {
252 $function = [ $this, 'get' . ucfirst( $name ) ];
253 if ( !is_callable( $function ) ) {
254 return null;
255 } else {
256 $this->$name = $function();
257
258 return $this->$name;
259 }
260 }
261
270 public static function normalizeExtension( $extension ) {
271 $lower = strtolower( $extension );
272 $squish = [
273 'htm' => 'html',
274 'jpeg' => 'jpg',
275 'mpeg' => 'mpg',
276 'tiff' => 'tif',
277 'ogv' => 'ogg' ];
278 if ( isset( $squish[$lower] ) ) {
279 return $squish[$lower];
280 } elseif ( preg_match( '/^[0-9a-z]+$/', $lower ) ) {
281 return $lower;
282 } else {
283 return '';
284 }
285 }
286
295 public static function checkExtensionCompatibility( File $old, $new ) {
296 $oldMime = $old->getMimeType();
297 $n = strrpos( $new, '.' );
298 $newExt = self::normalizeExtension( $n ? substr( $new, $n + 1 ) : '' );
299 $mimeMagic = MediaWikiServices::getInstance()->getMimeAnalyzer();
300
301 return $mimeMagic->isMatchingExtension( $newExt, $oldMime );
302 }
303
311 public function upgradeRow() {
312 }
313
321 public static function splitMime( ?string $mime ) {
322 if ( $mime === null ) {
323 return [ 'unknown', 'unknown' ];
324 } elseif ( str_contains( $mime, '/' ) ) {
325 return explode( '/', $mime, 2 );
326 } else {
327 return [ $mime, 'unknown' ];
328 }
329 }
330
338 public static function compare( File $a, File $b ) {
339 return strcmp( $a->getName(), $b->getName() );
340 }
341
348 public function getName() {
349 if ( $this->name === null ) {
350 $this->assertRepoDefined();
351 $this->name = $this->repo->getNameFromTitle( $this->title );
352 }
353
354 return $this->name;
355 }
356
363 public function getExtension() {
364 if ( $this->extension === null ) {
365 $n = strrpos( $this->getName(), '.' );
366 $this->extension = self::normalizeExtension(
367 $n ? substr( $this->getName(), $n + 1 ) : '' );
368 }
369
370 return $this->extension;
371 }
372
378 public function getTitle() {
379 return $this->title;
380 }
381
387 public function getOriginalTitle() {
388 if ( $this->redirected !== null ) {
389 return $this->getRedirectedTitle();
390 }
391
392 return $this->title;
393 }
394
401 public function getUrl() {
402 if ( $this->url === null ) {
403 $this->assertRepoDefined();
404 $ext = $this->getExtension();
405 $this->url = $this->repo->getZoneUrl( 'public', $ext ) . '/' . $this->getUrlRel();
406 }
407
408 return $this->appendRequestProvenance( $this->url, [
409 'format' => 'original',
410 ] );
411 }
412
420 final public function appendRequestProvenance( string $url, array $provenance ) {
421 $config = MediaWikiServices::getInstance()->getMainConfig();
422 if ( !$config->get( MainConfigNames::TrackMediaRequestProvenance ) ) {
423 return $url;
424 }
425
426 if ( str_contains( $url, '?' ) ) {
427 [ $url, $queryString ] = explode( '?', $url, 2 );
428 $query = wfCgiToArray( $queryString );
429 } else {
430 $query = [];
431 }
432
433 $site = $config->get( MainConfigNames::ServerName );
434 $entryPoint = defined( 'MEDIAWIKI_JOB_RUNNER' ) ? 'job' : MW_ENTRY_POINT;
435 if (
436 ( $query['utm_content'] ?? null ) === 'original' &&
437 ( $provenance['format'] ?? null ) === 'thumbnail'
438 ) {
439 // Special case for when an original file is used as a thumbnail in a page
440 $provenance['format'] = 'thumbnail_unscaled';
441 }
442
443 // We use UTM parameters, because they're likely to be stripped by search engines and other
444 // places that we don't want to pollute with this information.
445 $lesserEvil = [
446 // Site which is requesting the image, e.g. 'www.mediawiki.org'
447 'utm_source' => $query['utm_source'] ?? $site,
448 // Software component involved, e.g. 'parser' or 'imageinfo'
449 // Entry point is used as fallback if not specified, e.g. 'index', 'api', 'rest'
450 'utm_campaign' => $provenance['generator'] ?? $query['utm_campaign'] ?? $entryPoint,
451 // Format of the requested image, 'original', 'thumbnail' or 'thumbnail_unscaled'
452 'utm_content' => $provenance['format'] ?? $query['utm_content'] ?? null,
453 ];
454
455 // Append like this for consistent order of query params:
456 // tracking params first in this order, anything else at the end.
457 // Values defined above override the original query.
458 return wfAppendQuery( $url, array_filter( $lesserEvil ) + $query );
459 }
460
468 public function getDescriptionShortUrl() {
469 return null;
470 }
471
480 public function getFullUrl() {
481 return (string)MediaWikiServices::getInstance()->getUrlUtils()
482 ->expand( $this->getUrl(), PROTO_RELATIVE );
483 }
484
489 public function getCanonicalUrl() {
490 return (string)MediaWikiServices::getInstance()->getUrlUtils()
491 ->expand( $this->getUrl(), PROTO_CANONICAL );
492 }
493
497 public function getViewURL() {
498 if ( $this->mustRender() ) {
499 if ( $this->canRender() ) {
500 return $this->createThumb( $this->getWidth() );
501 } else {
502 wfDebug( __METHOD__ . ': supposed to render ' . $this->getName() .
503 ' (' . $this->getMimeType() . "), but can't!" );
504
505 return $this->getUrl(); # hm... return NULL?
506 }
507 } else {
508 return $this->getUrl();
509 }
510 }
511
526 public function getPath() {
527 if ( $this->path === null ) {
528 $this->assertRepoDefined();
529 $this->path = $this->repo->getZonePath( 'public' ) . '/' . $this->getRel();
530 }
531
532 return $this->path;
533 }
534
542 public function getLocalRefPath() {
543 $this->assertRepoDefined();
544 if ( !$this->fsFile ) {
545 $timer = MediaWikiServices::getInstance()->getStatsFactory()
546 ->getTiming( 'media_thumbnail_generate_fetchoriginal_seconds' )
547 ->start();
548
549 $this->fsFile = $this->repo->getLocalReference( $this->getPath() );
550
551 $timer->stop();
552
553 if ( !$this->fsFile ) {
554 $this->fsFile = false; // null => false; cache negative hits
555 }
556 }
557
558 return ( $this->fsFile )
559 ? $this->fsFile->getPath()
560 : false;
561 }
562
571 public function addToShellboxCommand( BoxedCommand $command, string $boxedName ) {
572 return $this->repo->addShellboxInputFile( $command, $boxedName, $this->getVirtualUrl() );
573 }
574
586 public function getWidth( $page = 1 ) {
587 return false;
588 }
589
601 public function getHeight( $page = 1 ) {
602 return false;
603 }
604
614 public function getThumbnailBucket( $desiredWidth, $page = 1 ) {
615 $thumbnailBuckets = MediaWikiServices::getInstance()
616 ->getMainConfig()->get( MainConfigNames::ThumbnailBuckets );
617 $thumbnailMinimumBucketDistance = MediaWikiServices::getInstance()
618 ->getMainConfig()->get( MainConfigNames::ThumbnailMinimumBucketDistance );
619 $imageWidth = $this->getWidth( $page );
620
621 if ( $imageWidth === false ) {
622 return false;
623 }
624
625 if ( $desiredWidth > $imageWidth ) {
626 return false;
627 }
628
629 if ( !$thumbnailBuckets ) {
630 return false;
631 }
632
633 $sortedBuckets = $thumbnailBuckets;
634
635 sort( $sortedBuckets );
636
637 foreach ( $sortedBuckets as $bucket ) {
638 if ( $bucket >= $imageWidth ) {
639 return false;
640 }
641
642 if ( $bucket - $thumbnailMinimumBucketDistance > $desiredWidth ) {
643 return $bucket;
644 }
645 }
646
647 // Image is bigger than any available bucket
648 return false;
649 }
650
660 public function getDisplayWidthHeight( $maxWidth, $maxHeight, $page = 1 ) {
661 if ( !$maxWidth || !$maxHeight ) {
662 // should never happen
663 throw new ConfigException( 'Using a choice from $wgImageLimits that is 0x0' );
664 }
665
666 $width = $this->getWidth( $page );
667 $height = $this->getHeight( $page );
668 if ( !$width || !$height ) {
669 return [ 0, 0 ];
670 }
671
672 // Calculate the thumbnail size.
673 if ( $width <= $maxWidth && $height <= $maxHeight ) {
674 // Vectorized image, do nothing.
675 } elseif ( $width / $height >= $maxWidth / $maxHeight ) {
676 # The limiting factor is the width, not the height.
677 $height = round( $height * $maxWidth / $width );
678 $width = $maxWidth;
679 // Note that $height <= $maxHeight now.
680 } else {
681 $newwidth = floor( $width * $maxHeight / $height );
682 $height = round( $height * $newwidth / $width );
683 $width = $newwidth;
684 // Note that $height <= $maxHeight now, but might not be identical
685 // because of rounding.
686 }
687 return [ $width, $height ];
688 }
689
696 public function getLength() {
697 $handler = $this->getHandler();
698 if ( $handler ) {
699 return $handler->getLength( $this );
700 } else {
701 return 0;
702 }
703 }
704
710 public function isVectorized() {
711 $handler = $this->getHandler();
712 if ( $handler ) {
713 return $handler->isVectorized( $this );
714 } else {
715 return false;
716 }
717 }
718
730 public function getAvailableLanguages() {
731 $handler = $this->getHandler();
732 if ( $handler ) {
733 return $handler->getAvailableLanguages( $this );
734 } else {
735 return [];
736 }
737 }
738
746 public function getMatchedLanguage( $userPreferredLanguage ) {
747 $handler = $this->getHandler();
748 if ( $handler ) {
750 $userPreferredLanguage,
752 );
753 }
754
755 return null;
756 }
757
765 public function getDefaultRenderLanguage() {
766 $handler = $this->getHandler();
767 if ( $handler ) {
768 return $handler->getDefaultRenderLanguage( $this );
769 } else {
770 return null;
771 }
772 }
773
785 $handler = $this->getHandler();
786 if ( !$handler ) {
787 // We cannot handle image whatsoever, thus
788 // one would not expect it to be animated
789 // so true.
790 return true;
791 }
792
793 return !$this->allowInlineDisplay()
794 // Image is not animated, so one would
795 // not expect thumb to be
796 || !$handler->isAnimatedImage( $this )
797 // Image is animated, but thumbnail isn't.
798 // This is unexpected to the user.
799 || $handler->canAnimateThumbnail( $this );
800 }
801
809 public function getMetadata() {
810 return false;
811 }
812
814 public function getHandlerState( string $key ) {
815 return $this->handlerState[$key] ?? null;
816 }
817
819 public function setHandlerState( string $key, $value ) {
820 $this->handlerState[$key] = $value;
821 }
822
829 public function getMetadataArray(): array {
830 return [];
831 }
832
840 public function getMetadataItem( string $itemName ) {
841 $items = $this->getMetadataItems( [ $itemName ] );
842 return $items[$itemName] ?? null;
843 }
844
852 public function getMetadataItems( array $itemNames ): array {
853 return array_intersect_key(
854 $this->getMetadataArray(),
855 array_fill_keys( $itemNames, true ) );
856 }
857
864 public function getCommonMetaArray() {
865 $handler = $this->getHandler();
866 return $handler ? $handler->getCommonMetaArray( $this ) : false;
867 }
868
876 public function convertMetadataVersion( $metadata, $version ) {
877 $handler = $this->getHandler();
878 if ( $handler ) {
879 return $handler->convertMetadataVersion( $metadata, $version );
880 } else {
881 return $metadata;
882 }
883 }
884
892 public function getBitDepth() {
893 return 0;
894 }
895
903 public function getSize() {
904 return false;
905 }
906
915 public function getMimeType() {
916 return 'unknown/unknown';
917 }
918
927 public function getMediaType() {
928 return MEDIATYPE_UNKNOWN;
929 }
930
941 public function canRender() {
942 if ( $this->canRender === null ) {
943 $this->canRender = $this->getHandler() && $this->handler->canRender( $this ) && $this->exists();
944 }
945
946 return $this->canRender;
947 }
948
953 protected function getCanRender() {
954 return $this->canRender();
955 }
956
968 public function mustRender() {
969 return $this->getHandler() && $this->handler->mustRender( $this );
970 }
971
977 public function allowInlineDisplay() {
978 return $this->canRender();
979 }
980
994 public function isSafeFile() {
995 if ( $this->isSafeFile === null ) {
996 $this->isSafeFile = $this->getIsSafeFileUncached();
997 }
998
999 return $this->isSafeFile;
1000 }
1001
1007 protected function getIsSafeFile() {
1008 return $this->isSafeFile();
1009 }
1010
1016 protected function getIsSafeFileUncached() {
1017 $trustedMediaFormats = MediaWikiServices::getInstance()->getMainConfig()
1018 ->get( MainConfigNames::TrustedMediaFormats );
1019
1020 if ( $this->allowInlineDisplay() ) {
1021 return true;
1022 }
1023 if ( $this->isTrustedFile() ) {
1024 return true;
1025 }
1026
1027 $type = $this->getMediaType();
1028 $mime = $this->getMimeType();
1029
1030 if ( !$type || $type === MEDIATYPE_UNKNOWN ) {
1031 return false; # unknown type, not trusted
1032 }
1033 if ( in_array( $type, $trustedMediaFormats ) ) {
1034 return true;
1035 }
1036
1037 if ( $mime === "unknown/unknown" ) {
1038 return false; # unknown type, not trusted
1039 }
1040 if ( in_array( $mime, $trustedMediaFormats ) ) {
1041 return true;
1042 }
1043
1044 return false;
1045 }
1046
1060 protected function isTrustedFile() {
1061 # this could be implemented to check a flag in the database,
1062 # look for signatures, etc
1063 return false;
1064 }
1065
1076 public function load( $flags = 0 ) {
1077 }
1078
1087 public function exists() {
1088 return $this->getPath() && $this->repo->fileExists( $this->path );
1089 }
1090
1098 public function isVisible() {
1099 return $this->exists();
1100 }
1101
1105 private function getTransformScript() {
1106 if ( $this->transformScript === null ) {
1107 $this->transformScript = false;
1108 if ( $this->repo ) {
1109 $script = $this->repo->getThumbScriptUrl();
1110 if ( $script ) {
1111 $this->transformScript = wfAppendQuery( $script, [ 'f' => $this->getName() ] );
1112 }
1113 }
1114 }
1115
1116 return $this->transformScript;
1117 }
1118
1126 public function getUnscaledThumb( $handlerParams = [] ) {
1127 $hp =& $handlerParams;
1128 $page = $hp['page'] ?? false;
1129 $width = $this->getWidth( $page );
1130 if ( !$width ) {
1131 return $this->iconThumb();
1132 }
1133 $hp['width'] = $width;
1134 // be sure to ignore any height specification as well (T64258)
1135 unset( $hp['height'] );
1136
1137 return $this->transform( $hp );
1138 }
1139
1155 public function thumbName( $params, $flags = 0 ) {
1156 $name = ( $this->repo && !( $flags & self::THUMB_FULL_NAME ) )
1157 ? $this->repo->nameForThumb( $this->getName() )
1158 : $this->getName();
1159
1160 return $this->generateThumbName( $name, $params );
1161 }
1162
1171 public function generateThumbName( $name, $params ) {
1172 if ( !$this->getHandler() ) {
1173 return null;
1174 }
1175 $extension = $this->getExtension();
1176 [ $thumbExt, ] = $this->getHandler()->getThumbType(
1177 $extension, $this->getMimeType(), $params );
1178 $thumbName = $this->getHandler()->makeParamString( $params );
1179
1180 if ( $this->repo->supportsSha1URLs() ) {
1181 $thumbName .= '-' . $this->getSha1() . '.' . $thumbExt;
1182 } else {
1183 $thumbName .= '-' . $name;
1184
1185 if ( $thumbExt != $extension ) {
1186 $thumbName .= ".$thumbExt";
1187 }
1188 }
1189
1190 return $thumbName;
1191 }
1192
1210 public function createThumb( $width, $height = -1 ) {
1211 $params = [ 'width' => $width ];
1212 if ( $height != -1 ) {
1213 $params['height'] = $height;
1214 }
1215 $thumb = $this->transform( $params );
1216 if ( !$thumb || $thumb->isError() ) {
1217 return '';
1218 }
1219
1220 return $thumb->getUrl();
1221 }
1222
1232 protected function transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags ) {
1233 $ignoreImageErrors = MediaWikiServices::getInstance()->getMainConfig()
1234 ->get( MainConfigNames::IgnoreImageErrors );
1235
1236 $handler = $this->getHandler();
1237 if ( $handler && $ignoreImageErrors && !( $flags & self::RENDER_NOW ) ) {
1238 return $handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
1239 } else {
1240 return new MediaTransformError( 'thumbnail_error',
1241 $params['width'], 0, wfMessage( 'thumbnail-dest-create' ) );
1242 }
1243 }
1244
1254 public function transform( $params, $flags = 0 ) {
1255 $thumbnailEpoch = MediaWikiServices::getInstance()->getMainConfig()
1256 ->get( MainConfigNames::ThumbnailEpoch );
1257
1258 do {
1259 if ( !$this->canRender() ) {
1260 $thumb = $this->iconThumb();
1261 break; // not a bitmap or renderable image, don't try
1262 }
1263
1264 // Get the descriptionUrl to embed it as comment into the thumbnail. T21791.
1265 $descriptionUrl = $this->getDescriptionUrl();
1266 if ( $descriptionUrl ) {
1267 $params['descriptionUrl'] = MediaWikiServices::getInstance()->getUrlUtils()
1268 ->expand( $descriptionUrl, PROTO_CANONICAL );
1269 }
1270
1271 $handler = $this->getHandler();
1272 $script = $this->getTransformScript();
1273 if ( $script && !( $flags & self::RENDER_NOW ) ) {
1274 // Use a script to transform on client request, if possible
1275 $thumb = $handler->getScriptedTransform( $this, $script, $params );
1276 if ( $thumb ) {
1277 break;
1278 }
1279 }
1280
1281 $normalisedParams = $params;
1282 $handler->normaliseParams( $this, $normalisedParams );
1283
1284 $thumbName = $this->thumbName( $normalisedParams );
1285 // final thumb path, if the media handler decides to use a thumbnail for the given params
1286 $thumbPath = $this->getThumbPath( $thumbName );
1287 $thumbUrl = $this->modifyClientThumbUrl( $this->getThumbUrl( $thumbName ), $normalisedParams );
1288
1289 if ( $this->repo ) {
1290 // Defer rendering if a 404 handler is set up...
1291 if ( $this->repo->canTransformVia404() && !( $flags & self::RENDER_NOW ) ) {
1292 // XXX: Pass in the storage path even though we are not rendering anything
1293 // and the path is supposed to be an FS path. This is due to getScalerType()
1294 // getting called on the path and clobbering $thumb->getUrl() if it's false.
1295 $thumb = $handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
1296 break;
1297 }
1298 // Check if an up-to-date thumbnail already exists...
1299 wfDebug( __METHOD__ . ": Doing stat for $thumbPath" );
1300 if ( !( $flags & self::RENDER_FORCE ) && $this->repo->fileExists( $thumbPath ) ) {
1301 $timestamp = $this->repo->getFileTimestamp( $thumbPath );
1302 if ( $timestamp !== false && $timestamp >= $thumbnailEpoch ) {
1303 // XXX: Pass in the storage path even though we are not rendering anything
1304 // and the path is supposed to be an FS path. This is due to getScalerType()
1305 // getting called on the path and clobbering $thumb->getUrl() if it's false.
1306 $thumb = $handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
1307 $thumb->setStoragePath( $thumbPath );
1308 break;
1309 }
1310 } elseif ( $flags & self::RENDER_FORCE ) {
1311 wfDebug( __METHOD__ . ": forcing rendering per flag File::RENDER_FORCE" );
1312 }
1313
1314 // If the backend is ready-only, don't keep generating thumbnails
1315 // only to return transformation errors, just return the error now.
1316 if ( $this->repo->getReadOnlyReason() !== false ) {
1317 $thumb = $this->transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags );
1318 break;
1319 }
1320
1321 // Check to see if local transformation is disabled.
1322 if ( !$this->repo->canTransformLocally() ) {
1323 LoggerFactory::getInstance( 'thumbnail' )
1324 ->error( 'Local transform denied by configuration' );
1325 $thumb = new MediaTransformError(
1326 wfMessage(
1327 'thumbnail_error',
1328 'MediaWiki is configured to disallow local image scaling'
1329 ),
1330 $params['width'],
1331 0
1332 );
1333 break;
1334 }
1335 }
1336
1337 $tmpFile = $this->makeTransformTmpFile( $thumbPath );
1338
1339 if ( !$tmpFile ) {
1340 $thumb = $this->transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags );
1341 } else {
1342 $thumb = $this->generateAndSaveThumb( $tmpFile, $params, $flags );
1343 }
1344 } while ( false );
1345
1346 return $thumb ?: false;
1347 }
1348
1356 public function generateAndSaveThumb( $tmpFile, $transformParams, $flags ) {
1357 $ignoreImageErrors = MediaWikiServices::getInstance()->getMainConfig()
1358 ->get( MainConfigNames::IgnoreImageErrors );
1359
1360 if ( !$this->repo->canTransformLocally() ) {
1361 LoggerFactory::getInstance( 'thumbnail' )
1362 ->error( 'Local transform denied by configuration' );
1363 return new MediaTransformError(
1364 wfMessage(
1365 'thumbnail_error',
1366 'MediaWiki is configured to disallow local image scaling'
1367 ),
1368 $transformParams['width'],
1369 0
1370 );
1371 }
1372
1373 $statsFactory = MediaWikiServices::getInstance()->getStatsFactory();
1374
1375 $handler = $this->getHandler();
1376
1377 $normalisedParams = $transformParams;
1378 $handler->normaliseParams( $this, $normalisedParams );
1379
1380 $thumbName = $this->thumbName( $normalisedParams );
1381 // final thumb path, if the media handler decides to use a thumbnail for the given params
1382 $thumbPath = $this->getThumbPath( $thumbName );
1383 $thumbUrl = $this->modifyClientThumbUrl( $this->getThumbUrl( $thumbName ), $normalisedParams );
1384 $tmpThumbPath = $tmpFile->getPath();
1385
1386 if ( $handler->supportsBucketing() ) {
1387 $this->generateBucketsIfNeeded( $normalisedParams, $flags );
1388 }
1389
1390 $timer = $statsFactory->getTiming( 'media_thumbnail_generate_transform_seconds' )->start();
1391
1392 // Actually render the thumbnail...
1393 $thumb = $handler->doTransform( $this, $tmpThumbPath, $thumbUrl, $transformParams );
1394 $tmpFile->bind( $thumb ); // keep alive with $thumb
1395
1396 $timer->stop();
1397
1398 if ( !$thumb ) { // bad params?
1399 $thumb = false;
1400 } elseif ( $thumb->isError() ) { // transform error
1402 '@phan-var MediaTransformError $thumb';
1403 $this->lastError = $thumb->toText();
1404 // Ignore errors if requested
1405 if ( $ignoreImageErrors && !( $flags & self::RENDER_NOW ) ) {
1406 $thumb = $handler->getTransform( $this, $tmpThumbPath, $thumbUrl, $transformParams );
1407 }
1408 } elseif ( $this->repo && $thumb->hasFile() && !$thumb->fileIsSource() ) {
1409 // Copy the thumbnail from the file system into storage...
1410
1411 $timer = $statsFactory->getTiming( 'media_thumbnail_generate_store_seconds' )
1412 ->start();
1413
1414 wfDebug( __METHOD__ . ": copying $tmpThumbPath to $thumbPath" );
1415 $disposition = $this->getThumbDisposition( $thumbName );
1416 $status = $this->repo->quickImport( $tmpThumbPath, $thumbPath, $disposition );
1417 if ( $status->isOK() ) {
1418 $thumb->setStoragePath( $thumbPath );
1419 } else {
1420 $thumb = $this->transformErrorOutput( $thumbPath, $thumbUrl, $transformParams, $flags );
1421 }
1422
1423 $timer->stop();
1424
1425 // Give extensions a chance to do something with this thumbnail...
1426 $this->getHookRunner()->onFileTransformed( $this, $thumb, $tmpThumbPath, $thumbPath );
1427 }
1428
1429 return $thumb;
1430 }
1431
1438 protected function generateBucketsIfNeeded( $params, $flags = 0 ) {
1439 if ( !$this->repo
1440 || !isset( $params['physicalWidth'] )
1441 || !isset( $params['physicalHeight'] )
1442 ) {
1443 return false;
1444 }
1445
1446 $bucket = $this->getThumbnailBucket( $params['physicalWidth'] );
1447
1448 if ( !$bucket || $bucket == $params['physicalWidth'] ) {
1449 return false;
1450 }
1451
1452 $bucketPath = $this->getBucketThumbPath( $bucket );
1453
1454 if ( $this->repo->fileExists( $bucketPath ) ) {
1455 return false;
1456 }
1457
1458 $timer = MediaWikiServices::getInstance()->getStatsFactory()
1459 ->getTiming( 'media_thumbnail_generate_bucket_seconds' );
1460 $timer->start();
1461
1462 $params['physicalWidth'] = $bucket;
1463 $params['width'] = $bucket;
1464
1465 $params = $this->getHandler()->sanitizeParamsForBucketing( $params );
1466
1467 $tmpFile = $this->makeTransformTmpFile( $bucketPath );
1468
1469 if ( !$tmpFile ) {
1470 return false;
1471 }
1472
1473 $thumb = $this->generateAndSaveThumb( $tmpFile, $params, $flags );
1474
1475 if ( !$thumb || $thumb->isError() ) {
1476 return false;
1477 }
1478
1479 $timer->stop();
1480
1481 $this->tmpBucketedThumbCache[$bucket] = $tmpFile->getPath();
1482 // For the caching to work, we need to make the tmp file survive as long as
1483 // this object exists
1484 $tmpFile->bind( $this );
1485
1486 return true;
1487 }
1488
1494 public function getThumbnailSource( $params ) {
1495 if ( $this->repo
1496 && $this->getHandler()->supportsBucketing()
1497 && isset( $params['physicalWidth'] )
1498 ) {
1499 $bucket = $this->getThumbnailBucket( $params['physicalWidth'] );
1500 if ( $bucket ) {
1501 if ( $this->getWidth() != 0 ) {
1502 $bucketHeight = round( $this->getHeight() * ( $bucket / $this->getWidth() ) );
1503 } else {
1504 $bucketHeight = 0;
1505 }
1506
1507 // Try to avoid reading from storage if the file was generated by this script
1508 if ( isset( $this->tmpBucketedThumbCache[$bucket] ) ) {
1509 $tmpPath = $this->tmpBucketedThumbCache[$bucket];
1510
1511 if ( file_exists( $tmpPath ) ) {
1512 return [
1513 'path' => $tmpPath,
1514 'width' => $bucket,
1515 'height' => $bucketHeight
1516 ];
1517 }
1518 }
1519
1520 $bucketPath = $this->getBucketThumbPath( $bucket );
1521
1522 if ( $this->repo->fileExists( $bucketPath ) ) {
1523 $fsFile = $this->repo->getLocalReference( $bucketPath );
1524
1525 if ( $fsFile ) {
1526 return [
1527 'path' => $fsFile->getPath(),
1528 'width' => $bucket,
1529 'height' => $bucketHeight
1530 ];
1531 }
1532 }
1533 }
1534 }
1535
1536 // Thumbnailing a very large file could result in network saturation if
1537 // everyone does it at once.
1538 if ( $this->getSize() >= 1e7 ) { // 10 MB
1539 $work = new PoolCounterWorkViaCallback( 'GetLocalFileCopy', sha1( $this->getName() ),
1540 [ 'doWork' => $this->getLocalRefPath( ... ) ]
1541 );
1542 $srcPath = $work->execute();
1543 } else {
1544 $srcPath = $this->getLocalRefPath();
1545 }
1546
1547 // Original file
1548 return [
1549 'path' => $srcPath,
1550 'width' => $this->getWidth(),
1551 'height' => $this->getHeight()
1552 ];
1553 }
1554
1560 protected function getBucketThumbPath( $bucket ) {
1561 $thumbName = $this->getBucketThumbName( $bucket );
1562 return $this->getThumbPath( $thumbName );
1563 }
1564
1570 protected function getBucketThumbName( $bucket ) {
1571 return $this->thumbName( [ 'physicalWidth' => $bucket ] );
1572 }
1573
1579 protected function makeTransformTmpFile( $thumbPath ) {
1580 $thumbExt = FileBackend::extensionFromPath( $thumbPath );
1581 return MediaWikiServices::getInstance()->getTempFSFileFactory()
1582 ->newTempFSFile( 'transform_', $thumbExt );
1583 }
1584
1590 public function getThumbDisposition( $thumbName, $dispositionType = 'inline' ) {
1591 $fileName = $this->getName(); // file name to suggest
1592 $thumbExt = FileBackend::extensionFromPath( $thumbName );
1593 if ( $thumbExt != '' && $thumbExt !== $this->getExtension() ) {
1594 $fileName .= ".$thumbExt";
1595 }
1596
1597 return FileBackend::makeContentDisposition( $dispositionType, $fileName );
1598 }
1599
1608 public function getHandler( ?Language $lang = null ) {
1609 if ( !$this->handler ) {
1610 $lang ??= RequestContext::getMain()->getLanguage();
1611 $this->handler = MediaHandler::getHandler( $this->getMimeType(), $lang );
1612 }
1613
1614 return $this->handler;
1615 }
1616
1622 public function iconThumb() {
1623 global $IP;
1624 $resourceBasePath = MediaWikiServices::getInstance()->getMainConfig()
1625 ->get( MainConfigNames::ResourceBasePath );
1626 $assetsPath = "{$resourceBasePath}/resources/assets/file-type-icons/";
1627 $assetsDirectory = "$IP/resources/assets/file-type-icons/";
1628
1629 $try = [ 'fileicon-' . $this->getExtension() . '.png', 'fileicon.png' ];
1630 foreach ( $try as $icon ) {
1631 if ( file_exists( $assetsDirectory . $icon ) ) { // always FS
1632 $params = [ 'width' => 120, 'height' => 120 ];
1633
1634 return new ThumbnailImage( $this, $assetsPath . $icon, false, $params );
1635 }
1636 }
1637
1638 return null;
1639 }
1640
1646 public function getLastError() {
1647 return $this->lastError;
1648 }
1649
1657 protected function getThumbnails() {
1658 return [];
1659 }
1660
1669 public function purgeCache( $options = [] ) {
1670 }
1671
1677 public function purgeDescription() {
1678 $title = $this->getTitle();
1679 if ( $title ) {
1680 $title->invalidateCache();
1681 $hcu = MediaWikiServices::getInstance()->getHTMLCacheUpdater();
1682 $hcu->purgeTitleUrls( $title, $hcu::PURGE_INTENT_TXROUND_REFLECTED );
1683 }
1684 }
1685
1690 public function purgeEverything() {
1691 // Delete thumbnails and refresh file metadata cache
1692 $this->purgeCache();
1693 $this->purgeDescription();
1694 // Purge cache of all pages using this file
1695 $title = $this->getTitle();
1696 if ( $title ) {
1697 $job = HTMLCacheUpdateJob::newForBacklinks(
1698 $title,
1699 'imagelinks',
1700 [ 'causeAction' => 'file-purge' ]
1701 );
1702 MediaWikiServices::getInstance()->getJobQueueGroup()->lazyPush( $job );
1703 }
1704 }
1705
1718 public function getHistory( $limit = null, $start = null, $end = null, $inc = true ) {
1719 return [];
1720 }
1721
1732 public function nextHistoryLine() {
1733 return false;
1734 }
1735
1743 public function resetHistory() {
1744 }
1745
1753 public function getHashPath() {
1754 if ( $this->hashPath === null ) {
1755 $this->assertRepoDefined();
1756 $this->hashPath = $this->repo->getHashPath( $this->getName() );
1757 }
1758
1759 return $this->hashPath;
1760 }
1761
1769 public function getRel() {
1770 return $this->getHashPath() . $this->getName();
1771 }
1772
1781 public function getArchiveRel( $suffix = false ) {
1782 $path = 'archive/' . $this->getHashPath();
1783 if ( $suffix === false ) {
1784 $path = rtrim( $path, '/' );
1785 } else {
1786 $path .= $suffix;
1787 }
1788
1789 return $path;
1790 }
1791
1800 public function getThumbRel( $suffix = false ) {
1801 $path = $this->getRel();
1802 if ( $suffix !== false ) {
1803 $path .= '/' . $suffix;
1804 }
1805
1806 return $path;
1807 }
1808
1816 public function getUrlRel() {
1817 return $this->getHashPath() . rawurlencode( $this->getName() );
1818 }
1819
1828 private function getArchiveThumbRel( $archiveName, $suffix = false ) {
1829 $path = $this->getArchiveRel( $archiveName );
1830 if ( $suffix !== false ) {
1831 $path .= '/' . $suffix;
1832 }
1833
1834 return $path;
1835 }
1836
1843 public function getArchivePath( $suffix = false ) {
1844 $this->assertRepoDefined();
1845
1846 return $this->repo->getZonePath( 'public' ) . '/' . $this->getArchiveRel( $suffix );
1847 }
1848
1856 public function getArchiveThumbPath( $archiveName, $suffix = false ) {
1857 $this->assertRepoDefined();
1858
1859 return $this->repo->getZonePath( 'thumb' ) . '/' .
1860 $this->getArchiveThumbRel( $archiveName, $suffix );
1861 }
1862
1870 public function getThumbPath( $suffix = false ) {
1871 $this->assertRepoDefined();
1872
1873 return $this->repo->getZonePath( 'thumb' ) . '/' . $this->getThumbRel( $suffix );
1874 }
1875
1882 public function getTranscodedPath( $suffix = false ) {
1883 $this->assertRepoDefined();
1884
1885 return $this->repo->getZonePath( 'transcoded' ) . '/' . $this->getThumbRel( $suffix );
1886 }
1887
1895 public function getArchiveUrl( $suffix = false ) {
1896 $this->assertRepoDefined();
1897 $ext = $this->getExtension();
1898 $path = $this->repo->getZoneUrl( 'public', $ext ) . '/archive/' . $this->getHashPath();
1899 if ( $suffix === false ) {
1900 $path = rtrim( $path, '/' );
1901 } else {
1902 $path .= rawurlencode( $suffix );
1903 }
1904
1905 return $path;
1906 }
1907
1916 public function getArchiveThumbUrl( $archiveName, $suffix = false ) {
1917 $this->assertRepoDefined();
1918 $ext = $this->getExtension();
1919 $path = $this->repo->getZoneUrl( 'thumb', $ext ) . '/archive/' .
1920 $this->getHashPath() . rawurlencode( $archiveName );
1921 if ( $suffix !== false ) {
1922 $path .= '/' . rawurlencode( $suffix );
1923 }
1924
1925 return $path;
1926 }
1927
1935 private function getZoneUrl( $zone, $suffix = false ) {
1936 $this->assertRepoDefined();
1937 $ext = $this->getExtension();
1938 $path = $this->repo->getZoneUrl( $zone, $ext ) . '/' . $this->getUrlRel();
1939 if ( $suffix !== false ) {
1940 $path .= '/' . rawurlencode( $suffix );
1941 }
1942
1943 return $path;
1944 }
1945
1953 public function getThumbUrl( $suffix = false ) {
1954 return $this->getZoneUrl( 'thumb', $suffix );
1955 }
1956
1969 public function modifyClientThumbUrl( $url, $handlerParams ) {
1970 if ( $this->repo->isLocal() && ( $handlerParams['isFilePageThumb'] ?? null ) ) {
1971 // Use a versioned URL on file description pages
1972 return wfAppendQuery( $url, [ '_' => $this->getTimestamp() ] );
1973 } elseif ( $handlerParams['requestProvenance'] ?? null ) {
1974 return $this->appendRequestProvenance( $url, [
1975 'generator' => $handlerParams['requestProvenance'],
1976 ] );
1977 } else {
1978 return $url;
1979 }
1980 }
1981
1988 public function getTranscodedUrl( $suffix = false ) {
1989 return $this->getZoneUrl( 'transcoded', $suffix );
1990 }
1991
1999 public function getVirtualUrl( $suffix = false ) {
2000 $this->assertRepoDefined();
2001 $path = $this->repo->getVirtualUrl() . '/public/' . $this->getUrlRel();
2002 if ( $suffix !== false ) {
2003 $path .= '/' . rawurlencode( $suffix );
2004 }
2005
2006 return $path;
2007 }
2008
2016 public function getArchiveVirtualUrl( $suffix = false ) {
2017 $this->assertRepoDefined();
2018 $path = $this->repo->getVirtualUrl() . '/public/archive/' . $this->getHashPath();
2019 if ( $suffix === false ) {
2020 $path = rtrim( $path, '/' );
2021 } else {
2022 $path .= rawurlencode( $suffix );
2023 }
2024
2025 return $path;
2026 }
2027
2035 public function getThumbVirtualUrl( $suffix = false ) {
2036 $this->assertRepoDefined();
2037 $path = $this->repo->getVirtualUrl() . '/thumb/' . $this->getUrlRel();
2038 if ( $suffix !== false ) {
2039 $path .= '/' . rawurlencode( $suffix );
2040 }
2041
2042 return $path;
2043 }
2044
2048 protected function isHashed() {
2049 $this->assertRepoDefined();
2050
2051 return (bool)$this->repo->getHashLevels();
2052 }
2053
2054 protected function readOnlyError(): never {
2055 throw new LogicException( static::class . ': write operations are not supported' );
2056 }
2057
2080 public function publish( $src, $flags = 0, array $options = [] ) {
2081 $this->readOnlyError();
2082 }
2083
2088 public function formatMetadata( $context = false ) {
2089 $handler = $this->getHandler();
2090 return $handler ? $handler->formatMetadata( $this, $context ) : false;
2091 }
2092
2098 public function isLocal() {
2099 return $this->repo && $this->repo->isLocal();
2100 }
2101
2107 public function getRepoName() {
2108 return $this->repo ? $this->repo->getName() : 'unknown';
2109 }
2110
2117 public function getRepo() {
2118 return $this->repo;
2119 }
2120
2128 public function isOld() {
2129 return false;
2130 }
2131
2140 public function isDeleted( $field ) {
2141 return false;
2142 }
2143
2150 public function getVisibility() {
2151 return 0;
2152 }
2153
2159 public function wasDeleted() {
2160 $title = $this->getTitle();
2161
2162 return $title && $title->hasDeletedEdits();
2163 }
2164
2178 public function move( $target ) {
2179 $this->readOnlyError();
2180 }
2181
2200 public function deleteFile( $reason, UserIdentity $user, $suppress = false ) {
2201 $this->readOnlyError();
2202 }
2203
2218 public function restore( $versions = [], $unsuppress = false ) {
2219 $this->readOnlyError();
2220 }
2221
2230 public function isMultipage() {
2231 return $this->getHandler() && $this->handler->isMultiPage( $this );
2232 }
2233
2241 public function pageCount() {
2242 if ( $this->pageCount === null ) {
2243 if ( $this->getHandler() && $this->handler->isMultiPage( $this ) ) {
2244 $this->pageCount = $this->handler->pageCount( $this );
2245 } else {
2246 $this->pageCount = false;
2247 }
2248 }
2249
2250 return $this->pageCount;
2251 }
2252
2262 public static function scaleHeight( $srcWidth, $srcHeight, $dstWidth ) {
2263 // Exact integer multiply followed by division
2264 if ( $srcWidth == 0 ) {
2265 return 0;
2266 } else {
2267 return (int)round( $srcHeight * $dstWidth / $srcWidth );
2268 }
2269 }
2270
2278 public function getDescriptionUrl() {
2279 if ( $this->repo ) {
2280 return $this->repo->getDescriptionUrl( $this->getName() );
2281 } else {
2282 return false;
2283 }
2284 }
2285
2295 public function getDescriptionText( ?Language $lang = null ) {
2296 if ( !$this->repo || !$this->repo->fetchDescription ) {
2297 return false;
2298 }
2299
2300 if ( $lang === null ) {
2301 wfDeprecatedMsg( 'Calling File::getDescriptionText without a lang parameter ' .
2302 'was deprecated in MediaWiki 1.46', '1.46' );
2303 global $wgLang;
2304 $lang = $wgLang;
2305 }
2306
2307 $renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName(), $lang->getCode() );
2308 if ( $renderUrl ) {
2309 $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
2310 $key = $this->repo->getLocalCacheKey(
2311 'file-remote-description',
2312 $lang->getCode(),
2313 md5( $this->getName() )
2314 );
2315 $fname = __METHOD__;
2316
2317 return $cache->getWithSetCallback(
2318 $key,
2319 $this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE,
2320 static function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl, $fname ) {
2321 wfDebug( "Fetching shared description from $renderUrl" );
2322 $res = MediaWikiServices::getInstance()->getHttpRequestFactory()->
2323 get( $renderUrl, [], $fname );
2324 if ( !$res ) {
2325 $ttl = WANObjectCache::TTL_UNCACHEABLE;
2326 }
2327
2328 return $res;
2329 }
2330 );
2331 }
2332
2333 return false;
2334 }
2335
2351 public function getUploader( int $audience = self::FOR_PUBLIC, ?Authority $performer = null ): ?UserIdentity {
2352 return null;
2353 }
2354
2368 public function getDescription( $audience = self::FOR_PUBLIC, ?Authority $performer = null ) {
2369 return null;
2370 }
2371
2378 public function getTimestamp() {
2379 $this->assertRepoDefined();
2380
2381 return $this->repo->getFileTimestamp( $this->getPath() );
2382 }
2383
2392 public function getDescriptionTouched() {
2393 return false;
2394 }
2395
2402 public function getSha1() {
2403 $this->assertRepoDefined();
2404
2405 return $this->repo->getFileSha1( $this->getPath() );
2406 }
2407
2413 public function getStorageKey() {
2414 $hash = $this->getSha1();
2415 if ( !$hash ) {
2416 return false;
2417 }
2418 $ext = $this->getExtension();
2419 $dotExt = $ext === '' ? '' : ".$ext";
2420
2421 return $hash . $dotExt;
2422 }
2423
2433 public function userCan( $field, Authority $performer ) {
2434 return true;
2435 }
2436
2441 public function getContentHeaders() {
2442 $handler = $this->getHandler();
2443 if ( $handler ) {
2444 return $handler->getContentHeaders( $this->getMetadataArray() );
2445 }
2446
2447 return [];
2448 }
2449
2461 public function getLongDesc( ?Language $lang = null ) {
2462 if ( $lang === null ) {
2463 wfDeprecatedMsg( 'Calling File::getLongDesc without a lang parameter ' .
2464 'was deprecated in MediaWiki 1.46', '1.46' );
2465 }
2466
2467 $handler = $this->getHandler( $lang );
2468 if ( $handler ) {
2469 return $handler->getLongDesc( $this );
2470 } else {
2471 return MediaHandler::getGeneralLongDesc( $this, $lang );
2472 }
2473 }
2474
2486 public function getShortDesc( ?Language $lang = null ) {
2487 if ( $lang === null ) {
2488 wfDeprecatedMsg( 'Calling File::getShortDesc without a lang parameter ' .
2489 'was deprecated in MediaWiki 1.46', '1.46' );
2490 }
2491
2492 $handler = $this->getHandler( $lang );
2493 if ( $handler ) {
2494 return $handler->getShortDesc( $this );
2495 } else {
2496 return MediaHandler::getGeneralShortDesc( $this, $lang );
2497 }
2498 }
2499
2503 public function getDimensionsString() {
2504 $handler = $this->getHandler();
2505 if ( $handler ) {
2506 return $handler->getDimensionsString( $this );
2507 } else {
2508 return '';
2509 }
2510 }
2511
2516 public function getRedirected(): ?string {
2517 return $this->redirected;
2518 }
2519
2523 protected function getRedirectedTitle() {
2524 if ( $this->redirected !== null ) {
2525 if ( !$this->redirectTitle ) {
2526 $this->redirectTitle = Title::makeTitle( NS_FILE, $this->redirected );
2527 }
2528
2529 return $this->redirectTitle;
2530 }
2531
2532 return null;
2533 }
2534
2539 public function redirectedFrom( string $from ) {
2540 $this->redirected = $from;
2541 }
2542
2547 public function isMissing() {
2548 return false;
2549 }
2550
2556 public function isCacheable() {
2557 return true;
2558 }
2559
2563 protected function assertRepoDefined() {
2564 if ( !( $this->repo instanceof $this->repoClass ) ) {
2565 throw new LogicException( "A {$this->repoClass} object is not set for this File.\n" );
2566 }
2567 }
2568
2572 protected function assertTitleDefined() {
2573 if ( !( $this->title instanceof Title ) ) {
2574 throw new LogicException( "A Title object is not set for this File.\n" );
2575 }
2576 }
2577
2582 public function isExpensiveToThumbnail() {
2583 $handler = $this->getHandler();
2584 return $handler && $handler->isExpensiveToThumbnail( $this );
2585 }
2586
2593 public function isTransformedLocally() {
2594 return true;
2595 }
2596}
2597
2599class_alias( File::class, 'File' );
const PROTO_CANONICAL
Definition Defines.php:223
const NS_FILE
Definition Defines.php:57
const NS_MEDIA
Definition Defines.php:39
const PROTO_RELATIVE
Definition Defines.php:219
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
wfDeprecatedMsg( $msg, $version=false, $component=false, $callerOffset=2)
Log a deprecation warning with arbitrary message text.
wfAppendQuery( $url, $query)
Append a query string to an existing URL, which may or may not already have query string parameters a...
wfCgiToArray( $query)
This is the logical opposite of wfArrayToCgi(): it accepts a query string as its argument and returns...
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
const MEDIATYPE_UNKNOWN
Definition defines.php:13
$wgLang
Definition Setup.php:554
if(!defined('MEDIAWIKI')) if(!defined( 'MW_ENTRY_POINT')) $IP
Environment checks.
Definition Setup.php:102
const MW_ENTRY_POINT
Definition api.php:21
Exceptions for config failures.
Group all the pieces relevant to the context of a request into one instance.
Base class for file repositories.
Definition FileRepo.php:51
Implements some public methods and some protected utility functions which are required by multiple ch...
Definition File.php:80
move( $target)
Move file to the new title.
Definition File.php:2178
static compare(File $a, File $b)
Callback for usort() to do file sorts by name.
Definition File.php:338
getMetadataItems(array $itemNames)
Get multiple elements of the unserialized handler-specific metadata.
Definition File.php:852
getSha1()
Get the SHA-1 base 36 hash of the file.
Definition File.php:2402
transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags)
Return either a MediaTransformError or placeholder thumbnail (if $wgIgnoreImageErrors)
Definition File.php:1232
assertTitleDefined()
Assert that $this->title is set to a Title.
Definition File.php:2572
allowInlineDisplay()
Alias for canRender()
Definition File.php:977
isLocal()
Returns true if the file comes from the local file repository.
Definition File.php:2098
getTranscodedPath( $suffix=false)
Get the path of the transcoded directory, or a particular file if $suffix is specified.
Definition File.php:1882
getArchiveRel( $suffix=false)
Get the path of an archived file relative to the public zone root.
Definition File.php:1781
getCanRender()
Accessor for __get()
Definition File.php:953
getBucketThumbName( $bucket)
Returns the name of the thumb for a given bucket.
Definition File.php:1570
int false null $pageCount
Number of pages of a multipage document, or false for documents which aren't multipage documents.
Definition File.php:168
string $lastError
Text of last error.
Definition File.php:133
getThumbRel( $suffix=false)
Get the path, relative to the thumbnail zone root, of the thumbnail directory or a particular file if...
Definition File.php:1800
FileRepo LocalRepo ForeignAPIRepo false $repo
Some member variables can be lazy-initialised using __get().
Definition File.php:127
getLocalRefPath()
Get an FS copy or original of this file and return the path.
Definition File.php:542
getRepo()
Returns the repository.
Definition File.php:2117
createThumb( $width, $height=-1)
Create a thumbnail of the image having the specified width/height.
Definition File.php:1210
getHistory( $limit=null, $start=null, $end=null, $inc=true)
Return a fragment of the history of file.
Definition File.php:1718
getOriginalTitle()
Return the title used to find this file.
Definition File.php:387
isDeleted( $field)
Is this file a "deleted" file in a private archive? STUB.
Definition File.php:2140
getStorageKey()
Get the deletion archive key, "<sha1>.<ext>".
Definition File.php:2413
getMediaType()
Return the type of the media in the file.
Definition File.php:927
getMetadataArray()
Get the unserialized handler-specific metadata STUB.
Definition File.php:829
purgeCache( $options=[])
Purge shared caches such as thumbnails and DB data caching STUB Overridden by LocalFile.
Definition File.php:1669
getDescriptionText(?Language $lang=null)
Get the HTML text of the description page, if available.
Definition File.php:2295
getLastError()
Get last thumbnailing error.
Definition File.php:1646
getDescriptionShortUrl()
Get short description URL for a files based on the page ID.
Definition File.php:468
iconThumb()
Get a ThumbnailImage representing a file type icon.
Definition File.php:1622
canRender()
Checks if the output of transform() for this file is likely to be valid.
Definition File.php:941
appendRequestProvenance(string $url, array $provenance)
Add information about where a URL to an image was generated.
Definition File.php:420
pageCount()
Returns the number of pages of a multipage document, or false for documents which aren't multipage do...
Definition File.php:2241
modifyClientThumbUrl( $url, $handlerParams)
Append URL query parameters to a thumbnail URL that are intended to be processed by the browser viewi...
Definition File.php:1969
exists()
Returns true if file exists in the repository.
Definition File.php:1087
getBucketThumbPath( $bucket)
Returns the repo path of the thumb for a given bucket.
Definition File.php:1560
getMetadataItem(string $itemName)
Get a specific element of the unserialized handler-specific metadata.
Definition File.php:840
getIsSafeFileUncached()
Uncached accessor.
Definition File.php:1016
getHandlerState(string $key)
Get a value, or null if it does not exist.mixed|null
Definition File.php:814
string null $path
The storage path corresponding to one of the zones.
Definition File.php:160
resetHistory()
Reset the history pointer to the first element of the history.
Definition File.php:1743
getSize()
Return the size of the image file, in bytes Overridden by LocalFile, UnregisteredLocalFile STUB.
Definition File.php:903
string null $url
The URL corresponding to one of the four basic zones.
Definition File.php:151
isExpensiveToThumbnail()
True if creating thumbnails from the file is large or otherwise resource-intensive.
Definition File.php:2582
getCommonMetaArray()
Like getMetadata but returns a handler independent array of common values.
Definition File.php:864
nextHistoryLine()
Return the history of this file, line by line.
Definition File.php:1732
MediaHandler null $handler
Definition File.php:148
string null $hashPath
Relative path including trailing slash.
Definition File.php:163
formatMetadata( $context=false)
Definition File.php:2088
isVisible()
Returns true if file exists in the repository and can be included in a page.
Definition File.php:1098
getTitle()
Return the associated title object.
Definition File.php:378
getTimestamp()
Get the 14-character timestamp of the file upload.
Definition File.php:2378
addToShellboxCommand(BoxedCommand $command, string $boxedName)
Add the file to a Shellbox command as an input file.
Definition File.php:571
getVisibility()
Return the deletion bitfield STUB.
Definition File.php:2150
getMetadata()
Get handler-specific metadata Overridden by LocalFile, UnregisteredLocalFile STUB.
Definition File.php:809
getTranscodedUrl( $suffix=false)
Get the URL of the transcoded directory, or a particular file if $suffix is specified.
Definition File.php:1988
getThumbnailBucket( $desiredWidth, $page=1)
Return the smallest bucket from $wgThumbnailBuckets which is at least $wgThumbnailMinimumBucketDistan...
Definition File.php:614
getMimeType()
Returns the MIME type of the file.
Definition File.php:915
getHandler(?Language $lang=null)
Get a MediaHandler instance for this file.
Definition File.php:1608
isSafeFile()
Determines if this media file is in a format that is unlikely to contain viruses or malicious content...
Definition File.php:994
userCan( $field, Authority $performer)
Determine if the current user is allowed to view a particular field of this file, if it's marked as d...
Definition File.php:2433
deleteFile( $reason, UserIdentity $user, $suppress=false)
Delete all versions of the file.
Definition File.php:2200
makeTransformTmpFile( $thumbPath)
Creates a temp FS file with the same extension and the thumbnail.
Definition File.php:1579
getLength()
Get the duration of a media file in seconds.
Definition File.php:696
getAvailableLanguages()
Gives a (possibly empty) list of IETF languages to render the file in.
Definition File.php:730
isMultipage()
Returns 'true' if this file is a type which supports multiple pages, e.g.
Definition File.php:2230
string null $name
The name of a file from its title object.
Definition File.php:157
getRel()
Get the path of the file relative to the public zone root.
Definition File.php:1769
getUnscaledThumb( $handlerParams=[])
Get a ThumbnailImage which is the same size as the source.
Definition File.php:1126
string false null $transformScript
URL of transformscript (for example thumb.php)
Definition File.php:171
string $redirected
The name that was used to access the file, before resolving redirects.
Definition File.php:139
array $tmpBucketedThumbCache
Cache of tmp filepaths pointing to generated bucket thumbnails, keyed by width.
Definition File.php:188
canAnimateThumbIfAppropriate()
Will the thumbnail be animated if one would expect it to be.
Definition File.php:784
wasDeleted()
Was this file ever deleted from the wiki?
Definition File.php:2159
getThumbDisposition( $thumbName, $dispositionType='inline')
Definition File.php:1590
generateAndSaveThumb( $tmpFile, $transformParams, $flags)
Generates a thumbnail according to the given parameters and saves it to storage.
Definition File.php:1356
purgeDescription()
Purge the file description page, but don't go after pages using the file.
Definition File.php:1677
isVectorized()
Return true if the file is vectorized.
Definition File.php:710
setHandlerState(string $key, $value)
Set a value.
Definition File.php:819
getHeight( $page=1)
Return the height of the image.
Definition File.php:601
getUploader(int $audience=self::FOR_PUBLIC, ?Authority $performer=null)
Get the identity of the file uploader.
Definition File.php:2351
getUrl()
Return the URL of the file.
Definition File.php:401
getArchiveThumbUrl( $archiveName, $suffix=false)
Get the URL of the archived file's thumbs, or a particular thumb if $suffix is specified.
Definition File.php:1916
getBitDepth()
Return the bit depth of the file Overridden by LocalFile STUB.
Definition File.php:892
isTrustedFile()
Returns true if the file is flagged as trusted.
Definition File.php:1060
getUrlRel()
Get urlencoded path of the file relative to the public zone root.
Definition File.php:1816
bool null $canRender
Whether the output of transform() for this file is likely to be valid.
Definition File.php:177
getArchivePath( $suffix=false)
Get the path of the archived file.
Definition File.php:1843
getIsSafeFile()
Accessor for __get()
Definition File.php:1007
transform( $params, $flags=0)
Transform a media file.
Definition File.php:1254
getWidth( $page=1)
Return the width of the image.
Definition File.php:586
__construct( $title, $repo)
Call this constructor from child classes.
Definition File.php:204
assertRepoDefined()
Assert that $this->repo is set to a valid FileRepo instance.
Definition File.php:2563
thumbName( $params, $flags=0)
Return the file name of a thumbnail with the specified parameters.
Definition File.php:1155
FSFile false null $fsFile
False if undefined.
Definition File.php:145
isOld()
Returns true if the image is an old version STUB.
Definition File.php:2128
Title string false $title
Definition File.php:130
getThumbVirtualUrl( $suffix=false)
Get the virtual URL for a thumbnail file or directory.
Definition File.php:2035
static checkExtensionCompatibility(File $old, $new)
Checks if file extensions are compatible.
Definition File.php:295
const RENDER_NOW
Force rendering in the current process.
Definition File.php:90
getRepoName()
Returns the name of the repository.
Definition File.php:2107
static normalizeTitle( $title, $exception=false)
Given a string or Title object return either a valid Title object with namespace NS_FILE or null.
Definition File.php:221
getVirtualUrl( $suffix=false)
Get the public zone virtual URL for a current version source file.
Definition File.php:1999
getLongDesc(?Language $lang=null)
Long description.
Definition File.php:2461
getMatchedLanguage( $userPreferredLanguage)
Get the IETF language code from the available languages for this file that matches the language reque...
Definition File.php:746
getThumbnailSource( $params)
Returns the most appropriate source image for the thumbnail, given a target thumbnail size.
Definition File.php:1494
getName()
Return the name of this file.
Definition File.php:348
getDescriptionTouched()
Returns the timestamp (in TS::MW format) of the last change of the description page.
Definition File.php:2392
getDisplayWidthHeight( $maxWidth, $maxHeight, $page=1)
Get the width and height to display image at.
Definition File.php:660
purgeEverything()
Purge metadata and all affected pages when the file is created, deleted, or majorly updated.
Definition File.php:1690
bool null $isSafeFile
Whether this media file is in a format that is unlikely to contain viruses or malicious content.
Definition File.php:182
getExtension()
Get the file extension, e.g.
Definition File.php:363
string null $extension
File extension.
Definition File.php:154
static scaleHeight( $srcWidth, $srcHeight, $dstWidth)
Calculate the height of a thumbnail using the source and destination width.
Definition File.php:2262
const RENDER_FORCE
Force rendering even if thumbnail already exist and using RENDER_NOW I.e.
Definition File.php:95
getArchiveUrl( $suffix=false)
Get the URL of the archive directory, or a particular file if $suffix is specified.
Definition File.php:1895
isCacheable()
Check if this file object is small and can be cached.
Definition File.php:2556
getThumbUrl( $suffix=false)
Get the URL of the thumbnail directory, or a particular file if $suffix is specified.
Definition File.php:1953
mustRender()
Return true if the file is of a type that can't be directly rendered by typical browsers and needs to...
Definition File.php:968
upgradeRow()
Upgrade the database row if there is one Called by ImagePage STUB.
Definition File.php:311
getArchiveThumbPath( $archiveName, $suffix=false)
Get the path of an archived file's thumbs, or a particular thumb if $suffix is specified.
Definition File.php:1856
getThumbnails()
Get all thumbnail names previously generated for this file STUB Overridden by LocalFile.
Definition File.php:1657
static splitMime(?string $mime)
Split an internet media type into its two components; if not a two-part name, set the minor type to '...
Definition File.php:321
load( $flags=0)
Load any lazy-loaded file object fields from source.
Definition File.php:1076
getHashPath()
Get the filename hash component of the directory including trailing slash, e.g.
Definition File.php:1753
getThumbPath( $suffix=false)
Get the path of the thumbnail directory, or a particular file if $suffix is specified.
Definition File.php:1870
getDescriptionUrl()
Get the URL of the image description page.
Definition File.php:2278
generateThumbName( $name, $params)
Generate a thumbnail file name from a name and specified parameters.
Definition File.php:1171
isTransformedLocally()
Whether the thumbnails created on the same server as this code is running.
Definition File.php:2593
getArchiveVirtualUrl( $suffix=false)
Get the public zone virtual URL for an archived version source file.
Definition File.php:2016
convertMetadataVersion( $metadata, $version)
get versioned metadata
Definition File.php:876
string $repoClass
Required Repository class type.
Definition File.php:185
getDefaultRenderLanguage()
In files that support multiple language, what is the default language to use if none specified.
Definition File.php:765
restore( $versions=[], $unsuppress=false)
Restore all or specified deleted revisions to the given file.
Definition File.php:2218
getDescription( $audience=self::FOR_PUBLIC, ?Authority $performer=null)
Get description of file revision STUB.
Definition File.php:2368
getPath()
Return the storage path to the file.
Definition File.php:526
getShortDesc(?Language $lang=null)
Short description.
Definition File.php:2486
getFullUrl()
Return a fully-qualified URL to the file.
Definition File.php:480
publish( $src, $flags=0, array $options=[])
Move or copy a file to its public location.
Definition File.php:2080
redirectedFrom(string $from)
Definition File.php:2539
static normalizeExtension( $extension)
Normalize a file extension to the common form, making it lowercase and checking some synonyms,...
Definition File.php:270
generateBucketsIfNeeded( $params, $flags=0)
Generates chained bucketed thumbnails if needed.
Definition File.php:1438
A foreign repository for a remote MediaWiki accessible through api.php requests.
Local repository that stores files in the local filesystem and registers them in the wiki's own datab...
Definition LocalRepo.php:45
Job to purge the HTML/file cache for all pages that link to or use another page or file.
Base class for language-specific code.
Definition Language.php:65
Create PSR-3 logger objects.
A class containing constants representing the names of configuration variables.
const ServerName
Name constant for the ServerName setting, for use with Config::get()
const ThumbnailBuckets
Name constant for the ThumbnailBuckets setting, for use with Config::get()
const TrackMediaRequestProvenance
Name constant for the TrackMediaRequestProvenance setting, for use with Config::get()
const ThumbnailMinimumBucketDistance
Name constant for the ThumbnailMinimumBucketDistance setting, for use with Config::get()
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.
Base media handler class.
canAnimateThumbnail( $file)
If the material is animated, we can animate the thumbnail.
getLength( $file)
If it's an audio file, return the length of the file.
isAnimatedImage( $file)
The material is an image, and is animated.
getAvailableLanguages(File $file)
Get list of languages file can be viewed in.
getMatchedLanguage( $userPreferredLanguage, array $availableLanguages)
When overridden in a descendant class, returns a language code most suiting.
isVectorized( $file)
The material is vectorized and thus scaling is lossless.
getDefaultRenderLanguage(File $file)
On file types that support renderings in multiple languages, which language is used by default if uns...
Basic media transform error class.
Base class for the output of MediaHandler::doTransform() and File::transform().
Media transform output for images.
Convenience class for dealing with PoolCounter using callbacks.
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Definition Status.php:44
Represents a title within MediaWiki.
Definition Title.php:69
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Class representing a non-directory file on the file system.
Definition FSFile.php:20
This class is used to hold the location and do limited manipulation of files stored temporarily (this...
Base class for all file backend classes (including multi-write backends).
Multi-datacenter aware caching interface.
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, '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'=> '', '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'=>[], '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'=> false, '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 -o $output $input', 'ImagickExt'=>['SvgHandler::rasterizeImagickExt',],], 'SVGConverter'=> 'ImageMagick', 'SVGConverterPath'=> '', 'SVGMaxSize'=> 5120, 'SVGMetadataCutoff'=> 5242880, 'SVGNativeRendering'=> true, 'SVGNativeRenderingSizeLimit'=> 51200, 'MediaInTargetLanguage'=> true, 'MaxImageArea'=> 12500000, 'MaxAnimatedGifArea'=> 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, 'ThumbnailStepsRatio'=> 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'=>[], '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',],], 'json'=>['class'=> 'MediaWiki\\Content\\JsonContentHandler', 'services'=>['ParsoidParserFactory', 'TitleFactory',],], 'css'=>['class'=> 'MediaWiki\\Content\\CssContentHandler', 'services'=>['MainConfig', 'ParserFactory', 'UserOptionsLookup',],], 'vue'=>['class'=> 'MediaWiki\\Content\\VueContentHandler', 'services'=>['MainConfig', 'ParserFactory',],], '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, 'WarmParsoidParserCache'=> false,], 'ParsoidSelectiveUpdateSampleRate'=> 0, '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, 'PHPSessionHandling'=> 'warn', '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, 'ForcedRawSMaxage'=> 300, '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',],],], '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, ], '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, 'UseLegacyMediaStyles' => 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, ], ], '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, ], 'AllowSecuritySensitiveOperationIfCannotReauthenticate' => [ 'default' => true, ], '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, '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, ], '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, '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' => [ ], '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, ], ], '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', 'editviewmywatchlist' => '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', ], 'GrantRiskGroups' => [ 'basic' => 'low', 'editpage' => 'low', 'createeditmovepage' => 'low', 'editprotected' => 'vandalism', 'patrol' => 'low', 'uploadfile' => 'low', 'uploadeditmovefile' => 'low', 'sendemail' => 'security', 'viewmywatchlist' => 'low', 'editviewmywatchlist' => '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', ], 'EnableBotPasswords' => true, 'BotPasswordsCluster' => false, 'BotPasswordsDatabase' => false, 'BotPasswordsLimit' => 100, 'SecretKey' => false, 'JwtPrivateKey' => false, 'JwtPublicKey' => false, 'AllowUserJs' => false, 'AllowUserCss' => false, 'AllowUserCssPrefs' => true, 'UseSiteJs' => true, 'UseSiteCss' => true, 'BreakFrames' => false, 'EditPageFrameOptions' => 'DENY', 'ApiFrameOptions' => 'DENY', 'CSPHeader' => false, 'CSPReportOnlyHeader' => 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, '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' => [ ], 'StatsdServer' => false, 'StatsdMetricPrefix' => 'MediaWiki', 'StatsTarget' => null, 'StatsFormat' => null, 'StatsPrefix' => 'mediawiki', 'OpenTelemetryConfig' => null, 'PageInfoTransclusionLimit' => 50, 'EnableJavaScriptTest' => false, 'CachePrefix' => 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: ], '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, ], '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, '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\\JobQueue\\Jobs\\CategoryMembershipChangeJob', 'services' => [ 'RecentChangeFactory', ], ], 'CategoryCountUpdateJob' => [ 'class' => 'MediaWiki\\JobQueue\\Jobs\\CategoryCountUpdateJob', 'services' => [ 'ConnectionProvider', 'NamespaceInfo', ], ], 'clearUserWatchlist' => 'MediaWiki\\Watchlist\\ClearUserWatchlistJob', 'watchlistExpiry' => 'MediaWiki\\Watchlist\\WatchlistExpiryJob', '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', 'parsoidCachePrewarm' => [ 'class' => 'MediaWiki\\JobQueue\\Jobs\\ParsoidCachePrewarmJob', 'services' => [ 'ParserOutputAccess', 'PageStore', 'RevisionLookup', 'ParsoidSiteConfig', ], 'needsPage' => false, ], '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, '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', 'Access-Control-Max-Age', 'Authorization', ], 'RestAPIAdditionalRouteFiles' => [ ], 'RestSandboxSpecs' => [ ], '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, 'AsyncHTTPTimeout' => 25, 'HTTPProxy' => '', 'LocalVirtualHosts' => [ ], 'LocalHTTPProxy' => false, 'AllowExternalReqID' => false, 'GenerateReqIDFormat' => 'rand24', 'JobRunRate' => 1, 'RunJobsAsync' => false, 'UpdateRowsPerJob' => 300, 'UpdateRowsPerQuery' => 100, 'RedirectOnLogin' => null, 'VirtualRestConfig' => [ 'paths' => [ ], 'modules' => [ ], 'global' => [ 'timeout' => 360, 'forwardCookies' => false, 'HTTPProxy' => 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' => [ ], 'CloneArticleParserOutput' => true, 'UseLeximorph' => false, 'UsePostprocCacheLegacy' => false, 'UsePostprocCacheParsoid' => true, 'ParserOptionsLogUnsafeSampleRate' => 0, ], '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', 'CacheSharedUploads' => 'boolean', 'ForeignUploadTargets' => 'array', 'UploadDialog' => 'object', 'FileBackends' => 'object', 'LockManagers' => 'array', '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', ], 'ThumbnailStepsRatio' => [ 'number', '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', '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', 'ParserCacheFilterConfig' => 'object', 'ChronologyProtectorSecret' => 'string', 'PHPSessionHandling' => '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', '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', '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', 'AllowSecuritySensitiveOperationIfCannotReauthenticate' => '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', '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', 'CSPHeader' => [ 'boolean', 'object', ], 'CSPReportOnlyHeader' => [ 'boolean', 'object', ], 'CSPFalsePositiveUrls' => 'object', 'AllowCrossOrigin' => 'boolean', 'RestAllowCrossOriginCookieAuth' => 'boolean', 'CookieSameSite' => [ 'string', 'null', ], 'CacheVaryCookies' => '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', 'RecentChangesFlags' => 'object', 'WatchlistExpiry' => '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', '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', 'RestSandboxSpecs' => 'object', 'ShellRestrictionMethod' => [ 'string', 'boolean', ], 'ShellboxUrls' => 'object', 'ShellboxSecretKey' => [ 'string', 'null', ], 'ShellboxShell' => [ 'string', 'null', ], 'HTTPTimeout' => 'number', 'HTTPConnectTimeout' => 'number', 'HTTPMaxTimeout' => 'number', 'HTTPMaxConnectTimeout' => 'number', 'LocalVirtualHosts' => 'object', 'LocalHTTPProxy' => [ 'string', 'boolean', ], 'GenerateReqIDFormat' => 'string', 'VirtualRestConfig' => 'object', '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', 'CloneArticleParserOutput' => 'boolean', 'UseLeximorph' => 'boolean', 'UsePostprocCacheLegacy' => 'boolean', 'UsePostprocCacheParsoid' => 'boolean', 'ParserOptionsLogUnsafeSampleRate' => 'integer', ], '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', 'VirtualRestConfig' => 'array_plus_2d', ], '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', ], ], ], ], ], 'PHPSessionHandling' => [ 'deprecated' => 'since 1.45 Integration with PHP session handling will be removed in the future', ], 'RawHtmlMessages' => [ 'items' => [ 'type' => 'string', ], ], 'InterwikiLogoOverride' => [ 'items' => [ 'type' => 'string', ], ], 'LegalTitleChars' => [ 'deprecated' => 'since 1.41; use Extension:TitleBlacklist to customize', ], 'ReauthenticateTime' => [ 'additionalProperties' => [ 'type' => 'integer', ], ], 'AllowSecuritySensitiveOperationIfCannotReauthenticate' => [ 'additionalProperties' => [ 'type' => 'boolean', ], ], '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', ], ], ], 'SoftwareTags' => [ 'additionalProperties' => [ 'type' => 'boolean', ], ], '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', ], ], 'RestSandboxSpecs' => [ 'additionalProperties' => [ 'type' => 'object', 'properties' => [ 'url' => [ 'type' => 'string', 'format' => 'url', ], 'name' => [ 'type' => 'string', ], 'file' => [ 'type' => 'string', ], 'msg' => [ 'type' => 'string', 'description' => 'a message key', ], ], ], ], '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.', ],]
Interface for objects which can provide a MediaWiki context on request.
Represents the target of a wiki link.
An interface to support process-local caching of handler data associated with a given file.
Interface for objects (potentially) representing an editable wiki page.
This interface represents the authority associated with the current execution context,...
Definition Authority.php:23
Interface for objects representing user identity.
if(count( $args)< 1) $job