MediaWiki master
File.php
Go to the documentation of this file.
1<?php
10
11use LogicException;
12use MediaHandler;
21use MediaWiki\HookContainer\ProtectedHookAccessorTrait;
34use RuntimeException;
35use Shellbox\Command\BoxedCommand;
36use StatusValue;
42
79abstract class File implements MediaHandlerState {
80 use ProtectedHookAccessorTrait;
81
82 // Bitfield values akin to the revision deletion constants
83 public const DELETED_FILE = 1;
84 public const DELETED_COMMENT = 2;
85 public const DELETED_USER = 4;
86 public const DELETED_RESTRICTED = 8;
87
89 public const RENDER_NOW = 1;
94 public const RENDER_FORCE = 2;
95
96 public const DELETE_SOURCE = 1;
97
98 // Audience options for File::getDescription()
99 public const FOR_PUBLIC = 1;
100 public const FOR_THIS_USER = 2;
101 public const RAW = 3;
102
103 // Options for File::thumbName()
104 public const THUMB_FULL_NAME = 1;
105
126 public $repo;
127
129 protected $title;
130
132 protected $lastError;
133
138 protected $redirected;
139
142
144 protected $fsFile;
145
147 protected $handler;
148
150 protected $url;
151
153 protected $extension;
154
156 protected $name;
157
159 protected $path;
160
162 protected $hashPath;
163
167 protected $pageCount;
168
171
173 protected $redirectTitle;
174
176 protected $canRender;
177
181 protected $isSafeFile;
182
184 protected $repoClass = FileRepo::class;
185
188
190 private $handlerState = [];
191
203 public function __construct( $title, $repo ) {
204 // Some subclasses do not use $title, but set name/title some other way
205 if ( $title !== false ) {
206 $title = self::normalizeTitle( $title, 'exception' );
207 }
208 $this->title = $title;
209 $this->repo = $repo;
210 }
211
220 public static function normalizeTitle( $title, $exception = false ) {
221 $ret = $title;
222
223 if ( !$ret instanceof Title ) {
224 if ( $ret instanceof PageIdentity ) {
225 $ret = Title::castFromPageIdentity( $ret );
226 } elseif ( $ret instanceof LinkTarget ) {
227 $ret = Title::castFromLinkTarget( $ret );
228 }
229 }
230
231 if ( $ret instanceof Title ) {
232 # Normalize NS_MEDIA -> NS_FILE
233 if ( $ret->getNamespace() === NS_MEDIA ) {
234 $ret = Title::makeTitleSafe( NS_FILE, $ret->getDBkey() );
235 # Double check the titles namespace
236 } elseif ( $ret->getNamespace() !== NS_FILE ) {
237 $ret = null;
238 }
239 } else {
240 # Convert strings to Title objects
241 $ret = Title::makeTitleSafe( NS_FILE, (string)$ret );
242 }
243 if ( !$ret && $exception !== false ) {
244 throw new RuntimeException( "`$title` is not a valid file title." );
245 }
246
247 return $ret;
248 }
249
250 public function __get( $name ) {
251 $function = [ $this, 'get' . ucfirst( $name ) ];
252 if ( !is_callable( $function ) ) {
253 return null;
254 } else {
255 $this->$name = $function();
256
257 return $this->$name;
258 }
259 }
260
269 public static function normalizeExtension( $extension ) {
270 $lower = strtolower( $extension );
271 $squish = [
272 'htm' => 'html',
273 'jpeg' => 'jpg',
274 'mpeg' => 'mpg',
275 'tiff' => 'tif',
276 'ogv' => 'ogg' ];
277 if ( isset( $squish[$lower] ) ) {
278 return $squish[$lower];
279 } elseif ( preg_match( '/^[0-9a-z]+$/', $lower ) ) {
280 return $lower;
281 } else {
282 return '';
283 }
284 }
285
294 public static function checkExtensionCompatibility( File $old, $new ) {
295 $oldMime = $old->getMimeType();
296 $n = strrpos( $new, '.' );
297 $newExt = self::normalizeExtension( $n ? substr( $new, $n + 1 ) : '' );
298 $mimeMagic = MediaWikiServices::getInstance()->getMimeAnalyzer();
299
300 return $mimeMagic->isMatchingExtension( $newExt, $oldMime );
301 }
302
310 public function upgradeRow() {
311 }
312
320 public static function splitMime( ?string $mime ) {
321 if ( $mime === null ) {
322 return [ 'unknown', 'unknown' ];
323 } elseif ( str_contains( $mime, '/' ) ) {
324 return explode( '/', $mime, 2 );
325 } else {
326 return [ $mime, 'unknown' ];
327 }
328 }
329
337 public static function compare( File $a, File $b ) {
338 return strcmp( $a->getName(), $b->getName() );
339 }
340
347 public function getName() {
348 if ( $this->name === null ) {
349 $this->assertRepoDefined();
350 $this->name = $this->repo->getNameFromTitle( $this->title );
351 }
352
353 return $this->name;
354 }
355
362 public function getExtension() {
363 if ( $this->extension === null ) {
364 $n = strrpos( $this->getName(), '.' );
365 $this->extension = self::normalizeExtension(
366 $n ? substr( $this->getName(), $n + 1 ) : '' );
367 }
368
369 return $this->extension;
370 }
371
377 public function getTitle() {
378 return $this->title;
379 }
380
386 public function getOriginalTitle() {
387 if ( $this->redirected !== null ) {
388 return $this->getRedirectedTitle();
389 }
390
391 return $this->title;
392 }
393
400 public function getUrl() {
401 if ( $this->url === null ) {
402 $this->assertRepoDefined();
403 $ext = $this->getExtension();
404 $this->url = $this->repo->getZoneUrl( 'public', $ext ) . '/' . $this->getUrlRel();
405 }
406
407 return $this->url;
408 }
409
417 public function getDescriptionShortUrl() {
418 return null;
419 }
420
429 public function getFullUrl() {
430 return (string)MediaWikiServices::getInstance()->getUrlUtils()
431 ->expand( $this->getUrl(), PROTO_RELATIVE );
432 }
433
438 public function getCanonicalUrl() {
439 return (string)MediaWikiServices::getInstance()->getUrlUtils()
440 ->expand( $this->getUrl(), PROTO_CANONICAL );
441 }
442
446 public function getViewURL() {
447 if ( $this->mustRender() ) {
448 if ( $this->canRender() ) {
449 return $this->createThumb( $this->getWidth() );
450 } else {
451 wfDebug( __METHOD__ . ': supposed to render ' . $this->getName() .
452 ' (' . $this->getMimeType() . "), but can't!" );
453
454 return $this->getUrl(); # hm... return NULL?
455 }
456 } else {
457 return $this->getUrl();
458 }
459 }
460
475 public function getPath() {
476 if ( $this->path === null ) {
477 $this->assertRepoDefined();
478 $this->path = $this->repo->getZonePath( 'public' ) . '/' . $this->getRel();
479 }
480
481 return $this->path;
482 }
483
491 public function getLocalRefPath() {
492 $this->assertRepoDefined();
493 if ( !$this->fsFile ) {
494 $timer = MediaWikiServices::getInstance()->getStatsFactory()
495 ->getTiming( 'media_thumbnail_generate_fetchoriginal_seconds' )
496 ->start();
497
498 $this->fsFile = $this->repo->getLocalReference( $this->getPath() );
499
500 $timer->stop();
501
502 if ( !$this->fsFile ) {
503 $this->fsFile = false; // null => false; cache negative hits
504 }
505 }
506
507 return ( $this->fsFile )
508 ? $this->fsFile->getPath()
509 : false;
510 }
511
520 public function addToShellboxCommand( BoxedCommand $command, string $boxedName ) {
521 return $this->repo->addShellboxInputFile( $command, $boxedName, $this->getVirtualUrl() );
522 }
523
535 public function getWidth( $page = 1 ) {
536 return false;
537 }
538
550 public function getHeight( $page = 1 ) {
551 return false;
552 }
553
563 public function getThumbnailBucket( $desiredWidth, $page = 1 ) {
564 $thumbnailBuckets = MediaWikiServices::getInstance()
565 ->getMainConfig()->get( MainConfigNames::ThumbnailBuckets );
566 $thumbnailMinimumBucketDistance = MediaWikiServices::getInstance()
567 ->getMainConfig()->get( MainConfigNames::ThumbnailMinimumBucketDistance );
568 $imageWidth = $this->getWidth( $page );
569
570 if ( $imageWidth === false ) {
571 return false;
572 }
573
574 if ( $desiredWidth > $imageWidth ) {
575 return false;
576 }
577
578 if ( !$thumbnailBuckets ) {
579 return false;
580 }
581
582 $sortedBuckets = $thumbnailBuckets;
583
584 sort( $sortedBuckets );
585
586 foreach ( $sortedBuckets as $bucket ) {
587 if ( $bucket >= $imageWidth ) {
588 return false;
589 }
590
591 if ( $bucket - $thumbnailMinimumBucketDistance > $desiredWidth ) {
592 return $bucket;
593 }
594 }
595
596 // Image is bigger than any available bucket
597 return false;
598 }
599
609 public function getDisplayWidthHeight( $maxWidth, $maxHeight, $page = 1 ) {
610 if ( !$maxWidth || !$maxHeight ) {
611 // should never happen
612 throw new ConfigException( 'Using a choice from $wgImageLimits that is 0x0' );
613 }
614
615 $width = $this->getWidth( $page );
616 $height = $this->getHeight( $page );
617 if ( !$width || !$height ) {
618 return [ 0, 0 ];
619 }
620
621 // Calculate the thumbnail size.
622 if ( $width <= $maxWidth && $height <= $maxHeight ) {
623 // Vectorized image, do nothing.
624 } elseif ( $width / $height >= $maxWidth / $maxHeight ) {
625 # The limiting factor is the width, not the height.
626 $height = round( $height * $maxWidth / $width );
627 $width = $maxWidth;
628 // Note that $height <= $maxHeight now.
629 } else {
630 $newwidth = floor( $width * $maxHeight / $height );
631 $height = round( $height * $newwidth / $width );
632 $width = $newwidth;
633 // Note that $height <= $maxHeight now, but might not be identical
634 // because of rounding.
635 }
636 return [ $width, $height ];
637 }
638
645 public function getLength() {
646 $handler = $this->getHandler();
647 if ( $handler ) {
648 return $handler->getLength( $this );
649 } else {
650 return 0;
651 }
652 }
653
659 public function isVectorized() {
660 $handler = $this->getHandler();
661 if ( $handler ) {
662 return $handler->isVectorized( $this );
663 } else {
664 return false;
665 }
666 }
667
679 public function getAvailableLanguages() {
680 $handler = $this->getHandler();
681 if ( $handler ) {
682 return $handler->getAvailableLanguages( $this );
683 } else {
684 return [];
685 }
686 }
687
695 public function getMatchedLanguage( $userPreferredLanguage ) {
696 $handler = $this->getHandler();
697 if ( $handler ) {
699 $userPreferredLanguage,
701 );
702 }
703
704 return null;
705 }
706
714 public function getDefaultRenderLanguage() {
715 $handler = $this->getHandler();
716 if ( $handler ) {
717 return $handler->getDefaultRenderLanguage( $this );
718 } else {
719 return null;
720 }
721 }
722
734 $handler = $this->getHandler();
735 if ( !$handler ) {
736 // We cannot handle image whatsoever, thus
737 // one would not expect it to be animated
738 // so true.
739 return true;
740 }
741
742 return !$this->allowInlineDisplay()
743 // Image is not animated, so one would
744 // not expect thumb to be
745 || !$handler->isAnimatedImage( $this )
746 // Image is animated, but thumbnail isn't.
747 // This is unexpected to the user.
748 || $handler->canAnimateThumbnail( $this );
749 }
750
758 public function getMetadata() {
759 return false;
760 }
761
763 public function getHandlerState( string $key ) {
764 return $this->handlerState[$key] ?? null;
765 }
766
768 public function setHandlerState( string $key, $value ) {
769 $this->handlerState[$key] = $value;
770 }
771
778 public function getMetadataArray(): array {
779 return [];
780 }
781
789 public function getMetadataItem( string $itemName ) {
790 $items = $this->getMetadataItems( [ $itemName ] );
791 return $items[$itemName] ?? null;
792 }
793
801 public function getMetadataItems( array $itemNames ): array {
802 return array_intersect_key(
803 $this->getMetadataArray(),
804 array_fill_keys( $itemNames, true ) );
805 }
806
813 public function getCommonMetaArray() {
814 $handler = $this->getHandler();
815 return $handler ? $handler->getCommonMetaArray( $this ) : false;
816 }
817
825 public function convertMetadataVersion( $metadata, $version ) {
826 $handler = $this->getHandler();
827 if ( $handler ) {
828 return $handler->convertMetadataVersion( $metadata, $version );
829 } else {
830 return $metadata;
831 }
832 }
833
841 public function getBitDepth() {
842 return 0;
843 }
844
852 public function getSize() {
853 return false;
854 }
855
864 public function getMimeType() {
865 return 'unknown/unknown';
866 }
867
876 public function getMediaType() {
877 return MEDIATYPE_UNKNOWN;
878 }
879
890 public function canRender() {
891 if ( $this->canRender === null ) {
892 $this->canRender = $this->getHandler() && $this->handler->canRender( $this ) && $this->exists();
893 }
894
895 return $this->canRender;
896 }
897
902 protected function getCanRender() {
903 return $this->canRender();
904 }
905
917 public function mustRender() {
918 return $this->getHandler() && $this->handler->mustRender( $this );
919 }
920
926 public function allowInlineDisplay() {
927 return $this->canRender();
928 }
929
943 public function isSafeFile() {
944 if ( $this->isSafeFile === null ) {
945 $this->isSafeFile = $this->getIsSafeFileUncached();
946 }
947
948 return $this->isSafeFile;
949 }
950
956 protected function getIsSafeFile() {
957 return $this->isSafeFile();
958 }
959
965 protected function getIsSafeFileUncached() {
966 $trustedMediaFormats = MediaWikiServices::getInstance()->getMainConfig()
967 ->get( MainConfigNames::TrustedMediaFormats );
968
969 if ( $this->allowInlineDisplay() ) {
970 return true;
971 }
972 if ( $this->isTrustedFile() ) {
973 return true;
974 }
975
976 $type = $this->getMediaType();
977 $mime = $this->getMimeType();
978
979 if ( !$type || $type === MEDIATYPE_UNKNOWN ) {
980 return false; # unknown type, not trusted
981 }
982 if ( in_array( $type, $trustedMediaFormats ) ) {
983 return true;
984 }
985
986 if ( $mime === "unknown/unknown" ) {
987 return false; # unknown type, not trusted
988 }
989 if ( in_array( $mime, $trustedMediaFormats ) ) {
990 return true;
991 }
992
993 return false;
994 }
995
1009 protected function isTrustedFile() {
1010 # this could be implemented to check a flag in the database,
1011 # look for signatures, etc
1012 return false;
1013 }
1014
1025 public function load( $flags = 0 ) {
1026 }
1027
1036 public function exists() {
1037 return $this->getPath() && $this->repo->fileExists( $this->path );
1038 }
1039
1047 public function isVisible() {
1048 return $this->exists();
1049 }
1050
1054 private function getTransformScript() {
1055 if ( $this->transformScript === null ) {
1056 $this->transformScript = false;
1057 if ( $this->repo ) {
1058 $script = $this->repo->getThumbScriptUrl();
1059 if ( $script ) {
1060 $this->transformScript = wfAppendQuery( $script, [ 'f' => $this->getName() ] );
1061 }
1062 }
1063 }
1064
1065 return $this->transformScript;
1066 }
1067
1075 public function getUnscaledThumb( $handlerParams = [] ) {
1076 $hp =& $handlerParams;
1077 $page = $hp['page'] ?? false;
1078 $width = $this->getWidth( $page );
1079 if ( !$width ) {
1080 return $this->iconThumb();
1081 }
1082 $hp['width'] = $width;
1083 // be sure to ignore any height specification as well (T64258)
1084 unset( $hp['height'] );
1085
1086 return $this->transform( $hp );
1087 }
1088
1099 public function thumbName( $params, $flags = 0 ) {
1100 $name = ( $this->repo && !( $flags & self::THUMB_FULL_NAME ) )
1101 ? $this->repo->nameForThumb( $this->getName() )
1102 : $this->getName();
1103
1104 return $this->generateThumbName( $name, $params );
1105 }
1106
1115 public function generateThumbName( $name, $params ) {
1116 if ( !$this->getHandler() ) {
1117 return null;
1118 }
1119 $extension = $this->getExtension();
1120 [ $thumbExt, ] = $this->getHandler()->getThumbType(
1121 $extension, $this->getMimeType(), $params );
1122 $thumbName = $this->getHandler()->makeParamString( $this->adjustThumbWidthForSteps( $params ) );
1123
1124 if ( $this->repo->supportsSha1URLs() ) {
1125 $thumbName .= '-' . $this->getSha1() . '.' . $thumbExt;
1126 } else {
1127 $thumbName .= '-' . $name;
1128
1129 if ( $thumbExt != $extension ) {
1130 $thumbName .= ".$thumbExt";
1131 }
1132 }
1133
1134 return $thumbName;
1135 }
1136
1143 private function adjustThumbWidthForSteps( array $params ): array {
1144 $thumbnailSteps = MediaWikiServices::getInstance()
1145 ->getMainConfig()->get( MainConfigNames::ThumbnailSteps );
1146 $thumbnailStepsRatio = MediaWikiServices::getInstance()
1147 ->getMainConfig()->get( MainConfigNames::ThumbnailStepsRatio );
1148
1149 if ( !$thumbnailSteps || !$thumbnailStepsRatio ) {
1150 return $params;
1151 }
1152 if ( !isset( $params['physicalWidth'] ) || !$params['physicalWidth'] ) {
1153 return $params;
1154 }
1155
1156 if ( $thumbnailStepsRatio < 1 ) {
1157 // If thumbnail ratio is below 100%, build a random number
1158 // out of the file name and decide whether to apply adjustments
1159 // based on that. This way, we get a good uniformity while not going
1160 // back and forth between old and new in different requests.
1161 // Also this way, ramping up (e.g. from 0.1 to 0.2) would also
1162 // cover the previous values too which would reduce the scale of changes.
1163 $hash = hexdec( substr( md5( $this->name ), 0, 8 ) ) & 0x7fffffff;
1164 if ( ( $hash % 1000 ) > ( $thumbnailStepsRatio * 1000 ) ) {
1165 return $params;
1166 }
1167 }
1168
1169 $newThumbSize = null;
1170 foreach ( $thumbnailSteps as $widthStep ) {
1171 if ( ( $widthStep > $this->getWidth() ) && !$this->isVectorized() ) {
1172 // Round up to original width if there is no step between
1173 // desired thumb width & original file width
1174 $newThumbSize = $this->getWidth();
1175 break;
1176 }
1177 if ( $widthStep == $params['physicalWidth'] ) {
1178 return $params;
1179 }
1180 if ( $widthStep > $params['physicalWidth'] ) {
1181 $newThumbSize = $widthStep;
1182 break;
1183 }
1184 }
1185 if ( !$newThumbSize ) {
1186 return $params;
1187 }
1188
1189 if ( isset( $params['physicalHeight'] ) ) {
1190 $params['physicalHeight'] = intval(
1191 $params['physicalHeight'] *
1192 ( $newThumbSize / $params['physicalWidth'] )
1193 );
1194 }
1195 $params['physicalWidth'] = $newThumbSize;
1196 return $params;
1197 }
1198
1216 public function createThumb( $width, $height = -1 ) {
1217 $params = [ 'width' => $width ];
1218 if ( $height != -1 ) {
1219 $params['height'] = $height;
1220 }
1221 $thumb = $this->transform( $params );
1222 if ( !$thumb || $thumb->isError() ) {
1223 return '';
1224 }
1225
1226 return $thumb->getUrl();
1227 }
1228
1238 protected function transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags ) {
1239 $ignoreImageErrors = MediaWikiServices::getInstance()->getMainConfig()
1240 ->get( MainConfigNames::IgnoreImageErrors );
1241
1242 $handler = $this->getHandler();
1243 if ( $handler && $ignoreImageErrors && !( $flags & self::RENDER_NOW ) ) {
1244 return $handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
1245 } else {
1246 return new MediaTransformError( 'thumbnail_error',
1247 $params['width'], 0, wfMessage( 'thumbnail-dest-create' ) );
1248 }
1249 }
1250
1260 public function transform( $params, $flags = 0 ) {
1261 $thumbnailEpoch = MediaWikiServices::getInstance()->getMainConfig()
1262 ->get( MainConfigNames::ThumbnailEpoch );
1263
1264 do {
1265 if ( !$this->canRender() ) {
1266 $thumb = $this->iconThumb();
1267 break; // not a bitmap or renderable image, don't try
1268 }
1269
1270 // Get the descriptionUrl to embed it as comment into the thumbnail. T21791.
1271 $descriptionUrl = $this->getDescriptionUrl();
1272 if ( $descriptionUrl ) {
1273 $params['descriptionUrl'] = MediaWikiServices::getInstance()->getUrlUtils()
1274 ->expand( $descriptionUrl, PROTO_CANONICAL );
1275 }
1276
1277 $handler = $this->getHandler();
1278 $script = $this->getTransformScript();
1279 if ( $script && !( $flags & self::RENDER_NOW ) ) {
1280 // Use a script to transform on client request, if possible
1281 $thumb = $handler->getScriptedTransform( $this, $script, $params );
1282 if ( $thumb ) {
1283 break;
1284 }
1285 }
1286
1287 $normalisedParams = $params;
1288 $handler->normaliseParams( $this, $normalisedParams );
1289
1290 $thumbName = $this->thumbName( $normalisedParams );
1291 $thumbUrl = $this->getThumbUrl( $thumbName );
1292 $thumbPath = $this->getThumbPath( $thumbName ); // final thumb path
1293 if ( isset( $normalisedParams['isFilePageThumb'] ) && $normalisedParams['isFilePageThumb'] ) {
1294 // Use a versioned URL on file description pages
1295 $thumbUrl = $this->getFilePageThumbUrl( $thumbUrl );
1296 }
1297
1298 if ( $this->repo ) {
1299 // Defer rendering if a 404 handler is set up...
1300 if ( $this->repo->canTransformVia404() && !( $flags & self::RENDER_NOW ) ) {
1301 // XXX: Pass in the storage path even though we are not rendering anything
1302 // and the path is supposed to be an FS path. This is due to getScalerType()
1303 // getting called on the path and clobbering $thumb->getUrl() if it's false.
1304 $thumb = $handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
1305 break;
1306 }
1307 // Check if an up-to-date thumbnail already exists...
1308 wfDebug( __METHOD__ . ": Doing stat for $thumbPath" );
1309 if ( !( $flags & self::RENDER_FORCE ) && $this->repo->fileExists( $thumbPath ) ) {
1310 $timestamp = $this->repo->getFileTimestamp( $thumbPath );
1311 if ( $timestamp !== false && $timestamp >= $thumbnailEpoch ) {
1312 // XXX: Pass in the storage path even though we are not rendering anything
1313 // and the path is supposed to be an FS path. This is due to getScalerType()
1314 // getting called on the path and clobbering $thumb->getUrl() if it's false.
1315 $thumb = $handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
1316 $thumb->setStoragePath( $thumbPath );
1317 break;
1318 }
1319 } elseif ( $flags & self::RENDER_FORCE ) {
1320 wfDebug( __METHOD__ . ": forcing rendering per flag File::RENDER_FORCE" );
1321 }
1322
1323 // If the backend is ready-only, don't keep generating thumbnails
1324 // only to return transformation errors, just return the error now.
1325 if ( $this->repo->getReadOnlyReason() !== false ) {
1326 $thumb = $this->transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags );
1327 break;
1328 }
1329
1330 // Check to see if local transformation is disabled.
1331 if ( !$this->repo->canTransformLocally() ) {
1332 LoggerFactory::getInstance( 'thumbnail' )
1333 ->error( 'Local transform denied by configuration' );
1334 $thumb = new MediaTransformError(
1335 wfMessage(
1336 'thumbnail_error',
1337 'MediaWiki is configured to disallow local image scaling'
1338 ),
1339 $params['width'],
1340 0
1341 );
1342 break;
1343 }
1344 }
1345
1346 $tmpFile = $this->makeTransformTmpFile( $thumbPath );
1347
1348 if ( !$tmpFile ) {
1349 $thumb = $this->transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags );
1350 } else {
1351 $thumb = $this->generateAndSaveThumb( $tmpFile, $params, $flags );
1352 }
1353 } while ( false );
1354
1355 return $thumb ?: false;
1356 }
1357
1365 public function generateAndSaveThumb( $tmpFile, $transformParams, $flags ) {
1366 $ignoreImageErrors = MediaWikiServices::getInstance()->getMainConfig()
1367 ->get( MainConfigNames::IgnoreImageErrors );
1368
1369 if ( !$this->repo->canTransformLocally() ) {
1370 LoggerFactory::getInstance( 'thumbnail' )
1371 ->error( 'Local transform denied by configuration' );
1372 return new MediaTransformError(
1373 wfMessage(
1374 'thumbnail_error',
1375 'MediaWiki is configured to disallow local image scaling'
1376 ),
1377 $transformParams['width'],
1378 0
1379 );
1380 }
1381
1382 $statsFactory = MediaWikiServices::getInstance()->getStatsFactory();
1383
1384 $handler = $this->getHandler();
1385
1386 $normalisedParams = $transformParams;
1387 $handler->normaliseParams( $this, $normalisedParams );
1388
1389 $thumbName = $this->thumbName( $normalisedParams );
1390 $thumbUrl = $this->getThumbUrl( $thumbName );
1391 $thumbPath = $this->getThumbPath( $thumbName ); // final thumb path
1392 if ( isset( $normalisedParams['isFilePageThumb'] ) && $normalisedParams['isFilePageThumb'] ) {
1393 // Use a versioned URL on file description pages
1394 $thumbUrl = $this->getFilePageThumbUrl( $thumbUrl );
1395 }
1396
1397 $tmpThumbPath = $tmpFile->getPath();
1398
1399 if ( $handler->supportsBucketing() ) {
1400 $this->generateBucketsIfNeeded( $normalisedParams, $flags );
1401 }
1402
1403 $timer = $statsFactory->getTiming( 'media_thumbnail_generate_transform_seconds' )->start();
1404
1405 // Actually render the thumbnail...
1406 $thumb = $handler->doTransform( $this, $tmpThumbPath, $thumbUrl, $transformParams );
1407 $tmpFile->bind( $thumb ); // keep alive with $thumb
1408
1409 $timer->stop();
1410
1411 if ( !$thumb ) { // bad params?
1412 $thumb = false;
1413 } elseif ( $thumb->isError() ) { // transform error
1415 '@phan-var MediaTransformError $thumb';
1416 $this->lastError = $thumb->toText();
1417 // Ignore errors if requested
1418 if ( $ignoreImageErrors && !( $flags & self::RENDER_NOW ) ) {
1419 $thumb = $handler->getTransform( $this, $tmpThumbPath, $thumbUrl, $transformParams );
1420 }
1421 } elseif ( $this->repo && $thumb->hasFile() && !$thumb->fileIsSource() ) {
1422 // Copy the thumbnail from the file system into storage...
1423
1424 $timer = $statsFactory->getTiming( 'media_thumbnail_generate_store_seconds' )
1425 ->start();
1426
1427 wfDebug( __METHOD__ . ": copying $tmpThumbPath to $thumbPath" );
1428 $disposition = $this->getThumbDisposition( $thumbName );
1429 $status = $this->repo->quickImport( $tmpThumbPath, $thumbPath, $disposition );
1430 if ( $status->isOK() ) {
1431 $thumb->setStoragePath( $thumbPath );
1432 } else {
1433 $thumb = $this->transformErrorOutput( $thumbPath, $thumbUrl, $transformParams, $flags );
1434 }
1435
1436 $timer->stop();
1437
1438 // Give extensions a chance to do something with this thumbnail...
1439 $this->getHookRunner()->onFileTransformed( $this, $thumb, $tmpThumbPath, $thumbPath );
1440 }
1441
1442 return $thumb;
1443 }
1444
1451 protected function generateBucketsIfNeeded( $params, $flags = 0 ) {
1452 if ( !$this->repo
1453 || !isset( $params['physicalWidth'] )
1454 || !isset( $params['physicalHeight'] )
1455 ) {
1456 return false;
1457 }
1458
1459 $bucket = $this->getThumbnailBucket( $params['physicalWidth'] );
1460
1461 if ( !$bucket || $bucket == $params['physicalWidth'] ) {
1462 return false;
1463 }
1464
1465 $bucketPath = $this->getBucketThumbPath( $bucket );
1466
1467 if ( $this->repo->fileExists( $bucketPath ) ) {
1468 return false;
1469 }
1470
1471 $timer = MediaWikiServices::getInstance()->getStatsFactory()
1472 ->getTiming( 'media_thumbnail_generate_bucket_seconds' );
1473 $timer->start();
1474
1475 $params['physicalWidth'] = $bucket;
1476 $params['width'] = $bucket;
1477
1478 $params = $this->getHandler()->sanitizeParamsForBucketing( $params );
1479
1480 $tmpFile = $this->makeTransformTmpFile( $bucketPath );
1481
1482 if ( !$tmpFile ) {
1483 return false;
1484 }
1485
1486 $thumb = $this->generateAndSaveThumb( $tmpFile, $params, $flags );
1487
1488 if ( !$thumb || $thumb->isError() ) {
1489 return false;
1490 }
1491
1492 $timer->stop();
1493
1494 $this->tmpBucketedThumbCache[$bucket] = $tmpFile->getPath();
1495 // For the caching to work, we need to make the tmp file survive as long as
1496 // this object exists
1497 $tmpFile->bind( $this );
1498
1499 return true;
1500 }
1501
1507 public function getThumbnailSource( $params ) {
1508 if ( $this->repo
1509 && $this->getHandler()->supportsBucketing()
1510 && isset( $params['physicalWidth'] )
1511 ) {
1512 $bucket = $this->getThumbnailBucket( $params['physicalWidth'] );
1513 if ( $bucket ) {
1514 if ( $this->getWidth() != 0 ) {
1515 $bucketHeight = round( $this->getHeight() * ( $bucket / $this->getWidth() ) );
1516 } else {
1517 $bucketHeight = 0;
1518 }
1519
1520 // Try to avoid reading from storage if the file was generated by this script
1521 if ( isset( $this->tmpBucketedThumbCache[$bucket] ) ) {
1522 $tmpPath = $this->tmpBucketedThumbCache[$bucket];
1523
1524 if ( file_exists( $tmpPath ) ) {
1525 return [
1526 'path' => $tmpPath,
1527 'width' => $bucket,
1528 'height' => $bucketHeight
1529 ];
1530 }
1531 }
1532
1533 $bucketPath = $this->getBucketThumbPath( $bucket );
1534
1535 if ( $this->repo->fileExists( $bucketPath ) ) {
1536 $fsFile = $this->repo->getLocalReference( $bucketPath );
1537
1538 if ( $fsFile ) {
1539 return [
1540 'path' => $fsFile->getPath(),
1541 'width' => $bucket,
1542 'height' => $bucketHeight
1543 ];
1544 }
1545 }
1546 }
1547 }
1548
1549 // Thumbnailing a very large file could result in network saturation if
1550 // everyone does it at once.
1551 if ( $this->getSize() >= 1e7 ) { // 10 MB
1552 $work = new PoolCounterWorkViaCallback( 'GetLocalFileCopy', sha1( $this->getName() ),
1553 [ 'doWork' => $this->getLocalRefPath( ... ) ]
1554 );
1555 $srcPath = $work->execute();
1556 } else {
1557 $srcPath = $this->getLocalRefPath();
1558 }
1559
1560 // Original file
1561 return [
1562 'path' => $srcPath,
1563 'width' => $this->getWidth(),
1564 'height' => $this->getHeight()
1565 ];
1566 }
1567
1573 protected function getBucketThumbPath( $bucket ) {
1574 $thumbName = $this->getBucketThumbName( $bucket );
1575 return $this->getThumbPath( $thumbName );
1576 }
1577
1583 protected function getBucketThumbName( $bucket ) {
1584 return $this->thumbName( [ 'physicalWidth' => $bucket ] );
1585 }
1586
1592 protected function makeTransformTmpFile( $thumbPath ) {
1593 $thumbExt = FileBackend::extensionFromPath( $thumbPath );
1594 return MediaWikiServices::getInstance()->getTempFSFileFactory()
1595 ->newTempFSFile( 'transform_', $thumbExt );
1596 }
1597
1603 public function getThumbDisposition( $thumbName, $dispositionType = 'inline' ) {
1604 $fileName = $this->getName(); // file name to suggest
1605 $thumbExt = FileBackend::extensionFromPath( $thumbName );
1606 if ( $thumbExt != '' && $thumbExt !== $this->getExtension() ) {
1607 $fileName .= ".$thumbExt";
1608 }
1609
1610 return FileBackend::makeContentDisposition( $dispositionType, $fileName );
1611 }
1612
1619 public function getHandler() {
1620 if ( !$this->handler ) {
1621 $this->handler = MediaHandler::getHandler( $this->getMimeType() );
1622 }
1623
1624 return $this->handler;
1625 }
1626
1632 public function iconThumb() {
1633 global $IP;
1634 $resourceBasePath = MediaWikiServices::getInstance()->getMainConfig()
1635 ->get( MainConfigNames::ResourceBasePath );
1636 $assetsPath = "{$resourceBasePath}/resources/assets/file-type-icons/";
1637 $assetsDirectory = "$IP/resources/assets/file-type-icons/";
1638
1639 $try = [ 'fileicon-' . $this->getExtension() . '.png', 'fileicon.png' ];
1640 foreach ( $try as $icon ) {
1641 if ( file_exists( $assetsDirectory . $icon ) ) { // always FS
1642 $params = [ 'width' => 120, 'height' => 120 ];
1643
1644 return new ThumbnailImage( $this, $assetsPath . $icon, false, $params );
1645 }
1646 }
1647
1648 return null;
1649 }
1650
1656 public function getLastError() {
1657 return $this->lastError;
1658 }
1659
1667 protected function getThumbnails() {
1668 return [];
1669 }
1670
1679 public function purgeCache( $options = [] ) {
1680 }
1681
1687 public function purgeDescription() {
1688 $title = $this->getTitle();
1689 if ( $title ) {
1690 $title->invalidateCache();
1691 $hcu = MediaWikiServices::getInstance()->getHtmlCacheUpdater();
1692 $hcu->purgeTitleUrls( $title, $hcu::PURGE_INTENT_TXROUND_REFLECTED );
1693 }
1694 }
1695
1700 public function purgeEverything() {
1701 // Delete thumbnails and refresh file metadata cache
1702 $this->purgeCache();
1703 $this->purgeDescription();
1704 // Purge cache of all pages using this file
1705 $title = $this->getTitle();
1706 if ( $title ) {
1707 $job = HTMLCacheUpdateJob::newForBacklinks(
1708 $title,
1709 'imagelinks',
1710 [ 'causeAction' => 'file-purge' ]
1711 );
1712 MediaWikiServices::getInstance()->getJobQueueGroup()->lazyPush( $job );
1713 }
1714 }
1715
1728 public function getHistory( $limit = null, $start = null, $end = null, $inc = true ) {
1729 return [];
1730 }
1731
1742 public function nextHistoryLine() {
1743 return false;
1744 }
1745
1753 public function resetHistory() {
1754 }
1755
1763 public function getHashPath() {
1764 if ( $this->hashPath === null ) {
1765 $this->assertRepoDefined();
1766 $this->hashPath = $this->repo->getHashPath( $this->getName() );
1767 }
1768
1769 return $this->hashPath;
1770 }
1771
1779 public function getRel() {
1780 return $this->getHashPath() . $this->getName();
1781 }
1782
1791 public function getArchiveRel( $suffix = false ) {
1792 $path = 'archive/' . $this->getHashPath();
1793 if ( $suffix === false ) {
1794 $path = rtrim( $path, '/' );
1795 } else {
1796 $path .= $suffix;
1797 }
1798
1799 return $path;
1800 }
1801
1810 public function getThumbRel( $suffix = false ) {
1811 $path = $this->getRel();
1812 if ( $suffix !== false ) {
1813 $path .= '/' . $suffix;
1814 }
1815
1816 return $path;
1817 }
1818
1826 public function getUrlRel() {
1827 return $this->getHashPath() . rawurlencode( $this->getName() );
1828 }
1829
1838 private function getArchiveThumbRel( $archiveName, $suffix = false ) {
1839 $path = $this->getArchiveRel( $archiveName );
1840 if ( $suffix !== false ) {
1841 $path .= '/' . $suffix;
1842 }
1843
1844 return $path;
1845 }
1846
1853 public function getArchivePath( $suffix = false ) {
1854 $this->assertRepoDefined();
1855
1856 return $this->repo->getZonePath( 'public' ) . '/' . $this->getArchiveRel( $suffix );
1857 }
1858
1866 public function getArchiveThumbPath( $archiveName, $suffix = false ) {
1867 $this->assertRepoDefined();
1868
1869 return $this->repo->getZonePath( 'thumb' ) . '/' .
1870 $this->getArchiveThumbRel( $archiveName, $suffix );
1871 }
1872
1880 public function getThumbPath( $suffix = false ) {
1881 $this->assertRepoDefined();
1882
1883 return $this->repo->getZonePath( 'thumb' ) . '/' . $this->getThumbRel( $suffix );
1884 }
1885
1892 public function getTranscodedPath( $suffix = false ) {
1893 $this->assertRepoDefined();
1894
1895 return $this->repo->getZonePath( 'transcoded' ) . '/' . $this->getThumbRel( $suffix );
1896 }
1897
1905 public function getArchiveUrl( $suffix = false ) {
1906 $this->assertRepoDefined();
1907 $ext = $this->getExtension();
1908 $path = $this->repo->getZoneUrl( 'public', $ext ) . '/archive/' . $this->getHashPath();
1909 if ( $suffix === false ) {
1910 $path = rtrim( $path, '/' );
1911 } else {
1912 $path .= rawurlencode( $suffix );
1913 }
1914
1915 return $path;
1916 }
1917
1926 public function getArchiveThumbUrl( $archiveName, $suffix = false ) {
1927 $this->assertRepoDefined();
1928 $ext = $this->getExtension();
1929 $path = $this->repo->getZoneUrl( 'thumb', $ext ) . '/archive/' .
1930 $this->getHashPath() . rawurlencode( $archiveName );
1931 if ( $suffix !== false ) {
1932 $path .= '/' . rawurlencode( $suffix );
1933 }
1934
1935 return $path;
1936 }
1937
1945 private function getZoneUrl( $zone, $suffix = false ) {
1946 $this->assertRepoDefined();
1947 $ext = $this->getExtension();
1948 $path = $this->repo->getZoneUrl( $zone, $ext ) . '/' . $this->getUrlRel();
1949 if ( $suffix !== false ) {
1950 $path .= '/' . rawurlencode( $suffix );
1951 }
1952
1953 return $path;
1954 }
1955
1963 public function getThumbUrl( $suffix = false ) {
1964 return $this->getZoneUrl( 'thumb', $suffix );
1965 }
1966
1975 public function getFilePageThumbUrl( $url ) {
1976 if ( $this->repo->isLocal() ) {
1977 return wfAppendQuery( $url, urlencode( $this->getTimestamp() ) );
1978 } else {
1979 return $url;
1980 }
1981 }
1982
1989 public function getTranscodedUrl( $suffix = false ) {
1990 return $this->getZoneUrl( 'transcoded', $suffix );
1991 }
1992
2000 public function getVirtualUrl( $suffix = false ) {
2001 $this->assertRepoDefined();
2002 $path = $this->repo->getVirtualUrl() . '/public/' . $this->getUrlRel();
2003 if ( $suffix !== false ) {
2004 $path .= '/' . rawurlencode( $suffix );
2005 }
2006
2007 return $path;
2008 }
2009
2017 public function getArchiveVirtualUrl( $suffix = false ) {
2018 $this->assertRepoDefined();
2019 $path = $this->repo->getVirtualUrl() . '/public/archive/' . $this->getHashPath();
2020 if ( $suffix === false ) {
2021 $path = rtrim( $path, '/' );
2022 } else {
2023 $path .= rawurlencode( $suffix );
2024 }
2025
2026 return $path;
2027 }
2028
2036 public function getThumbVirtualUrl( $suffix = false ) {
2037 $this->assertRepoDefined();
2038 $path = $this->repo->getVirtualUrl() . '/thumb/' . $this->getUrlRel();
2039 if ( $suffix !== false ) {
2040 $path .= '/' . rawurlencode( $suffix );
2041 }
2042
2043 return $path;
2044 }
2045
2049 protected function isHashed() {
2050 $this->assertRepoDefined();
2051
2052 return (bool)$this->repo->getHashLevels();
2053 }
2054
2055 protected function readOnlyError(): never {
2056 throw new LogicException( static::class . ': write operations are not supported' );
2057 }
2058
2081 public function publish( $src, $flags = 0, array $options = [] ) {
2082 $this->readOnlyError();
2083 }
2084
2089 public function formatMetadata( $context = false ) {
2090 $handler = $this->getHandler();
2091 return $handler ? $handler->formatMetadata( $this, $context ) : false;
2092 }
2093
2099 public function isLocal() {
2100 return $this->repo && $this->repo->isLocal();
2101 }
2102
2108 public function getRepoName() {
2109 return $this->repo ? $this->repo->getName() : 'unknown';
2110 }
2111
2118 public function getRepo() {
2119 return $this->repo;
2120 }
2121
2129 public function isOld() {
2130 return false;
2131 }
2132
2141 public function isDeleted( $field ) {
2142 return false;
2143 }
2144
2151 public function getVisibility() {
2152 return 0;
2153 }
2154
2160 public function wasDeleted() {
2161 $title = $this->getTitle();
2162
2163 return $title && $title->hasDeletedEdits();
2164 }
2165
2179 public function move( $target ) {
2180 $this->readOnlyError();
2181 }
2182
2201 public function deleteFile( $reason, UserIdentity $user, $suppress = false ) {
2202 $this->readOnlyError();
2203 }
2204
2219 public function restore( $versions = [], $unsuppress = false ) {
2220 $this->readOnlyError();
2221 }
2222
2231 public function isMultipage() {
2232 return $this->getHandler() && $this->handler->isMultiPage( $this );
2233 }
2234
2242 public function pageCount() {
2243 if ( $this->pageCount === null ) {
2244 if ( $this->getHandler() && $this->handler->isMultiPage( $this ) ) {
2245 $this->pageCount = $this->handler->pageCount( $this );
2246 } else {
2247 $this->pageCount = false;
2248 }
2249 }
2250
2251 return $this->pageCount;
2252 }
2253
2263 public static function scaleHeight( $srcWidth, $srcHeight, $dstWidth ) {
2264 // Exact integer multiply followed by division
2265 if ( $srcWidth == 0 ) {
2266 return 0;
2267 } else {
2268 return (int)round( $srcHeight * $dstWidth / $srcWidth );
2269 }
2270 }
2271
2279 public function getDescriptionUrl() {
2280 if ( $this->repo ) {
2281 return $this->repo->getDescriptionUrl( $this->getName() );
2282 } else {
2283 return false;
2284 }
2285 }
2286
2295 public function getDescriptionText( ?Language $lang = null ) {
2296 global $wgLang;
2297
2298 if ( !$this->repo || !$this->repo->fetchDescription ) {
2299 return false;
2300 }
2301
2302 $lang ??= $wgLang;
2303
2304 $renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName(), $lang->getCode() );
2305 if ( $renderUrl ) {
2306 $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
2307 $key = $this->repo->getLocalCacheKey(
2308 'file-remote-description',
2309 $lang->getCode(),
2310 md5( $this->getName() )
2311 );
2312 $fname = __METHOD__;
2313
2314 return $cache->getWithSetCallback(
2315 $key,
2316 $this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE,
2317 static function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl, $fname ) {
2318 wfDebug( "Fetching shared description from $renderUrl" );
2319 $res = MediaWikiServices::getInstance()->getHttpRequestFactory()->
2320 get( $renderUrl, [], $fname );
2321 if ( !$res ) {
2322 $ttl = WANObjectCache::TTL_UNCACHEABLE;
2323 }
2324
2325 return $res;
2326 }
2327 );
2328 }
2329
2330 return false;
2331 }
2332
2348 public function getUploader( int $audience = self::FOR_PUBLIC, ?Authority $performer = null ): ?UserIdentity {
2349 return null;
2350 }
2351
2365 public function getDescription( $audience = self::FOR_PUBLIC, ?Authority $performer = null ) {
2366 return null;
2367 }
2368
2375 public function getTimestamp() {
2376 $this->assertRepoDefined();
2377
2378 return $this->repo->getFileTimestamp( $this->getPath() );
2379 }
2380
2389 public function getDescriptionTouched() {
2390 return false;
2391 }
2392
2399 public function getSha1() {
2400 $this->assertRepoDefined();
2401
2402 return $this->repo->getFileSha1( $this->getPath() );
2403 }
2404
2410 public function getStorageKey() {
2411 $hash = $this->getSha1();
2412 if ( !$hash ) {
2413 return false;
2414 }
2415 $ext = $this->getExtension();
2416 $dotExt = $ext === '' ? '' : ".$ext";
2417
2418 return $hash . $dotExt;
2419 }
2420
2430 public function userCan( $field, Authority $performer ) {
2431 return true;
2432 }
2433
2438 public function getContentHeaders() {
2439 $handler = $this->getHandler();
2440 if ( $handler ) {
2441 return $handler->getContentHeaders( $this->getMetadataArray() );
2442 }
2443
2444 return [];
2445 }
2446
2457 public function getLongDesc() {
2458 $handler = $this->getHandler();
2459 if ( $handler ) {
2460 return $handler->getLongDesc( $this );
2461 } else {
2462 return MediaHandler::getGeneralLongDesc( $this );
2463 }
2464 }
2465
2476 public function getShortDesc() {
2477 $handler = $this->getHandler();
2478 if ( $handler ) {
2479 return $handler->getShortDesc( $this );
2480 } else {
2481 return MediaHandler::getGeneralShortDesc( $this );
2482 }
2483 }
2484
2488 public function getDimensionsString() {
2489 $handler = $this->getHandler();
2490 if ( $handler ) {
2491 return $handler->getDimensionsString( $this );
2492 } else {
2493 return '';
2494 }
2495 }
2496
2501 public function getRedirected(): ?string {
2502 return $this->redirected;
2503 }
2504
2508 protected function getRedirectedTitle() {
2509 if ( $this->redirected !== null ) {
2510 if ( !$this->redirectTitle ) {
2511 $this->redirectTitle = Title::makeTitle( NS_FILE, $this->redirected );
2512 }
2513
2514 return $this->redirectTitle;
2515 }
2516
2517 return null;
2518 }
2519
2524 public function redirectedFrom( string $from ) {
2525 $this->redirected = $from;
2526 }
2527
2532 public function isMissing() {
2533 return false;
2534 }
2535
2541 public function isCacheable() {
2542 return true;
2543 }
2544
2548 protected function assertRepoDefined() {
2549 if ( !( $this->repo instanceof $this->repoClass ) ) {
2550 throw new LogicException( "A {$this->repoClass} object is not set for this File.\n" );
2551 }
2552 }
2553
2557 protected function assertTitleDefined() {
2558 if ( !( $this->title instanceof Title ) ) {
2559 throw new LogicException( "A Title object is not set for this File.\n" );
2560 }
2561 }
2562
2567 public function isExpensiveToThumbnail() {
2568 $handler = $this->getHandler();
2569 return $handler && $handler->isExpensiveToThumbnail( $this );
2570 }
2571
2578 public function isTransformedLocally() {
2579 return true;
2580 }
2581}
2582
2584class_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.
wfAppendQuery( $url, $query)
Append a query string to an existing URL, which may or may not already have query string parameters a...
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
const MEDIATYPE_UNKNOWN
Definition defines.php:13
if(!defined('MEDIAWIKI')) if(!defined( 'MW_ENTRY_POINT')) global $IP
Environment checks.
Definition Setup.php:90
if(MW_ENTRY_POINT==='index') if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' $wgLang
Definition Setup.php:551
Base media handler class.
canAnimateThumbnail( $file)
If the material is animated, we can animate the thumbnail.
getDefaultRenderLanguage(File $file)
On file types that support renderings in multiple languages, which language is used by default if uns...
getLength( $file)
If it's an audio file, return the length of the file.
isAnimatedImage( $file)
The material is an image, and is animated.
isVectorized( $file)
The material is vectorized and thus scaling is lossless.
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.
Basic media transform error class.
Base class for the output of MediaHandler::doTransform() and File::transform().
Exceptions for config failures.
Base class for file repositories.
Definition FileRepo.php:52
Implements some public methods and some protected utility functions which are required by multiple ch...
Definition File.php:79
move( $target)
Move file to the new title.
Definition File.php:2179
static compare(File $a, File $b)
Callback for usort() to do file sorts by name.
Definition File.php:337
getMetadataItems(array $itemNames)
Get multiple elements of the unserialized handler-specific metadata.
Definition File.php:801
getSha1()
Get the SHA-1 base 36 hash of the file.
Definition File.php:2399
transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags)
Return either a MediaTransformError or placeholder thumbnail (if $wgIgnoreImageErrors)
Definition File.php:1238
assertTitleDefined()
Assert that $this->title is set to a Title.
Definition File.php:2557
allowInlineDisplay()
Alias for canRender()
Definition File.php:926
isLocal()
Returns true if the file comes from the local file repository.
Definition File.php:2099
getTranscodedPath( $suffix=false)
Get the path of the transcoded directory, or a particular file if $suffix is specified.
Definition File.php:1892
getArchiveRel( $suffix=false)
Get the path of an archived file relative to the public zone root.
Definition File.php:1791
getCanRender()
Accessor for __get()
Definition File.php:902
getBucketThumbName( $bucket)
Returns the name of the thumb for a given bucket.
Definition File.php:1583
int false null $pageCount
Number of pages of a multipage document, or false for documents which aren't multipage documents.
Definition File.php:167
string $lastError
Text of last error.
Definition File.php:132
getThumbRel( $suffix=false)
Get the path, relative to the thumbnail zone root, of the thumbnail directory or a particular file if...
Definition File.php:1810
FileRepo LocalRepo ForeignAPIRepo false $repo
Some member variables can be lazy-initialised using __get().
Definition File.php:126
getLocalRefPath()
Get an FS copy or original of this file and return the path.
Definition File.php:491
getRepo()
Returns the repository.
Definition File.php:2118
createThumb( $width, $height=-1)
Create a thumbnail of the image having the specified width/height.
Definition File.php:1216
getHistory( $limit=null, $start=null, $end=null, $inc=true)
Return a fragment of the history of file.
Definition File.php:1728
getOriginalTitle()
Return the title used to find this file.
Definition File.php:386
isDeleted( $field)
Is this file a "deleted" file in a private archive? STUB.
Definition File.php:2141
getStorageKey()
Get the deletion archive key, "<sha1>.<ext>".
Definition File.php:2410
getMediaType()
Return the type of the media in the file.
Definition File.php:876
getMetadataArray()
Get the unserialized handler-specific metadata STUB.
Definition File.php:778
purgeCache( $options=[])
Purge shared caches such as thumbnails and DB data caching STUB Overridden by LocalFile.
Definition File.php:1679
getLongDesc()
Long description.
Definition File.php:2457
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:1656
getDescriptionShortUrl()
Get short description URL for a files based on the page ID.
Definition File.php:417
iconThumb()
Get a ThumbnailImage representing a file type icon.
Definition File.php:1632
canRender()
Checks if the output of transform() for this file is likely to be valid.
Definition File.php:890
pageCount()
Returns the number of pages of a multipage document, or false for documents which aren't multipage do...
Definition File.php:2242
exists()
Returns true if file exists in the repository.
Definition File.php:1036
getBucketThumbPath( $bucket)
Returns the repo path of the thumb for a given bucket.
Definition File.php:1573
getMetadataItem(string $itemName)
Get a specific element of the unserialized handler-specific metadata.
Definition File.php:789
getIsSafeFileUncached()
Uncached accessor.
Definition File.php:965
getHandlerState(string $key)
Get a value, or null if it does not exist.mixed|null
Definition File.php:763
string null $path
The storage path corresponding to one of the zones.
Definition File.php:159
resetHistory()
Reset the history pointer to the first element of the history.
Definition File.php:1753
getSize()
Return the size of the image file, in bytes Overridden by LocalFile, UnregisteredLocalFile STUB.
Definition File.php:852
string null $url
The URL corresponding to one of the four basic zones.
Definition File.php:150
isExpensiveToThumbnail()
True if creating thumbnails from the file is large or otherwise resource-intensive.
Definition File.php:2567
getCommonMetaArray()
Like getMetadata but returns a handler independent array of common values.
Definition File.php:813
nextHistoryLine()
Return the history of this file, line by line.
Definition File.php:1742
MediaHandler null $handler
Definition File.php:147
string null $hashPath
Relative path including trailing slash.
Definition File.php:162
formatMetadata( $context=false)
Definition File.php:2089
isVisible()
Returns true if file exists in the repository and can be included in a page.
Definition File.php:1047
getTitle()
Return the associated title object.
Definition File.php:377
getTimestamp()
Get the 14-character timestamp of the file upload.
Definition File.php:2375
addToShellboxCommand(BoxedCommand $command, string $boxedName)
Add the file to a Shellbox command as an input file.
Definition File.php:520
getVisibility()
Return the deletion bitfield STUB.
Definition File.php:2151
getMetadata()
Get handler-specific metadata Overridden by LocalFile, UnregisteredLocalFile STUB.
Definition File.php:758
getTranscodedUrl( $suffix=false)
Get the URL of the transcoded directory, or a particular file if $suffix is specified.
Definition File.php:1989
getThumbnailBucket( $desiredWidth, $page=1)
Return the smallest bucket from $wgThumbnailBuckets which is at least $wgThumbnailMinimumBucketDistan...
Definition File.php:563
getMimeType()
Returns the MIME type of the file.
Definition File.php:864
isSafeFile()
Determines if this media file is in a format that is unlikely to contain viruses or malicious content...
Definition File.php:943
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:2430
deleteFile( $reason, UserIdentity $user, $suppress=false)
Delete all versions of the file.
Definition File.php:2201
makeTransformTmpFile( $thumbPath)
Creates a temp FS file with the same extension and the thumbnail.
Definition File.php:1592
getLength()
Get the duration of a media file in seconds.
Definition File.php:645
getAvailableLanguages()
Gives a (possibly empty) list of IETF languages to render the file in.
Definition File.php:679
isMultipage()
Returns 'true' if this file is a type which supports multiple pages, e.g.
Definition File.php:2231
string null $name
The name of a file from its title object.
Definition File.php:156
getRel()
Get the path of the file relative to the public zone root.
Definition File.php:1779
getUnscaledThumb( $handlerParams=[])
Get a ThumbnailImage which is the same size as the source.
Definition File.php:1075
string false null $transformScript
URL of transformscript (for example thumb.php)
Definition File.php:170
string $redirected
The name that was used to access the file, before resolving redirects.
Definition File.php:138
array $tmpBucketedThumbCache
Cache of tmp filepaths pointing to generated bucket thumbnails, keyed by width.
Definition File.php:187
canAnimateThumbIfAppropriate()
Will the thumbnail be animated if one would expect it to be.
Definition File.php:733
wasDeleted()
Was this file ever deleted from the wiki?
Definition File.php:2160
getThumbDisposition( $thumbName, $dispositionType='inline')
Definition File.php:1603
generateAndSaveThumb( $tmpFile, $transformParams, $flags)
Generates a thumbnail according to the given parameters and saves it to storage.
Definition File.php:1365
purgeDescription()
Purge the file description page, but don't go after pages using the file.
Definition File.php:1687
isVectorized()
Return true if the file is vectorized.
Definition File.php:659
setHandlerState(string $key, $value)
Set a value.
Definition File.php:768
getHeight( $page=1)
Return the height of the image.
Definition File.php:550
getUploader(int $audience=self::FOR_PUBLIC, ?Authority $performer=null)
Get the identity of the file uploader.
Definition File.php:2348
getUrl()
Return the URL of the file.
Definition File.php:400
getArchiveThumbUrl( $archiveName, $suffix=false)
Get the URL of the archived file's thumbs, or a particular thumb if $suffix is specified.
Definition File.php:1926
getBitDepth()
Return the bit depth of the file Overridden by LocalFile STUB.
Definition File.php:841
isTrustedFile()
Returns true if the file is flagged as trusted.
Definition File.php:1009
getUrlRel()
Get urlencoded path of the file relative to the public zone root.
Definition File.php:1826
bool null $canRender
Whether the output of transform() for this file is likely to be valid.
Definition File.php:176
getArchivePath( $suffix=false)
Get the path of the archived file.
Definition File.php:1853
getIsSafeFile()
Accessor for __get()
Definition File.php:956
transform( $params, $flags=0)
Transform a media file.
Definition File.php:1260
getWidth( $page=1)
Return the width of the image.
Definition File.php:535
__construct( $title, $repo)
Call this constructor from child classes.
Definition File.php:203
assertRepoDefined()
Assert that $this->repo is set to a valid FileRepo instance.
Definition File.php:2548
thumbName( $params, $flags=0)
Return the file name of a thumbnail with the specified parameters.
Definition File.php:1099
FSFile false null $fsFile
False if undefined.
Definition File.php:144
isOld()
Returns true if the image is an old version STUB.
Definition File.php:2129
Title string false $title
Definition File.php:129
getThumbVirtualUrl( $suffix=false)
Get the virtual URL for a thumbnail file or directory.
Definition File.php:2036
static checkExtensionCompatibility(File $old, $new)
Checks if file extensions are compatible.
Definition File.php:294
const RENDER_NOW
Force rendering in the current process.
Definition File.php:89
getRepoName()
Returns the name of the repository.
Definition File.php:2108
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:220
getVirtualUrl( $suffix=false)
Get the public zone virtual URL for a current version source file.
Definition File.php:2000
getHandler()
Get a MediaHandler instance for this file.
Definition File.php:1619
getMatchedLanguage( $userPreferredLanguage)
Get the IETF language code from the available languages for this file that matches the language reque...
Definition File.php:695
getThumbnailSource( $params)
Returns the most appropriate source image for the thumbnail, given a target thumbnail size.
Definition File.php:1507
getName()
Return the name of this file.
Definition File.php:347
getDescriptionTouched()
Returns the timestamp (in TS::MW format) of the last change of the description page.
Definition File.php:2389
getDisplayWidthHeight( $maxWidth, $maxHeight, $page=1)
Get the width and height to display image at.
Definition File.php:609
purgeEverything()
Purge metadata and all affected pages when the file is created, deleted, or majorly updated.
Definition File.php:1700
bool null $isSafeFile
Whether this media file is in a format that is unlikely to contain viruses or malicious content.
Definition File.php:181
getExtension()
Get the file extension, e.g.
Definition File.php:362
string null $extension
File extension.
Definition File.php:153
static scaleHeight( $srcWidth, $srcHeight, $dstWidth)
Calculate the height of a thumbnail using the source and destination width.
Definition File.php:2263
const RENDER_FORCE
Force rendering even if thumbnail already exist and using RENDER_NOW I.e.
Definition File.php:94
getArchiveUrl( $suffix=false)
Get the URL of the archive directory, or a particular file if $suffix is specified.
Definition File.php:1905
isCacheable()
Check if this file object is small and can be cached.
Definition File.php:2541
getThumbUrl( $suffix=false)
Get the URL of the thumbnail directory, or a particular file if $suffix is specified.
Definition File.php:1963
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:917
upgradeRow()
Upgrade the database row if there is one Called by ImagePage STUB.
Definition File.php:310
getArchiveThumbPath( $archiveName, $suffix=false)
Get the path of an archived file's thumbs, or a particular thumb if $suffix is specified.
Definition File.php:1866
getThumbnails()
Get all thumbnail names previously generated for this file STUB Overridden by LocalFile.
Definition File.php:1667
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:320
load( $flags=0)
Load any lazy-loaded file object fields from source.
Definition File.php:1025
getHashPath()
Get the filename hash component of the directory including trailing slash, e.g.
Definition File.php:1763
getThumbPath( $suffix=false)
Get the path of the thumbnail directory, or a particular file if $suffix is specified.
Definition File.php:1880
getDescriptionUrl()
Get the URL of the image description page.
Definition File.php:2279
generateThumbName( $name, $params)
Generate a thumbnail file name from a name and specified parameters.
Definition File.php:1115
getFilePageThumbUrl( $url)
Append a version parameter to the end of a file URL Only to be used on File pages.
Definition File.php:1975
isTransformedLocally()
Whether the thumbnails created on the same server as this code is running.
Definition File.php:2578
getArchiveVirtualUrl( $suffix=false)
Get the public zone virtual URL for an archived version source file.
Definition File.php:2017
convertMetadataVersion( $metadata, $version)
get versioned metadata
Definition File.php:825
string $repoClass
Required Repository class type.
Definition File.php:184
getDefaultRenderLanguage()
In files that support multiple language, what is the default language to use if none specified.
Definition File.php:714
restore( $versions=[], $unsuppress=false)
Restore all or specified deleted revisions to the given file.
Definition File.php:2219
getDescription( $audience=self::FOR_PUBLIC, ?Authority $performer=null)
Get description of file revision STUB.
Definition File.php:2365
getPath()
Return the storage path to the file.
Definition File.php:475
getShortDesc()
Short description.
Definition File.php:2476
getFullUrl()
Return a fully-qualified URL to the file.
Definition File.php:429
publish( $src, $flags=0, array $options=[])
Move or copy a file to its public location.
Definition File.php:2081
redirectedFrom(string $from)
Definition File.php:2524
static normalizeExtension( $extension)
Normalize a file extension to the common form, making it lowercase and checking some synonyms,...
Definition File.php:269
generateBucketsIfNeeded( $params, $flags=0)
Generates chained bucketed thumbnails if needed.
Definition File.php:1451
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:70
Create PSR-3 logger objects.
A class containing constants representing the names of configuration variables.
const ThumbnailBuckets
Name constant for the ThumbnailBuckets 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.
getMainConfig()
Returns the Config object that provides configuration for MediaWiki core.
static getInstance()
Returns the global default instance of the top level service locator.
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:70
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Media transform output for images.
Class representing a non-directory file on the file system.
Definition FSFile.php:21
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', 'sodipodi'=> ' $path/sodipodi -z -w $width -f $input -e $output', 'inkscape'=> ' $path/inkscape -z -w $width -f $input -e $output', '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', 'imgserv'=> ' $path/imgserv-wrapper -i svg -o png -w$width $input $output', 'ImagickExt'=>['SvgHandler::rasterizeImagickExt',],], 'SVGConverter'=> 'ImageMagick', 'SVGConverterPath'=> '', 'SVGMaxSize'=> 5120, 'SVGMetadataCutoff'=> 5242880, 'SVGNativeRendering'=> false, '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, 250, 300,], '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, 'DjvuUseBoxedCommand'=> false, 'DjvuDump'=> null, 'DjvuRenderer'=> null, 'DjvuTxt'=> null, 'DjvuPostProcessor'=> 'pnmtojpeg', 'DjvuOutputExtension'=> 'jpg', 'EmergencyContact'=> false, 'PasswordSender'=> false, 'NoReplyAddress'=> false, 'EnableEmail'=> true, 'EnableUserEmail'=> true, 'EnableSpecialMute'=> false, 'EnableUserEmailMuteList'=> false, 'UserEmailUseReplyTo'=> true, 'PasswordReminderResendTime'=> 24, 'NewPasswordExpiry'=> 604800, 'UserEmailConfirmationTokenExpiry'=> 604800, 'UserEmailConfirmationUseHTML'=> false, 'PasswordExpirationDays'=> false, 'PasswordExpireGrace'=> 604800, 'SMTP'=> false, 'AdditionalMailParams'=> null, 'AllowHTMLEmail'=> false, 'EnotifFromEditor'=> false, 'EmailAuthentication'=> true, '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'=> '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,],], 'parsoid-pcache'=>['default'=>['minCpuTime'=> 0,],], 'postproc-pcache'=>['default'=>['minCpuTime'=> 9223372036854775807,],], 'postproc-parsoid-pcache'=>['default'=>['minCpuTime'=> 9223372036854775807,],],], 'ChronologyProtectorSecret'=> '', 'ParserCacheExpireTime'=> 86400, 'ParserCacheAsyncExpireTime'=> 60, 'ParserCacheAsyncRefreshJobs'=> true, 'OldRevisionParserCacheExpireTime'=> 3600, 'ObjectCacheSessionExpiry'=> 3600, 'PHPSessionHandling'=> 'warn', 'SuspiciousIpExpiry'=> false, 'SessionPbkdf2Iterations'=> 10001, 'UseSessionCookieJwt'=> false, 'MemCachedServers'=>['127.0.0.1:11211',], 'MemCachedPersistent'=> false, 'MemCachedTimeout'=> 500000, 'UseLocalMessageCache'=> false, 'AdaptiveMessageCache'=> false, 'LocalisationCacheConf'=>['class'=> '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, 'BlockTargetMigrationStage' => 768, '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, ], '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' => [ ], '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, 'pagelang' => true, ], 'editprotected' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'editprotected' => true, ], 'editmycssjs' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'editmyusercss' => true, 'editmyuserjson' => true, 'editmyuserjs' => true, ], 'editmyoptions' => [ 'editmyoptions' => true, 'editmyuserjson' => true, ], 'editinterface' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'editinterface' => true, 'edituserjson' => true, 'editsitejson' => true, ], 'editsiteconfig' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => 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, '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, '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, '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, '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, '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' => [ ], 'RCEngines' => [ 'redis' => 'MediaWiki\\RCFeed\\RedisPubSubFeedEngine', 'udp' => 'MediaWiki\\RCFeed\\UDPRCFeedEngine', ], '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, '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, 'UsePostprocCache' => false, ], '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', ], 'UserEmailConfirmationUseHTML' => 'boolean', 'SMTP' => [ 'boolean', 'object', ], 'EnotifFromEditor' => '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', 'BlockTargetMigrationStage' => 'integer', 'GroupPermissions' => 'object', 'PrivilegedGroups' => 'array', 'RevokePermissions' => 'object', 'GroupInheritsPermissions' => 'object', 'ImplicitGroups' => 'array', 'GroupsAddToSelf' => 'object', 'GroupsRemoveFromSelf' => 'object', 'RestrictedGroups' => 'object', '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', ], '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', 'RCEngines' => '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', ], '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', 'UsePostprocCache' => 'boolean', ], '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', ], 'msg' => [ 'type' => 'string', 'description' => 'a message key', ], ], 'required' => [ 'url', ], ], ], '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.', ],]
An interface to support process-local caching of handler data associated with a given file.
Interface for objects which can provide a MediaWiki context on request.
Represents the target of a wiki link.
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.
array $params
The job parameters.
if(count( $args)< 1) $job