MediaWiki master
ApiBase.php
Go to the documentation of this file.
1<?php
8
9namespace MediaWiki\Api;
10
11use InvalidArgumentException;
12use LogicException;
32use ReflectionClass;
33use StatusValue;
34use stdClass;
35use Throwable;
36use Wikimedia\Message\MessageSpecifier;
37use Wikimedia\ParamValidator\ParamValidator;
38use Wikimedia\ParamValidator\TypeDef\EnumDef;
39use Wikimedia\ParamValidator\TypeDef\IntegerDef;
40use Wikimedia\ParamValidator\TypeDef\StringDef;
41use Wikimedia\Rdbms\IReadableDatabase;
42use Wikimedia\Timestamp\TimestampException;
43
59abstract class ApiBase extends ContextSource {
60
62 private $hookContainer;
63
65 private $hookRunner;
66
71
75 public const PARAM_DFLT = ParamValidator::PARAM_DEFAULT;
79 public const PARAM_ISMULTI = ParamValidator::PARAM_ISMULTI;
83 public const PARAM_TYPE = ParamValidator::PARAM_TYPE;
87 public const PARAM_MAX = IntegerDef::PARAM_MAX;
91 public const PARAM_MAX2 = IntegerDef::PARAM_MAX2;
95 public const PARAM_MIN = IntegerDef::PARAM_MIN;
99 public const PARAM_ALLOW_DUPLICATES = ParamValidator::PARAM_ALLOW_DUPLICATES;
103 public const PARAM_DEPRECATED = ParamValidator::PARAM_DEPRECATED;
107 public const PARAM_REQUIRED = ParamValidator::PARAM_REQUIRED;
111 public const PARAM_SUBMODULE_MAP = SubmoduleDef::PARAM_SUBMODULE_MAP;
115 public const PARAM_SUBMODULE_PARAM_PREFIX = SubmoduleDef::PARAM_SUBMODULE_PARAM_PREFIX;
119 public const PARAM_ALL = ParamValidator::PARAM_ALL;
123 public const PARAM_EXTRA_NAMESPACES = NamespaceDef::PARAM_EXTRA_NAMESPACES;
127 public const PARAM_SENSITIVE = ParamValidator::PARAM_SENSITIVE;
131 public const PARAM_DEPRECATED_VALUES = EnumDef::PARAM_DEPRECATED_VALUES;
135 public const PARAM_ISMULTI_LIMIT1 = ParamValidator::PARAM_ISMULTI_LIMIT1;
139 public const PARAM_ISMULTI_LIMIT2 = ParamValidator::PARAM_ISMULTI_LIMIT2;
149
154 public const PARAM_RANGE_ENFORCE = 'api-param-range-enforce';
155
156 // region API-specific constants for ::getAllowedParams() arrays
158
165 public const PARAM_HELP_MSG = 'api-param-help-msg';
166
173 public const PARAM_HELP_MSG_APPEND = 'api-param-help-msg-append';
174
183 public const PARAM_HELP_MSG_INFO = 'api-param-help-msg-info';
184
190 public const PARAM_VALUE_LINKS = 'api-param-value-links';
191
205 public const PARAM_HELP_MSG_PER_VALUE = 'api-param-help-msg-per-value';
206
223 public const PARAM_TEMPLATE_VARS = 'param-template-vars';
224
225 // endregion -- end of API-specific constants for ::getAllowedParams() arrays
226
227 public const ALL_DEFAULT_STRING = '*';
228
230 public const LIMIT_BIG1 = 500;
232 public const LIMIT_BIG2 = 5000;
234 public const LIMIT_SML1 = 50;
236 public const LIMIT_SML2 = 500;
237
243 public const GET_VALUES_FOR_HELP = 1;
244
246 private static $extensionInfo = null;
247
249 private static $filterIDsCache = [];
250
252 private const MESSAGE_CODE_MAP = [
253 'actionthrottled' => [ 'apierror-ratelimited', 'ratelimited' ],
254 'actionthrottledtext' => [ 'apierror-ratelimited', 'ratelimited' ],
255 ];
256
258 private $mMainModule;
259
260 // Adding inline type hints for these two fields is non-trivial because
261 // of tests that create mocks for ApiBase subclasses and use
262 // disableOriginalConstructor(): in those cases the constructor here is never
263 // hit and thus these will be empty and any uses will raise a "Typed property
264 // must not be accessed before initialization" error.
266 private $mModuleName;
268 private $mModulePrefix;
269
271 private $mReplicaDB = null;
275 private $mParamCache = [];
277 private $mModuleSource = false;
278
285 public function __construct( ApiMain $mainModule, string $moduleName, string $modulePrefix = '' ) {
286 $this->mMainModule = $mainModule;
287 $this->mModuleName = $moduleName;
288 $this->mModulePrefix = $modulePrefix;
289
290 if ( !$this->isMain() ) {
291 $this->setContext( $mainModule->getContext() );
292 }
293 }
294
295 /***************************************************************************/
296 // region Methods to implement
298
315 abstract public function execute();
316
324 public function getModuleManager() {
325 return null;
326 }
327
340 public function getCustomPrinter() {
341 return null;
342 }
343
356 protected function getExamplesMessages() {
357 return [];
358 }
359
367 public function getHelpUrls() {
368 return [];
369 }
370
384 protected function getAllowedParams( /* $flags = 0 */ ) {
385 // $flags is not declared because it causes "Strict standards"
386 // warning. Most derived classes do not implement it.
387 return [];
388 }
389
396 public function shouldCheckMaxlag() {
397 return true;
398 }
399
406 public function isReadMode() {
407 return true;
408 }
409
435 public function isWriteMode() {
436 return false;
437 }
438
448 public function mustBePosted() {
449 return $this->needsToken() !== false;
450 }
451
462 public function isDeprecated() {
463 return $this->deprecationMsg() !== null;
464 }
465
474 public function deprecationMsg(): ?MessageSpecifier {
475 return null;
476 }
477
487 public function isInternal() {
488 return false;
489 }
490
510 public function needsToken() {
511 return false;
512 }
513
524 protected function getWebUITokenSalt( array $params ) {
525 return null;
526 }
527
541 public function getConditionalRequestData( $condition ) {
542 return null;
543 }
544
545 // endregion -- end of methods to implement
546
547 /***************************************************************************/
548 // region Data access methods
550
556 public function getModuleName() {
557 return $this->mModuleName;
558 }
559
565 public function getModulePrefix() {
566 return $this->mModulePrefix;
567 }
568
574 public function getMain() {
575 return $this->mMainModule;
576 }
577
584 public function isMain() {
585 return $this === $this->mMainModule;
586 }
587
595 public function getParent() {
596 return $this->isMain() ? null : $this->getMain();
597 }
598
606 private function dieIfMain( string $methodName ) {
607 if ( $this->isMain() ) {
608 self::dieDebug( $methodName, 'base method was called on main module.' );
609 }
610 }
611
622 public function lacksSameOriginSecurity() {
623 // The Main module has this method overridden, avoid infinite loops
624 $this->dieIfMain( __METHOD__ );
625
626 return $this->getMain()->lacksSameOriginSecurity();
627 }
628
635 public function getModulePath() {
636 if ( $this->isMain() ) {
637 return 'main';
638 }
639
640 if ( $this->getParent()->isMain() ) {
641 return $this->getModuleName();
642 }
643
644 return $this->getParent()->getModulePath() . '+' . $this->getModuleName();
645 }
646
655 public function getModuleFromPath( $path ) {
656 $module = $this->getMain();
657 if ( $path === 'main' ) {
658 return $module;
659 }
660
661 $parts = explode( '+', $path );
662 if ( count( $parts ) === 1 ) {
663 // In case the '+' was typed into URL, it resolves as a space
664 $parts = explode( ' ', $path );
665 }
666
667 foreach ( $parts as $i => $v ) {
668 $parent = $module;
669 $manager = $parent->getModuleManager();
670 if ( $manager === null ) {
671 $errorPath = implode( '+', array_slice( $parts, 0, $i ) );
672 $this->dieWithError( [ 'apierror-badmodule-nosubmodules', $errorPath ], 'badmodule' );
673 }
674 $module = $manager->getModule( $v );
675
676 if ( $module === null ) {
677 $errorPath = $i
678 ? implode( '+', array_slice( $parts, 0, $i ) )
679 : $parent->getModuleName();
680 $this->dieWithError(
681 [ 'apierror-badmodule-badsubmodule', $errorPath, wfEscapeWikiText( $v ) ],
682 'badmodule'
683 );
684 }
685 }
686
687 return $module;
688 }
689
695 public function getResult() {
696 // The Main module has this method overridden, avoid infinite loops
697 $this->dieIfMain( __METHOD__ );
698
699 return $this->getMain()->getResult();
700 }
701
706 public function getErrorFormatter() {
707 // The Main module has this method overridden, avoid infinite loops
708 $this->dieIfMain( __METHOD__ );
709
710 return $this->getMain()->getErrorFormatter();
711 }
712
719 protected function getDB() {
720 if ( !$this->mReplicaDB ) {
721 $this->mReplicaDB = MediaWikiServices::getInstance()
722 ->getConnectionProvider()
723 ->getReplicaDatabase();
724 }
725
726 return $this->mReplicaDB;
727 }
728
732 public function getContinuationManager() {
733 // The Main module has this method overridden, avoid infinite loops
734 $this->dieIfMain( __METHOD__ );
735
736 return $this->getMain()->getContinuationManager();
737 }
738
742 public function setContinuationManager( ?ApiContinuationManager $manager = null ) {
743 // The Main module has this method overridden, avoid infinite loops
744 $this->dieIfMain( __METHOD__ );
745
746 $this->getMain()->setContinuationManager( $manager );
747 }
748
757 }
758
764 protected function getHookContainer(): HookContainer {
765 $this->hookContainer ??= MediaWikiServices::getInstance()->getHookContainer();
766 return $this->hookContainer;
767 }
768
776 protected function getHookRunner(): ApiHookRunner {
777 $this->hookRunner ??= new ApiHookRunner( $this->getHookContainer() );
778 return $this->hookRunner;
779 }
780
781 // endregion -- end of data access methods
782
783 /***************************************************************************/
784 // region Parameter handling
786
797 return null;
798 }
799
808 public function encodeParamName( $paramName ) {
809 if ( is_array( $paramName ) ) {
810 return array_map( function ( $name ) {
811 return $this->mModulePrefix . $name;
812 }, $paramName );
813 }
814
815 return $this->mModulePrefix . $paramName;
816 }
817
830 public function extractRequestParams( $options = [] ) {
831 if ( is_bool( $options ) ) {
832 $options = [ 'parseLimit' => $options ];
833 }
834 $options += [
835 'parseLimit' => true,
836 'safeMode' => false,
837 ];
838
839 $parseLimit = (bool)$options['parseLimit'];
840 $cacheKey = (int)$parseLimit;
841
842 // Cache parameters, for performance and to avoid T26564.
843 if ( !isset( $this->mParamCache[$cacheKey] ) ) {
844 $params = $this->getFinalParams() ?: [];
845 $results = [];
846 $warned = [];
847
848 // Process all non-templates and save templates for secondary
849 // processing.
850 $toProcess = [];
851 foreach ( $params as $paramName => $paramSettings ) {
852 if ( isset( $paramSettings[self::PARAM_TEMPLATE_VARS] ) ) {
853 $toProcess[] = [ $paramName, $paramSettings[self::PARAM_TEMPLATE_VARS], $paramSettings ];
854 } else {
855 try {
856 $results[$paramName] = $this->getParameterFromSettings(
857 $paramName, $paramSettings, $parseLimit
858 );
859 } catch ( ApiUsageException $ex ) {
860 $results[$paramName] = $ex;
861 }
862 }
863 }
864
865 // Now process all the templates by successively replacing the
866 // placeholders with all client-supplied values.
867 // This bit duplicates JavaScript logic in
868 // ApiSandbox.PageLayout.prototype.updateTemplatedParams().
869 // If you update this, see if that needs updating too.
870 while ( $toProcess ) {
871 [ $name, $targets, $settings ] = array_shift( $toProcess );
872
873 foreach ( $targets as $placeholder => $target ) {
874 if ( !array_key_exists( $target, $results ) ) {
875 // The target wasn't processed yet, try the next one.
876 // If all hit this case, the parameter has no expansions.
877 continue;
878 }
879 if ( !is_array( $results[$target] ) || !$results[$target] ) {
880 // The target was processed but has no (valid) values.
881 // That means it has no expansions.
882 break;
883 }
884
885 // Expand this target in the name and all other targets,
886 // then requeue if there are more targets left or put in
887 // $results if all are done.
888 unset( $targets[$placeholder] );
889 $placeholder = '{' . $placeholder . '}';
890 // @phan-suppress-next-line PhanTypeNoAccessiblePropertiesForeach
891 foreach ( $results[$target] as $value ) {
892 if ( !preg_match( '/^[^{}]*$/', $value ) ) {
893 // Skip values that make invalid parameter names.
894 $encTargetName = $this->encodeParamName( $target );
895 if ( !isset( $warned[$encTargetName][$value] ) ) {
896 $warned[$encTargetName][$value] = true;
897 $this->addWarning( [
898 'apiwarn-ignoring-invalid-templated-value',
899 wfEscapeWikiText( $encTargetName ),
900 wfEscapeWikiText( $value ),
901 ] );
902 }
903 continue;
904 }
905
906 $newName = str_replace( $placeholder, $value, $name );
907 if ( !$targets ) {
908 try {
909 $results[$newName] = $this->getParameterFromSettings(
910 $newName,
911 $settings,
912 $parseLimit
913 );
914 } catch ( ApiUsageException $ex ) {
915 $results[$newName] = $ex;
916 }
917 } else {
918 $newTargets = [];
919 foreach ( $targets as $k => $v ) {
920 $newTargets[$k] = str_replace( $placeholder, $value, $v );
921 }
922 $toProcess[] = [ $newName, $newTargets, $settings ];
923 }
924 }
925 break;
926 }
927 }
928
929 $this->mParamCache[$cacheKey] = $results;
930 }
931
932 $ret = $this->mParamCache[$cacheKey];
933 if ( !$options['safeMode'] ) {
934 foreach ( $ret as $v ) {
935 if ( $v instanceof ApiUsageException ) {
936 throw $v;
937 }
938 }
939 }
940
941 return $this->mParamCache[$cacheKey];
942 }
943
951 protected function getParameter( $paramName, $parseLimit = true ) {
952 $ret = $this->extractRequestParams( [
953 'parseLimit' => $parseLimit,
954 'safeMode' => true,
955 ] )[$paramName];
956 if ( $ret instanceof ApiUsageException ) {
957 throw $ret;
958 }
959 return $ret;
960 }
961
968 public function requireOnlyOneParameter( $params, ...$required ) {
969 $intersection = array_intersect(
970 array_keys( array_filter( $params, $this->parameterNotEmpty( ... ) ) ),
971 $required
972 );
973
974 if ( count( $intersection ) > 1 ) {
975 $this->dieWithError( [
976 'apierror-invalidparammix',
977 Message::listParam( array_map(
978 function ( $p ) {
979 return '<var>' . $this->encodeParamName( $p ) . '</var>';
980 },
981 array_values( $intersection )
982 ) ),
983 count( $intersection ),
984 ] );
985 } elseif ( count( $intersection ) == 0 ) {
986 $this->dieWithError( [
987 'apierror-missingparam-one-of',
988 Message::listParam( array_map(
989 function ( $p ) {
990 return '<var>' . $this->encodeParamName( $p ) . '</var>';
991 },
992 $required
993 ) ),
994 count( $required ),
995 ], 'missingparam' );
996 }
997 }
998
1005 public function requireMaxOneParameter( $params, ...$required ) {
1006 $intersection = array_intersect(
1007 array_keys( array_filter( $params, $this->parameterNotEmpty( ... ) ) ),
1008 $required
1009 );
1010
1011 if ( count( $intersection ) > 1 ) {
1012 $this->dieWithError( [
1013 'apierror-invalidparammix',
1014 Message::listParam( array_map(
1015 function ( $p ) {
1016 return '<var>' . $this->encodeParamName( $p ) . '</var>';
1017 },
1018 array_values( $intersection )
1019 ) ),
1020 count( $intersection ),
1021 ] );
1022 }
1023 }
1024
1032 public function requireAtLeastOneParameter( $params, ...$required ) {
1033 $intersection = array_intersect(
1034 array_keys( array_filter( $params, $this->parameterNotEmpty( ... ) ) ),
1035 $required
1036 );
1037
1038 if ( count( $intersection ) == 0 ) {
1039 $this->dieWithError( [
1040 'apierror-missingparam-at-least-one-of',
1041 Message::listParam( array_map(
1042 function ( $p ) {
1043 return '<var>' . $this->encodeParamName( $p ) . '</var>';
1044 },
1045 $required
1046 ) ),
1047 count( $required ),
1048 ], 'missingparam' );
1049 }
1050 }
1051
1063 public function requireNoConflictingParameters( $params, $trigger, $conflicts ) {
1064 $triggerValue = $params[$trigger] ?? null;
1065 if ( $triggerValue === null || $triggerValue === false ) {
1066 return;
1067 }
1068 $intersection = array_intersect(
1069 array_keys( array_filter( $params, $this->parameterNotEmpty( ... ) ) ),
1070 (array)$conflicts
1071 );
1072 if ( count( $intersection ) ) {
1073 $this->dieWithError( [
1074 'apierror-invalidparammix-cannotusewith',
1075 Message::listParam( array_map(
1076 function ( $p ) {
1077 return '<var>' . $this->encodeParamName( $p ) . '</var>';
1078 },
1079 array_values( $intersection )
1080 ) ),
1081 $trigger,
1082 ] );
1083 }
1084 }
1085
1094 public function requirePostedParameters( $params, $prefix = 'prefix' ) {
1095 if ( !$this->mustBePosted() ) {
1096 // In order to allow client code to choose the correct method (GET or POST) depending *only*
1097 // on mustBePosted(), make sure that the module requires posting if any of its potential
1098 // parameters require posting.
1099
1100 // TODO: Uncomment this
1101 // throw new LogicException( 'mustBePosted() must be true when using requirePostedParameters()' );
1102
1103 // This seems to already be the case in all modules in practice, but deprecate it first just
1104 // in case.
1105 wfDeprecatedMsg( 'mustBePosted() must be true when using requirePostedParameters()',
1106 '1.42' );
1107 }
1108
1109 // Skip if $wgDebugAPI is set, or if we're in internal mode
1110 if ( $this->getConfig()->get( MainConfigNames::DebugAPI ) ||
1111 $this->getMain()->isInternalMode() ) {
1112 return;
1113 }
1114
1115 $queryValues = $this->getRequest()->getQueryValuesOnly();
1116 $badParams = [];
1117 foreach ( $params as $param ) {
1118 if ( $prefix !== 'noprefix' ) {
1119 $param = $this->encodeParamName( $param );
1120 }
1121 if ( array_key_exists( $param, $queryValues ) ) {
1122 $badParams[] = $param;
1123 }
1124 }
1125
1126 if ( $badParams ) {
1127 $this->dieWithError(
1128 [ 'apierror-mustpostparams', implode( ', ', $badParams ), count( $badParams ) ]
1129 );
1130 }
1131 }
1132
1139 private function parameterNotEmpty( $x ) {
1140 return $x !== null && $x !== false;
1141 }
1142
1154 public function getTitleOrPageId( $params, $load = false ) {
1155 $this->requireOnlyOneParameter( $params, 'title', 'pageid' );
1156
1157 $pageObj = null;
1158 if ( isset( $params['title'] ) ) {
1159 $titleObj = Title::newFromText( $params['title'] );
1160 if ( !$titleObj || $titleObj->isExternal() ) {
1161 $this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $params['title'] ) ] );
1162 }
1163 if ( !$titleObj->canExist() ) {
1164 $this->dieWithError( 'apierror-pagecannotexist' );
1165 }
1166 $pageObj = MediaWikiServices::getInstance()->getWikiPageFactory()->newFromTitle( $titleObj );
1167 if ( $load !== false ) {
1168 $pageObj->loadPageData( $load );
1169 }
1170 } elseif ( isset( $params['pageid'] ) ) {
1171 if ( $load === false ) {
1172 $load = 'fromdb';
1173 }
1174 $pageObj = MediaWikiServices::getInstance()->getWikiPageFactory()->newFromID( $params['pageid'], $load );
1175 if ( !$pageObj ) {
1176 $this->dieWithError( [ 'apierror-nosuchpageid', $params['pageid'] ] );
1177 }
1178 }
1179
1180 // @phan-suppress-next-line PhanTypeMismatchReturnNullable requireOnlyOneParameter guard it is always set
1181 return $pageObj;
1182 }
1183
1192 public function getTitleFromTitleOrPageId( $params ) {
1193 $this->requireOnlyOneParameter( $params, 'title', 'pageid' );
1194
1195 $titleObj = null;
1196 if ( isset( $params['title'] ) ) {
1197 $titleObj = Title::newFromText( $params['title'] );
1198 if ( !$titleObj || $titleObj->isExternal() ) {
1199 $this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $params['title'] ) ] );
1200 }
1201 return $titleObj;
1202 }
1203
1204 if ( isset( $params['pageid'] ) ) {
1205 $titleObj = Title::newFromID( $params['pageid'] );
1206 if ( !$titleObj ) {
1207 $this->dieWithError( [ 'apierror-nosuchpageid', $params['pageid'] ] );
1208 }
1209 }
1210
1211 // @phan-suppress-next-line PhanTypeMismatchReturnNullable requireOnlyOneParameter guard it is always set
1212 return $titleObj;
1213 }
1214
1224 protected function getParameterFromSettings( $name, $settings, $parseLimit ) {
1225 $validator = $this->getMain()->getParamValidator();
1226 $value = $validator->getValue( $this, $name, $settings, [
1227 'parse-limit' => $parseLimit,
1228 'raw' => ( $settings[ParamValidator::PARAM_TYPE] ?? '' ) === 'raw',
1229 ] );
1230
1231 // @todo Deprecate and remove this, if possible.
1232 if ( $parseLimit && isset( $settings[ParamValidator::PARAM_TYPE] ) &&
1233 $settings[ParamValidator::PARAM_TYPE] === 'limit' &&
1234 $this->getMain()->getVal( $this->encodeParamName( $name ) ) === 'max'
1235 ) {
1236 $this->getResult()->addParsedLimit( $this->getModuleName(), $value );
1237 }
1238
1239 return $value;
1240 }
1241
1252 public function handleParamNormalization( $paramName, $value, $rawValue ) {
1253 $this->addWarning( [ 'apiwarn-badutf8', $paramName ] );
1254 }
1255
1264 final public function validateToken( $token, array $params ) {
1265 $tokenType = $this->needsToken();
1267 if ( !isset( $salts[$tokenType] ) ) {
1268 throw new LogicException(
1269 "Module '{$this->getModuleName()}' tried to use token type '$tokenType' " .
1270 'without registering it'
1271 );
1272 }
1273
1274 $tokenObj = ApiQueryTokens::getToken(
1275 $this->getUser(), $this->getRequest()->getSession(), $salts[$tokenType]
1276 );
1277 if ( $tokenObj->match( $token ) ) {
1278 return true;
1279 }
1280
1281 $webUiSalt = $this->getWebUITokenSalt( $params );
1282
1283 return $webUiSalt !== null && $this->getUser()->matchEditToken(
1284 $token, $webUiSalt, $this->getRequest()
1285 );
1286 }
1287
1288 // endregion -- end of parameter handling
1289
1290 /***************************************************************************/
1291 // region Utility methods
1293
1300 public function getWatchlistUser( $params ) {
1301 if ( $params['owner'] !== null && $params['token'] !== null ) {
1302 $services = MediaWikiServices::getInstance();
1303 $user = $services->getUserFactory()->newFromName( $params['owner'], UserRigorOptions::RIGOR_NONE );
1304 if ( !$user || !$user->isRegistered() ) {
1305 $this->dieWithError(
1306 [ 'nosuchusershort', wfEscapeWikiText( $params['owner'] ) ], 'bad_wlowner'
1307 );
1308 }
1309 $token = $services->getUserOptionsLookup()->getOption( $user, 'watchlisttoken' );
1310 if ( $token == '' || !hash_equals( $token, $params['token'] ) ) {
1311 $this->dieWithError( 'apierror-bad-watchlist-token', 'bad_wltoken' );
1312 }
1313 } else {
1314 $user = $this->getUser();
1315 if ( !$user->isRegistered() ) {
1316 $this->dieWithError( 'watchlistanontext', 'notloggedin' );
1317 }
1318 $this->checkUserRightsAny( 'viewmywatchlist' );
1319 }
1320
1321 return $user;
1322 }
1323
1329 protected function useTransactionalTimeLimit() {
1330 if ( $this->getRequest()->wasPosted() ) {
1332 }
1333 }
1334
1340 public static function clearCacheForTest(): void {
1341 if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
1342 throw new LogicException( 'Not allowed outside tests' );
1343 }
1344 self::$filterIDsCache = [];
1345 }
1346
1356 protected function filterIDs( $fields, array $ids ) {
1357 $min = INF;
1358 $max = 0;
1359 foreach ( $fields as [ $table, $field ] ) {
1360 if ( isset( self::$filterIDsCache[$table][$field] ) ) {
1361 $row = self::$filterIDsCache[$table][$field];
1362 } else {
1363 $row = $this->getDB()->newSelectQueryBuilder()
1364 ->select( [ 'min_id' => "MIN($field)", 'max_id' => "MAX($field)" ] )
1365 ->from( $table )
1366 ->caller( __METHOD__ )->fetchRow();
1367 self::$filterIDsCache[$table][$field] = $row;
1368 }
1369 $min = min( $min, $row->min_id );
1370 $max = max( $max, $row->max_id );
1371 }
1372 return array_filter( $ids, static function ( $id ) use ( $min, $max ) {
1373 return ( ( is_int( $id ) && $id >= 0 ) || ctype_digit( (string)$id ) )
1374 && $id >= $min && $id <= $max;
1375 } );
1376 }
1377
1378 // endregion -- end of utility methods
1379
1380 /***************************************************************************/
1381 // region Warning and error reporting
1383
1399 public function addWarning( $msg, $code = null, $data = null ) {
1400 $this->getErrorFormatter()->addWarning( $this->getModulePath(), $msg, $code, $data );
1401 }
1402
1414 public function addDeprecation( $msg, $feature, $data = [] ) {
1415 $data = (array)$data;
1416 if ( $feature !== null ) {
1417 $data['feature'] = $feature;
1418 $this->logFeatureUsage( $feature );
1419 }
1420 $this->addWarning( $msg, 'deprecation', $data );
1421
1422 // No real need to deduplicate here, ApiErrorFormatter does that for
1423 // us (assuming the hook is deterministic).
1424 $msgs = [ $this->msg( 'api-usage-mailinglist-ref' ) ];
1425 $this->getHookRunner()->onApiDeprecationHelp( $msgs );
1426 if ( count( $msgs ) > 1 ) {
1427 $key = '$' . implode( ' $', range( 1, count( $msgs ) ) );
1428 $msg = ( new RawMessage( $key ) )->params( $msgs );
1429 } else {
1430 $msg = reset( $msgs );
1431 }
1432 $this->getMain()->addWarning( $msg, 'deprecation-help' );
1433 }
1434
1447 public function addError( $msg, $code = null, $data = null ) {
1448 $this->getErrorFormatter()->addError( $this->getModulePath(), $msg, $code, $data );
1449 }
1450
1460 public function addMessagesFromStatus(
1461 StatusValue $status, $types = [ 'warning', 'error' ], array $filter = []
1462 ) {
1463 $this->getErrorFormatter()->addMessagesFromStatus(
1464 $this->getModulePath(), $status, $types, $filter
1465 );
1466 }
1467
1482 public function dieWithError( $msg, $code = null, $data = null, $httpCode = 0 ): never {
1483 throw ApiUsageException::newWithMessage( $this, $msg, $code, $data, $httpCode );
1484 }
1485
1495 public function dieWithException( Throwable $exception, array $options = [] ): never {
1496 $this->dieWithError(
1497 $this->getErrorFormatter()->getMessageFromException( $exception, $options )
1498 );
1499 }
1500
1510 public function dieBlocked( Block $block ): never {
1511 $blockErrorFormatter = MediaWikiServices::getInstance()->getFormatterFactory()
1512 ->getBlockErrorFormatter( $this->getContext() );
1513
1514 $msg = $blockErrorFormatter->getMessage(
1515 $block,
1516 $this->getUser(),
1517 null,
1518 $this->getRequest()->getIP()
1519 );
1520
1521 $this->dieWithError( $msg );
1522 }
1523
1533 public function dieStatus( StatusValue $status ): never {
1534 if ( $status->isGood() ) {
1535 throw new InvalidArgumentException( 'Successful status passed to ApiBase::dieStatus' );
1536 }
1537
1538 foreach ( self::MESSAGE_CODE_MAP as $msg => [ $apiMsg, $code ] ) {
1539 if ( $status->hasMessage( $msg ) ) {
1540 $status->replaceMessage( $msg, ApiMessage::create( $apiMsg, $code ) );
1541 }
1542 }
1543
1544 if (
1545 $status instanceof PermissionStatus
1546 && $status->isRateLimitExceeded()
1547 && !$status->hasMessage( 'apierror-ratelimited' )
1548 ) {
1549 $status->fatal( ApiMessage::create( 'apierror-ratelimited', 'ratelimited' ) );
1550 }
1551
1552 // ApiUsageException needs a fatal status, but this method has
1553 // historically accepted any non-good status. Convert it if necessary.
1554 $status->setOK( false );
1555 if ( !$status->getMessages( 'error' ) ) {
1556 $newStatus = Status::newGood();
1557 foreach ( $status->getMessages( 'warning' ) as $err ) {
1558 $newStatus->fatal( $err );
1559 }
1560 if ( !$newStatus->getMessages( 'error' ) ) {
1561 $newStatus->fatal( 'unknownerror-nocode' );
1562 }
1563 $status = $newStatus;
1564 }
1565
1566 throw new ApiUsageException( $this, $status );
1567 }
1568
1575 public function dieReadOnly(): never {
1576 $this->dieWithError(
1577 'apierror-readonly',
1578 'readonly',
1579 [ 'readonlyreason' => MediaWikiServices::getInstance()->getReadOnlyMode()->getReason() ]
1580 );
1581 }
1582
1591 public function checkUserRightsAny( $rights ) {
1592 $rights = (array)$rights;
1593 if ( !$this->getAuthority()->isAllowedAny( ...$rights ) ) {
1594 $this->dieWithError( [ 'apierror-permissiondenied', $this->msg( "action-{$rights[0]}" ) ] );
1595 }
1596 }
1597
1615 PageIdentity $pageIdentity,
1616 $actions,
1617 array $options = []
1618 ) {
1619 $authority = $options['user'] ?? $this->getAuthority();
1620 $status = new PermissionStatus();
1621 foreach ( (array)$actions as $action ) {
1622 if ( $this->isWriteMode() ) {
1623 $authority->authorizeWrite( $action, $pageIdentity, $status );
1624 } else {
1625 $authority->authorizeRead( $action, $pageIdentity, $status );
1626 }
1627 }
1628 if ( !$status->isGood() ) {
1629 if ( !empty( $options['autoblock'] ) ) {
1630 $this->getUser()->spreadAnyEditBlock();
1631 }
1632 $this->dieStatus( $status );
1633 }
1634 }
1635
1649 public function dieWithErrorOrDebug( $msg, $code = null, $data = null, $httpCode = null ) {
1650 if ( $this->getConfig()->get( MainConfigNames::DebugAPI ) !== true ) {
1651 $this->dieWithError( $msg, $code, $data, $httpCode ?? 0 );
1652 } else {
1653 $this->addWarning( $msg, $code, $data );
1654 }
1655 }
1656
1667 protected function parseContinueParamOrDie( string $continue, array $types ): array {
1668 $cont = explode( '|', $continue );
1669 $this->dieContinueUsageIf( count( $cont ) != count( $types ) );
1670
1671 foreach ( $cont as $i => &$value ) {
1672 switch ( $types[$i] ) {
1673 case 'string':
1674 // Do nothing
1675 break;
1676 case 'int':
1677 $this->dieContinueUsageIf( $value !== (string)(int)$value );
1678 $value = (int)$value;
1679 break;
1680 case 'timestamp':
1681 try {
1682 $dbTs = $this->getDB()->timestamp( $value );
1683 } catch ( TimestampException ) {
1684 $dbTs = false;
1685 }
1686 $this->dieContinueUsageIf( $value !== $dbTs );
1687 break;
1688 default:
1689 throw new InvalidArgumentException( "Unknown type '{$types[$i]}'" );
1690 }
1691 }
1692
1693 return $cont;
1694 }
1695
1706 protected function dieContinueUsageIf( $condition ) {
1707 if ( $condition ) {
1708 $this->dieWithError( 'apierror-badcontinue' );
1709 }
1710 }
1711
1719 protected static function dieDebug( $method, $message ): never {
1720 throw new LogicException( "Internal error in $method: $message" );
1721 }
1722
1730 public function logFeatureUsage( $feature ) {
1731 static $loggedFeatures = [];
1732
1733 // Only log each feature once per request. We can get multiple calls from calls to
1734 // extractRequestParams() with different values for 'parseLimit', for example.
1735 if ( isset( $loggedFeatures[$feature] ) ) {
1736 return;
1737 }
1738 $loggedFeatures[$feature] = true;
1739
1740 $request = $this->getRequest();
1741 $ctx = [
1742 'feature' => $feature,
1743 // Replace spaces with underscores in 'username' for historical reasons.
1744 'username' => str_replace( ' ', '_', $this->getUser()->getName() ),
1745 'clientip' => $request->getIP(),
1746 'referer' => (string)$request->getHeader( 'Referer' ),
1747 'agent' => $this->getMain()->getUserAgent(),
1748 ];
1749
1750 // Text string is deprecated. Remove (or replace with just $feature) in MW 1.34.
1751 $s = '"' . addslashes( $ctx['feature'] ) . '"' .
1752 ' "' . wfUrlencode( $ctx['username'] ) . '"' .
1753 ' "' . $ctx['clientip'] . '"' .
1754 ' "' . addslashes( $ctx['referer'] ) . '"' .
1755 ' "' . addslashes( $ctx['agent'] ) . '"';
1756
1757 wfDebugLog( 'api-feature-usage', $s, 'private', $ctx );
1758
1759 $this->getHookRunner()->onApiLogFeatureUsage(
1760 $feature,
1761 [
1762 'userName' => $this->getUser()->getName(),
1763 'userAgent' => $this->getMain()->getUserAgent(),
1764 'ipAddress' => $request->getIP()
1765 ]
1766 );
1767 }
1768
1769 // endregion -- end of warning and error reporting
1770
1771 /***************************************************************************/
1772 // region Help message generation
1774
1785 protected function getSummaryMessage() {
1786 return "apihelp-{$this->getModulePath()}-summary";
1787 }
1788
1800 protected function getExtendedDescription() {
1801 return [ [
1802 "apihelp-{$this->getModulePath()}-extended-description",
1803 'api-help-no-extended-description',
1804 ] ];
1805 }
1806
1814 public function getFinalSummary() {
1815 return $this->msg(
1817 $this->getModulePrefix(),
1818 $this->getModuleName(),
1819 $this->getModulePath(),
1820 );
1821 }
1822
1830 public function getFinalDescription() {
1831 $summary = $this->msg(
1833 $this->getModulePrefix(),
1834 $this->getModuleName(),
1835 $this->getModulePath(),
1836 );
1837 $extendedDesc = $this->getExtendedDescription();
1838 if ( is_array( $extendedDesc ) && is_array( $extendedDesc[0] ) ) {
1839 // The definition in getExtendedDescription() may also specify fallback keys. This is weird,
1840 // and it was never needed for other API doc messages, so it's only supported here.
1841 $extendedDesc = Message::newFallbackSequence( $extendedDesc[0] )
1842 ->params( array_slice( $extendedDesc, 1 ) );
1843 }
1844 $extendedDesc = $this->msg(
1845 Message::newFromSpecifier( $extendedDesc ),
1846 $this->getModulePrefix(),
1847 $this->getModuleName(),
1848 $this->getModulePath(),
1849 );
1850
1851 $msgs = [ $summary, $extendedDesc ];
1852
1853 $this->getHookRunner()->onAPIGetDescriptionMessages( $this, $msgs );
1854
1855 return $msgs;
1856 }
1857
1866 public function getFinalParams( $flags = 0 ) {
1867 // @phan-suppress-next-line PhanParamTooMany
1868 $params = $this->getAllowedParams( $flags );
1869 if ( !$params ) {
1870 $params = [];
1871 }
1872
1873 if ( $this->needsToken() ) {
1874 $params['token'] = [
1875 ParamValidator::PARAM_TYPE => 'string',
1876 ParamValidator::PARAM_REQUIRED => true,
1877 ParamValidator::PARAM_SENSITIVE => true,
1878 self::PARAM_HELP_MSG => [
1879 'api-help-param-token',
1880 $this->needsToken(),
1881 ],
1882 ] + ( $params['token'] ?? [] );
1883 }
1884
1885 $this->getHookRunner()->onAPIGetAllowedParams( $this, $params, $flags );
1886
1887 return $params;
1888 }
1889
1897 public function getFinalParamDescription() {
1898 $prefix = $this->getModulePrefix();
1899 $name = $this->getModuleName();
1900 $path = $this->getModulePath();
1901
1902 $params = $this->getFinalParams( self::GET_VALUES_FOR_HELP );
1903 $msgs = [];
1904 foreach ( $params as $param => $settings ) {
1905 if ( !is_array( $settings ) ) {
1906 $settings = [];
1907 }
1908
1909 $msg = isset( $settings[self::PARAM_HELP_MSG] )
1910 ? Message::newFromSpecifier( $settings[self::PARAM_HELP_MSG] )
1911 : Message::newFallbackSequence( [ "apihelp-$path-param-$param", 'api-help-param-no-description' ] );
1912 $msg = $this->msg( $msg, $prefix, $param, $name, $path );
1913 $msgs[$param] = [ $msg ];
1914
1915 if ( isset( $settings[ParamValidator::PARAM_TYPE] ) &&
1916 $settings[ParamValidator::PARAM_TYPE] === 'submodule'
1917 ) {
1918 if ( isset( $settings[SubmoduleDef::PARAM_SUBMODULE_MAP] ) ) {
1919 $map = $settings[SubmoduleDef::PARAM_SUBMODULE_MAP];
1920 } else {
1921 $prefix = $this->isMain() ? '' : ( $this->getModulePath() . '+' );
1922 $map = [];
1923 foreach ( $this->getModuleManager()->getNames( $param ) as $submoduleName ) {
1924 $map[$submoduleName] = $prefix . $submoduleName;
1925 }
1926 }
1927
1928 $submodules = [];
1929 $submoduleFlags = []; // for sorting: higher flags are sorted later
1930 $submoduleNames = []; // for sorting: lexicographical, ascending
1931 foreach ( $map as $v => $m ) {
1932 $isDeprecated = false;
1933 $isInternal = false;
1934 $summary = null;
1935 try {
1936 $submod = $this->getModuleFromPath( $m );
1937 if ( $submod ) {
1938 $summary = $submod->getFinalSummary();
1939 $isDeprecated = $submod->isDeprecated();
1940 $isInternal = $submod->isInternal();
1941 if ( $isDeprecated ) {
1942 // Provide a deprecation message if available
1943 $isDeprecated = $submod->deprecationMsg() ??
1944 $isDeprecated;
1945 }
1946 }
1947 } catch ( ApiUsageException ) {
1948 // Ignore
1949 }
1950 if ( $summary ) {
1951 $key = $summary->getKey();
1952 $params = $summary->getParams();
1953 } else {
1954 $key = 'api-help-undocumented-module';
1955 $params = [ $m ];
1956 }
1957 $m = new ApiHelpParamValueMessage(
1958 "[[Special:ApiHelp/$m|$v]]",
1959 $key,
1960 $params,
1961 $isDeprecated,
1962 $isInternal
1963 );
1964 $submodules[] = $m->setContext( $this->getContext() );
1965 $submoduleFlags[] = ( $isDeprecated ? 1 : 0 ) | ( $isInternal ? 2 : 0 );
1966 $submoduleNames[] = $v;
1967 }
1968 // sort $submodules by $submoduleFlags and $submoduleNames
1969 array_multisort( $submoduleFlags, $submoduleNames, $submodules );
1970 $msgs[$param] = array_merge( $msgs[$param], $submodules );
1971 } elseif ( isset( $settings[self::PARAM_HELP_MSG_PER_VALUE] ) ) {
1972 // ! keep these checks in sync with \MediaWiki\Api\Validator\ApiParamValidator::checkSettings
1973 if ( !is_array( $settings[self::PARAM_HELP_MSG_PER_VALUE] ) ) {
1974 self::dieDebug( __METHOD__,
1975 'ApiBase::PARAM_HELP_MSG_PER_VALUE is not valid' );
1976 }
1977 $isArrayOfStrings = is_array( $settings[ParamValidator::PARAM_TYPE] )
1978 || (
1979 $settings[ParamValidator::PARAM_TYPE] === 'string'
1980 && ( $settings[ParamValidator::PARAM_ISMULTI] ?? false )
1981 );
1982 if ( !$isArrayOfStrings ) {
1983 self::dieDebug( __METHOD__,
1984 'ApiBase::PARAM_HELP_MSG_PER_VALUE may only be used when ' .
1985 'ParamValidator::PARAM_TYPE is an array or it is \'string\' and ' .
1986 'ParamValidator::PARAM_ISMULTI is true' );
1987 }
1988
1989 $values = is_array( $settings[ParamValidator::PARAM_TYPE] ) ?
1990 $settings[ParamValidator::PARAM_TYPE] :
1991 array_keys( $settings[self::PARAM_HELP_MSG_PER_VALUE] );
1992 $valueMsgs = $settings[self::PARAM_HELP_MSG_PER_VALUE];
1993 $deprecatedValues = $settings[EnumDef::PARAM_DEPRECATED_VALUES] ?? [];
1994 $internalValues = $settings[EnumDef::PARAM_INTERNAL_VALUES] ?? [];
1995
1996 foreach ( $values as $value ) {
1997 $msg = Message::newFromSpecifier( $valueMsgs[$value] ?? "apihelp-$path-paramvalue-$param-$value" );
1998 $m = $this->msg( $msg, [ $prefix, $param, $name, $path, $value ] );
1999 $deprecationMsg = $deprecatedValues[$value] ?? false;
2000 $deprecationMsg = (
2001 is_bool( $deprecationMsg ) || $deprecationMsg instanceof MessageSpecifier
2002 ) ? $deprecationMsg : ApiMessage::create( $deprecationMsg );
2003
2004 $m = new ApiHelpParamValueMessage(
2005 $value,
2006 // @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal
2007 [ $m->getKey(), 'api-help-param-no-description' ],
2008 $m->getParams(),
2009 deprecated: $deprecationMsg,
2010 internal: $internalValues[$value] ?? false,
2011 );
2012 $msgs[$param][] = $m->setContext( $this->getContext() );
2013 }
2014 }
2015
2016 if ( isset( $settings[self::PARAM_HELP_MSG_APPEND] ) ) {
2017 if ( !is_array( $settings[self::PARAM_HELP_MSG_APPEND] ) ) {
2018 self::dieDebug( __METHOD__,
2019 'Value for ApiBase::PARAM_HELP_MSG_APPEND is not an array' );
2020 }
2021 foreach ( $settings[self::PARAM_HELP_MSG_APPEND] as $m ) {
2022 $m = $this->msg( Message::newFromSpecifier( $m ), [ $prefix, $param, $name, $path ] );
2023 $msgs[$param][] = $m;
2024 }
2025 }
2026 }
2027
2028 $this->getHookRunner()->onAPIGetParamDescriptionMessages( $this, $msgs );
2029
2030 return $msgs;
2031 }
2032
2042 protected function getHelpFlags() {
2043 $flags = [];
2044
2045 if ( $this->isDeprecated() ) {
2046 $flags[] = 'deprecated';
2047 }
2048 if ( $this->isInternal() ) {
2049 $flags[] = 'internal';
2050 }
2051 if ( $this->isReadMode() ) {
2052 $flags[] = 'readrights';
2053 }
2054 if ( $this->isWriteMode() ) {
2055 $flags[] = 'writerights';
2056 }
2057 if ( $this->mustBePosted() ) {
2058 $flags[] = 'mustbeposted';
2059 }
2060
2061 return $flags;
2062 }
2063
2075 protected function getModuleSourceInfo() {
2076 if ( $this->mModuleSource !== false ) {
2077 return $this->mModuleSource;
2078 }
2079
2080 // First, try to find where the module comes from...
2081 $rClass = new ReflectionClass( $this );
2082 $path = $rClass->getFileName();
2083 if ( !$path ) {
2084 // No path known?
2085 $this->mModuleSource = null;
2086 return null;
2087 }
2088 $path = realpath( $path ) ?: $path;
2089
2090 // Build a map of extension directories to extension info
2091 if ( self::$extensionInfo === null ) {
2092 $extDir = $this->getConfig()->get( MainConfigNames::ExtensionDirectory );
2093 $baseDir = MW_INSTALL_PATH;
2094 self::$extensionInfo = [
2095 realpath( __DIR__ ) ?: __DIR__ => [
2096 'path' => $baseDir,
2097 'name' => 'MediaWiki',
2098 'license-name' => 'GPL-2.0-or-later',
2099 ],
2100 realpath( "$baseDir/extensions" ) ?: "$baseDir/extensions" => null,
2101 realpath( $extDir ) ?: $extDir => null,
2102 ];
2103 $keep = [
2104 'path' => null,
2105 'name' => null,
2106 'namemsg' => null,
2107 'license-name' => null,
2108 ];
2109 $credits = SpecialVersion::getCredits( ExtensionRegistry::getInstance(), $this->getConfig() );
2110 foreach ( $credits as $group ) {
2111 foreach ( $group as $ext ) {
2112 if ( !isset( $ext['path'] ) || !isset( $ext['name'] ) ) {
2113 // This shouldn't happen, but does anyway.
2114 continue;
2115 }
2116
2117 $extpath = $ext['path'];
2118 if ( !is_dir( $extpath ) ) {
2119 $extpath = dirname( $extpath );
2120 }
2121 self::$extensionInfo[realpath( $extpath ) ?: $extpath] =
2122 array_intersect_key( $ext, $keep );
2123 }
2124 }
2125 }
2126
2127 // Now traverse parent directories until we find a match or run out of parents.
2128 do {
2129 if ( array_key_exists( $path, self::$extensionInfo ) ) {
2130 // Found it!
2131 $this->mModuleSource = self::$extensionInfo[$path];
2132 return $this->mModuleSource;
2133 }
2134
2135 $oldpath = $path;
2136 $path = dirname( $path );
2137 } while ( $path !== $oldpath );
2138
2139 // No idea what extension this might be.
2140 $this->mModuleSource = null;
2141 return null;
2142 }
2143
2158 public function modifyHelp( array &$help, array $options, array &$tocData ) {
2159 wfDeprecated( __METHOD__, '1.47' );
2160 }
2161
2162 // endregion -- end of help message generation
2163
2164 /***************************************************************************/
2165 // region Data Unified metrics
2167
2173 protected function recordUnifiedMetrics( $detailLabels = [] ) {
2174 // The concept of "module" is different in Action API and REST API
2175 // in REST API, it represents the "collection" of endpoints
2176 // in Action API, it represents the "module" of the API (or an endpoint)
2177 // In order to make the metrics consistent, we want the module to also reflect
2178 // the "collection" of endpoints. The closest we can get is to use the namespace
2179 // of the API module, and get the area of the code or extension it belongs to.
2180 // If module exists, we'll take the namespace for it, otherwise fall back on
2181 // the current namespace. In both cases we'll remove the class name to only keep
2182 // the namespace.
2183 // Since this method can also be called from module classes (ApiQuery, etc)
2184 // we need to allow for accepting the submodule's class name, too, if it's given.
2185 $fullClass = get_class( $this );
2186 $moduleNamespace = substr( $fullClass, 0, strrpos( $fullClass, '\\' ) );
2187
2188 // Get the endpoint representation, which for the moment is the module name.
2189 $endpoint = $this->getModuleName();
2190
2191 // The "path" should give us useful and consistent information about the endpoint.
2192 // The ->getModulePath() method should give us a string wih the module parent and
2193 // its own name, which should be enough to identify the endpoint and work with
2194 // RegEx patterns to extract information from the path.
2195 $path = $this->getModulePath();
2196
2197 // Unified metrics
2198 $metricsLabels = array_merge( [
2199 // This should represent the "collection" of endpoints
2200 'api_module' => $moduleNamespace,
2201 // This is the endpoint that is being executed
2202 'api_endpoint' => $endpoint,
2203 'path' => $path,
2204 'method' => $this->getRequest()->getMethod(),
2205 'status' => "200", // Success
2206 ], $detailLabels );
2207
2208 $approvedLabels = [
2209 'api_module',
2210 'api_endpoint',
2211 'path',
2212 'method',
2213 'status',
2214 ];
2215
2216 // Hit metrics
2217 $metricHitStats = $this->getMain()->getStatsFactory()->getCounter( 'action_api_modules_hit_total' )
2218 ->setLabel( 'api_type', 'ACTION_API' );
2219 foreach ( $approvedLabels as $label ) {
2220 // Set a fallback value for empty strings
2221 $value = (
2222 array_key_exists( $label, $metricsLabels ) &&
2223 is_string( $metricsLabels[$label] ) &&
2224 trim( $metricsLabels[$label] ) !== ''
2225 ) ? $metricsLabels[$label] : 'EMPTY_VALUE';
2226 $metricHitStats->setLabel( $label, $value );
2227 }
2228 $metricHitStats->increment();
2229 }
2230
2231 // endregion -- end of Unified metrics methods
2232}
2233
2234/*
2235 * This file uses VisualStudio style region/endregion fold markers which are
2236 * recognised by PHPStorm. If modelines are enabled, the following editor
2237 * configuration will also enable folding in vim, if it is in the last 5 lines
2238 * of the file. We also use "@name" which creates sections in Doxygen.
2239 *
2240 * vim: foldmarker=//\ region,//\ endregion foldmethod=marker
2241 */
2242
2244class_alias( ApiBase::class, 'ApiBase' );
wfUrlencode( $s)
We want some things to be included as literal characters in our title URLs for prettiness,...
wfEscapeWikiText( $input)
Escapes the given text so that it may be output using addWikiText() without any linking,...
wfDeprecatedMsg( $msg, $version=false, $component=false, $callerOffset=2)
Log a deprecation warning with arbitrary message text.
wfTransactionalTimeLimit()
Raise the request time limit to $wgTransactionalTimeLimit.
wfDebugLog( $logGroup, $text, $dest='all', array $context=[])
Send a line to a supplementary debug log file, if configured, or main debug log if not.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
if(!defined('MW_SETUP_CALLBACK'))
Definition WebStart.php:72
This abstract class implements many basic API functions, and is the base of all API classes.
Definition ApiBase.php:59
const LIMIT_SML1
Slow query, standard limit.
Definition ApiBase.php:234
dieWithError( $msg, $code=null, $data=null, $httpCode=0)
Abort execution with an error.
Definition ApiBase.php:1482
checkUserRightsAny( $rights)
Helper function for permission-denied errors.
Definition ApiBase.php:1591
getHelpFlags()
Generates the list of flags for the help screen and for action=paraminfo.
Definition ApiBase.php:2042
requirePostedParameters( $params, $prefix='prefix')
Die if any of the specified parameters were found in the query part of the URL rather than the HTTP p...
Definition ApiBase.php:1094
static clearCacheForTest()
Reset static caches of database state.
Definition ApiBase.php:1340
getModulePrefix()
Get parameter prefix (usually two letters or an empty string).
Definition ApiBase.php:565
shouldCheckMaxlag()
Indicates if this module needs maxlag to be checked.
Definition ApiBase.php:396
getModuleName()
Get the name of the module being executed by this instance.
Definition ApiBase.php:556
getSummaryMessage()
Return the summary message.
Definition ApiBase.php:1785
getHookRunner()
Get an ApiHookRunner for running core API hooks.
Definition ApiBase.php:776
const PARAM_VALUE_LINKS
Deprecated and unused.
Definition ApiBase.php:190
const PARAM_HELP_MSG_INFO
(array) Specify additional information tags for the parameter.
Definition ApiBase.php:183
requireAtLeastOneParameter( $params,... $required)
Die if 0 of a certain set of parameters is set and not false.
Definition ApiBase.php:1032
getMain()
Get the main module.
Definition ApiBase.php:574
getModulePath()
Get the path to this module.
Definition ApiBase.php:635
getParameterFromSettings( $name, $settings, $parseLimit)
Using the settings, determine the value for the given parameter.
Definition ApiBase.php:1224
const ALL_DEFAULT_STRING
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
Definition ApiBase.php:227
requireNoConflictingParameters( $params, $trigger, $conflicts)
Die with an "invalid param mix" error if the parameters contain the trigger parameter and any of the ...
Definition ApiBase.php:1063
getWebUITokenSalt(array $params)
Fetch the salt used in the Web UI corresponding to this module.
Definition ApiBase.php:524
dieContinueUsageIf( $condition)
Die with the 'badcontinue' error.
Definition ApiBase.php:1706
useTransactionalTimeLimit()
Call wfTransactionalTimeLimit() if this request was POSTed.
Definition ApiBase.php:1329
parseContinueParamOrDie(string $continue, array $types)
Parse the 'continue' parameter in the usual format and validate the types of each part,...
Definition ApiBase.php:1667
getHelpUrls()
Return links to more detailed help pages about the module.
Definition ApiBase.php:367
getModuleManager()
Get the module manager, or null if this module has no submodules.
Definition ApiBase.php:324
addMessagesFromStatus(StatusValue $status, $types=[ 'warning', 'error'], array $filter=[])
Add warnings and/or errors from a Status.
Definition ApiBase.php:1460
getWatchlistUser( $params)
Gets the user for whom to get the watchlist.
Definition ApiBase.php:1300
getResult()
Get the result object.
Definition ApiBase.php:695
isReadMode()
Indicates whether this module requires read rights.
Definition ApiBase.php:406
const PARAM_HELP_MSG_PER_VALUE
((string|array|Message)[]) When PARAM_TYPE is an array, or 'string' with PARAM_ISMULTI,...
Definition ApiBase.php:205
getCustomPrinter()
If the module may only be used with a certain format module, it should override this method to return...
Definition ApiBase.php:340
logFeatureUsage( $feature)
Write logging information for API features to a debug log, for usage analysis.
Definition ApiBase.php:1730
getExtendedDescription()
Return the extended help text message.
Definition ApiBase.php:1800
isDeprecated()
Indicates whether this module is deprecated.
Definition ApiBase.php:462
requireMaxOneParameter( $params,... $required)
Dies if more than one parameter from a certain set of parameters are set and not false.
Definition ApiBase.php:1005
isInternal()
Indicates whether this module is considered to be "internal".
Definition ApiBase.php:487
addWarning( $msg, $code=null, $data=null)
Add a warning for this module.
Definition ApiBase.php:1399
const PARAM_RANGE_ENFORCE
(boolean) Inverse of IntegerDef\PARAM_IGNORE_RANGE
Definition ApiBase.php:154
getFinalDescription()
Get the final module description, after hooks have had a chance to tweak it as needed.
Definition ApiBase.php:1830
getParent()
Get the parent of this module.
Definition ApiBase.php:595
getDB()
Gets a default replica DB connection object.
Definition ApiBase.php:719
filterIDs( $fields, array $ids)
Filter out-of-range values from a list of positive integer IDs.
Definition ApiBase.php:1356
const LIMIT_SML2
Slow query, apihighlimits limit.
Definition ApiBase.php:236
__construct(ApiMain $mainModule, string $moduleName, string $modulePrefix='')
Definition ApiBase.php:285
const PARAM_HELP_MSG_APPEND
((string|array|Message)[]) Specify additional i18n messages to append to the normal message for this ...
Definition ApiBase.php:173
recordUnifiedMetrics( $detailLabels=[])
Record unified metrics for the API.
Definition ApiBase.php:2173
setContinuationManager(?ApiContinuationManager $manager=null)
Definition ApiBase.php:742
lacksSameOriginSecurity()
Returns true if the current request breaks the same-origin policy.
Definition ApiBase.php:622
const PARAM_ALLOW_DUPLICATES
Definition ApiBase.php:99
dieWithException(Throwable $exception, array $options=[])
Abort execution with an error derived from a throwable.
Definition ApiBase.php:1495
static dieDebug( $method, $message)
Internal code errors should be reported with this method.
Definition ApiBase.php:1719
dieBlocked(Block $block)
Throw an ApiUsageException, which will (if uncaught) call the main module's error handler and die wit...
Definition ApiBase.php:1510
const PARAM_SUBMODULE_PARAM_PREFIX
Definition ApiBase.php:115
getTitleFromTitleOrPageId( $params)
Get a Title object from a title or pageid param, if it is possible.
Definition ApiBase.php:1192
const PARAM_TEMPLATE_VARS
(array) Indicate that this is a templated parameter, and specify replacements.
Definition ApiBase.php:223
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
Definition ApiBase.php:165
addError( $msg, $code=null, $data=null)
Add an error for this module without aborting.
Definition ApiBase.php:1447
deprecationMsg()
Returns a MessageSpecifier describing the deprecation if this module is deprecated,...
Definition ApiBase.php:474
modifyHelp(array &$help, array $options, array &$tocData)
Called from ApiHelp before the pieces are joined together and returned.
Definition ApiBase.php:2158
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
const LIMIT_BIG2
Fast query, apihighlimits limit.
Definition ApiBase.php:232
encodeParamName( $paramName)
This method mangles parameter name based on the prefix supplied to the constructor.
Definition ApiBase.php:808
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
Definition ApiBase.php:384
getExamplesMessages()
Returns usage examples for this module.
Definition ApiBase.php:356
addDeprecation( $msg, $feature, $data=[])
Add a deprecation warning for this module.
Definition ApiBase.php:1414
dieStatus(StatusValue $status)
Throw an ApiUsageException based on the Status object.
Definition ApiBase.php:1533
handleParamNormalization( $paramName, $value, $rawValue)
Handle when a parameter was Unicode-normalized.
Definition ApiBase.php:1252
extractRequestParams( $options=[])
Using getAllowedParams(), this function makes an array of the values provided by the user,...
Definition ApiBase.php:830
getPermissionManager()
Obtain a PermissionManager instance that subclasses may use in their authorization checks.
Definition ApiBase.php:755
getConditionalRequestData( $condition)
Returns data for HTTP conditional request mechanisms.
Definition ApiBase.php:541
getFinalParamDescription()
Get final parameter descriptions, after hooks have had a chance to tweak it as needed.
Definition ApiBase.php:1897
getFinalParams( $flags=0)
Get the final list of parameters, after hooks have had a chance to tweak it as needed.
Definition ApiBase.php:1866
dieWithErrorOrDebug( $msg, $code=null, $data=null, $httpCode=null)
Will only set a warning instead of failing if the global $wgDebugAPI is set to true.
Definition ApiBase.php:1649
getFinalSummary()
Get the final module summary.
Definition ApiBase.php:1814
const PARAM_DEPRECATED_VALUES
Definition ApiBase.php:131
dieReadOnly()
Helper function for readonly errors.
Definition ApiBase.php:1575
checkTitleUserPermissions(PageIdentity $pageIdentity, $actions, array $options=[])
Helper function for permission-denied errors.
Definition ApiBase.php:1614
needsToken()
Returns the token type this module requires in order to execute.
Definition ApiBase.php:510
dynamicParameterDocumentation()
Indicate if the module supports dynamically-determined parameters that cannot be included in self\get...
Definition ApiBase.php:796
getModuleSourceInfo()
Returns information about the source of this module, if known.
Definition ApiBase.php:2075
isWriteMode()
Indicates whether this module requires write access to the wiki.
Definition ApiBase.php:435
mustBePosted()
Indicates whether this module must be called with a POST request.
Definition ApiBase.php:448
getTitleOrPageId( $params, $load=false)
Attempts to load a WikiPage object from a title or pageid parameter, if possible.
Definition ApiBase.php:1154
validateToken( $token, array $params)
Validate the supplied token.
Definition ApiBase.php:1264
isMain()
Returns true if this module is the main module ($this === $this->mMainModule), false otherwise.
Definition ApiBase.php:584
getModuleFromPath( $path)
Get a module from its module path.
Definition ApiBase.php:655
requireOnlyOneParameter( $params,... $required)
Die if 0 or more than one of a certain set of parameters is set and not false.
Definition ApiBase.php:968
getParameter( $paramName, $parseLimit=true)
Get a value for the given parameter.
Definition ApiBase.php:951
getHookContainer()
Get a HookContainer, for running extension hooks or for hook metadata.
Definition ApiBase.php:764
const GET_VALUES_FOR_HELP
getAllowedParams() flag: When this is set, the result could take longer to generate,...
Definition ApiBase.php:243
const LIMIT_BIG1
Fast query, standard limit.
Definition ApiBase.php:230
Message subclass that prepends wikitext for API help.
This class provides an implementation of the hook interfaces used by the core Action API,...
This is the main API class, used for both external and internal processing.
Definition ApiMain.php:66
static create( $msg, $code=null, ?array $data=null)
Create an IApiMessage for the message.
static getToken(User $user, \MediaWiki\Session\Session $session, $salt)
Get a token from a salt.
static getTokenTypeSalts()
Get the salts for known token types.
Exception used to abort API execution with an error.
Type definition for submodule types.
The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and ...
setContext(IContextSource $context)
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage().
getContext()
Get the base IContextSource object.
Variant of the Message class.
A class containing constants representing the names of configuration variables.
const ExtensionDirectory
Name constant for the ExtensionDirectory setting, for use with Config\get().
const DebugAPI
Name constant for the DebugAPI setting, for use with Config\get().
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.
The Message class deals with fetching and processing of interface message into a variety of formats.
Definition Message.php:144
static newFromSpecifier( $value)
Transform a MessageSpecifier or a primitive value used interchangeably with specifiers (a message key...
Definition Message.php:492
static listParam(array $list, $type=ListType::AND)
Definition Message.php:1355
static newFallbackSequence(... $keys)
Factory function accepting multiple message keys and returning a message instance for the first messa...
Definition Message.php:535
Base representation for an editable wiki page.
Definition WikiPage.php:82
Type definition for namespace types.
A service class for checking permissions To obtain an instance, use MediaWikiServices\getInstance()->...
A StatusValue for permission errors.
Load JSON files, and uses a Processor to extract information.
Version information about MediaWiki (core, extensions, libs), PHP, and the database.
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Definition Status.php:44
Represents a title within MediaWiki.
Definition Title.php:69
User class for the MediaWiki software.
Definition User.php:129
const PARAM_MAX_BYTES
(integer) Maximum length of a string in bytes.
Definition StringDef.php:39
const PARAM_MAX_CHARS
(integer) Maximum length of a string in characters (Unicode codepoints).
Definition StringDef.php:51
return[ 'config-schema-inverse'=>['default'=>['ConfigRegistry'=>['main'=> 'MediaWiki\\Config\\GlobalVarConfig::newInstance',], 'Sitename'=> 'MediaWiki', 'Server'=> false, 'CanonicalServer'=> false, 'ServerName'=> false, 'AssumeProxiesUseDefaultProtocolPorts'=> true, 'HttpsPort'=> 443, 'ForceHTTPS'=> false, 'ScriptPath'=> '/wiki', 'UsePathInfo'=> null, 'Script'=> false, 'LoadScript'=> false, 'RestPath'=> false, 'StylePath'=> false, 'LocalStylePath'=> false, 'ExtensionAssetsPath'=> false, 'ExtensionDirectory'=> null, 'StyleDirectory'=> null, 'ArticlePath'=> false, 'UploadPath'=> false, 'ImgAuthPath'=> false, 'ThumbPath'=> false, 'UploadDirectory'=> false, 'FileCacheDirectory'=> false, 'Logo'=> false, 'Logos'=> false, 'Favicon'=> '/favicon.ico', 'AppleTouchIcon'=> false, 'ReferrerPolicy'=> false, 'TmpDirectory'=> false, 'UploadBaseUrl'=> '', 'UploadStashScalerBaseUrl'=> false, 'ActionPaths'=>[], 'MainPageIsDomainRoot'=> false, 'EnableUploads'=> false, 'UploadStashMaxAge'=> 21600, 'EnableAsyncUploads'=> false, 'EnableAsyncUploadsByURL'=> false, 'EnableChunkedUploads'=> false, 'UploadMaintenance'=> false, 'IllegalFileChars'=> ':\\/\\\\', 'DeletedDirectory'=> false, 'ImgAuthDetails'=> false, 'ImgAuthUrlPathMap'=>[], 'LocalFileRepo'=>['class'=> 'MediaWiki\\FileRepo\\LocalRepo', 'name'=> 'local', 'directory'=> null, 'scriptDirUrl'=> null, 'favicon'=> null, 'url'=> null, 'hashLevels'=> null, 'thumbScriptUrl'=> null, 'transformVia404'=> null, 'deletedDir'=> null, 'deletedHashLevels'=> null, 'updateCompatibleMetadata'=> null, 'reserializeMetadata'=> null,], 'ForeignFileRepos'=>[], 'UseInstantCommons'=> false, 'UseSharedUploads'=> false, 'SharedUploadDirectory'=> null, 'SharedUploadPath'=> null, 'HashedSharedUploadDirectory'=> true, 'RepositoryBaseUrl'=> 'https:'FetchCommonsDescriptions'=> false, 'SharedUploadDBname'=> false, 'SharedUploadDBprefix'=> '', 'SharedUploadDBschema'=> null, 'CacheSharedUploads'=> true, 'ForeignUploadTargets'=>['local',], 'UploadDialog'=>['fields'=>['description'=> true, 'date'=> false, 'categories'=> false,], 'licensemessages'=>['local'=> 'generic-local', 'foreign'=> 'generic-foreign',], 'comment'=>['local'=> '', 'foreign'=> '',], 'format'=>['filepage'=> ' $DESCRIPTION', 'description'=> ' $TEXT', 'ownwork'=> '', 'license'=> '', 'uncategorized'=> '',],], 'FileBackends'=>[], 'LockManagers'=>[], 'DefaultLockManager'=> null, 'ShowEXIF'=> null, 'UpdateCompatibleMetadata'=> false, 'AllowCopyUploads'=> false, 'CopyUploadsDomains'=>[], 'CopyUploadsFromSpecialUpload'=> false, 'CopyUploadProxy'=> false, 'CopyUploadTimeout'=> false, 'CopyUploadAllowOnWikiDomainConfig'=> false, 'MaxUploadSize'=> 104857600, 'MinUploadChunkSize'=> 1024, 'UploadNavigationUrl'=> false, 'UploadMissingFileUrl'=> false, 'ThumbnailScriptPath'=> false, 'SharedThumbnailScriptPath'=> false, 'HashedUploadDirectory'=> true, 'CSPUploadEntryPoint'=> true, 'FileExtensions'=>['png', 'gif', 'jpg', 'jpeg', 'webp',], 'ProhibitedFileExtensions'=>['html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht', 'php', 'phtml', 'php3', 'php4', 'php5', 'phps', 'phar', 'shtml', 'jhtml', 'pl', 'py', 'cgi', 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl', 'xml',], 'MimeTypeExclusions'=>['text/html', 'application/javascript', 'text/javascript', 'text/x-javascript', 'application/x-shellscript', 'application/x-php', 'text/x-php', 'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh', 'text/scriptlet', 'application/x-msdownload', 'application/x-msmetafile', 'application/java', 'application/xml', 'text/xml',], 'CheckFileExtensions'=> true, 'StrictFileExtensions'=> true, 'DisableUploadScriptChecks'=> false, 'UploadSizeWarning'=> false, 'TrustedMediaFormats'=>['BITMAP', 'AUDIO', 'VIDEO', 'image/svg+xml', 'application/pdf',], 'MediaHandlers'=>[], 'NativeImageLazyLoading'=> true, 'ParserTestMediaHandlers'=>['image/jpeg'=> 'MockBitmapHandler', 'image/png'=> 'MockBitmapHandler', 'image/gif'=> 'MockBitmapHandler', 'image/tiff'=> 'MockBitmapHandler', 'image/webp'=> 'MockBitmapHandler', 'image/x-ms-bmp'=> 'MockBitmapHandler', 'image/x-bmp'=> 'MockBitmapHandler', 'image/x-xcf'=> 'MockBitmapHandler', 'image/svg+xml'=> 'MockSvgHandler', 'image/vnd.djvu'=> 'MockDjVuHandler',], 'UseImageResize'=> true, 'UseImageMagick'=> false, 'ImageMagickConvertCommand'=> '/usr/bin/convert', 'MaxInterlacingAreas'=>[], 'SharpenParameter'=> '0x0.4', 'SharpenReductionThreshold'=> 0.85, 'ImageMagickTempDir'=> false, 'CustomConvertCommand'=> false, 'JpegTran'=> '/usr/bin/jpegtran', 'JpegPixelFormat'=> 'yuv420', 'JpegQuality'=> 80, 'Exiv2Command'=> '/usr/bin/exiv2', 'Exiftool'=> '/usr/bin/exiftool', 'SVGConverters'=>['ImageMagick'=> ' $path/convert -background "#ffffff00" -thumbnail $widthx$height\\! $input PNG:$output', 'inkscape'=> ' $path/inkscape -w $width -o $output $input', 'batik'=> 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input', 'rsvg'=> ' $path/rsvg-convert -w $width -h $height -l $lang -o $output $input', 'ImagickExt'=>['SvgHandler::rasterizeImagickExt',],], 'SVGConverter'=> 'ImageMagick', 'SVGConverterPath'=> '', 'SVGMaxSize'=> 5120, 'SVGMetadataCutoff'=> 5242880, 'SVGNativeRendering'=> true, 'SVGNativeRenderingSizeLimit'=> 51200, 'MediaInTargetLanguage'=> true, 'MaxImageArea'=> 12500000, 'MaxAnimatedGifArea'=> 12500000, 'MaxAnimatedWebPArea'=> 12500000, 'TiffThumbnailType'=>[], 'ThumbnailEpoch'=> '20030516000000', 'AttemptFailureEpoch'=> 1, 'IgnoreImageErrors'=> false, 'GenerateThumbnailOnParse'=> true, 'ShowArchiveThumbnails'=> true, 'EnableAutoRotation'=> null, 'Antivirus'=> null, 'AntivirusSetup'=>['clamav'=>['command'=> 'clamscan --no-summary ', 'codemap'=>[0=> 0, 1=> 1, 52=> -1, ' *'=> false,], 'messagepattern'=> '/.*?:(.*)/sim',],], 'AntivirusRequired'=> true, 'VerifyMimeType'=> true, 'MimeTypeFile'=> 'internal', 'MimeInfoFile'=> 'internal', 'MimeDetectorCommand'=> null, 'TrivialMimeDetection'=> false, 'XMLMimeTypes'=>['http:'svg'=> 'image/svg+xml', 'http:'http:'html'=> 'text/html',], 'ImageLimits'=>[[320, 240,], [640, 480,], [800, 600,], [1024, 768,], [1280, 1024,], [2560, 2048,],], 'ThumbLimits'=>[120, 150, 180, 200, 220, 250, 300, 400,], 'ThumbnailNamespaces'=>[6,], 'ThumbnailSteps'=> null, 'ThumbnailBuckets'=> null, 'ThumbnailMinimumBucketDistance'=> 50, 'UploadThumbnailRenderMap'=>[], 'UploadThumbnailRenderMethod'=> 'jobqueue', 'UploadThumbnailRenderHttpCustomHost'=> false, 'UploadThumbnailRenderHttpCustomDomain'=> false, 'UseTinyRGBForJPGThumbnails'=> false, 'GalleryOptions'=>[], 'ThumbUpright'=> 0.75, 'DirectoryMode'=> 511, 'ResponsiveImages'=> true, 'ImagePreconnect'=> false, 'TrackMediaRequestProvenance'=> false, 'DjvuUseBoxedCommand'=> false, 'DjvuDump'=> null, 'DjvuRenderer'=> null, 'DjvuTxt'=> null, 'DjvuPostProcessor'=> 'pnmtojpeg', 'DjvuOutputExtension'=> 'jpg', 'EmergencyContact'=> false, 'PasswordSender'=> false, 'NoReplyAddress'=> false, 'EnableEmail'=> true, 'EnableUserEmail'=> true, 'UserEmailUseReplyTo'=> true, 'PasswordReminderResendTime'=> 24, 'NewPasswordExpiry'=> 604800, 'UserEmailConfirmationTokenExpiry'=> 604800, 'PasswordExpirationDays'=> false, 'PasswordExpireGrace'=> 604800, 'SMTP'=> false, 'AdditionalMailParams'=> null, 'AllowHTMLEmail'=> false, 'EnotifFromEditor'=> false, 'EmailAuthentication'=> true, 'EmailConfirmationBanner'=> false, 'EnotifWatchlist'=> false, 'EnotifUserTalk'=> false, 'EnotifRevealEditorAddress'=> false, 'EnotifMinorEdits'=> true, 'EnotifUseRealName'=> false, 'UsersNotifiedOnAllChanges'=>[], 'DBname'=> 'my_wiki', 'DBmwschema'=> null, 'DBprefix'=> '', 'DBserver'=> 'localhost', 'DBport'=> 5432, 'DBuser'=> 'wikiuser', 'DBpassword'=> '', 'DBtype'=> 'mysql', 'DBssl'=> false, 'DBcompress'=> false, 'DBStrictWarnings'=> false, 'DBadminuser'=> null, 'DBadminpassword'=> null, 'SearchType'=> null, 'SearchTypeAlternatives'=> null, 'DBTableOptions'=> 'ENGINE=InnoDB, DEFAULT CHARSET=binary', 'SQLMode'=> '', 'SQLiteDataDir'=> '', 'SharedDB'=> null, 'SharedPrefix'=> false, 'SharedTables'=>['user', 'user_properties', 'user_autocreate_serial',], 'SharedSchema'=> false, 'DBservers'=> false, 'LBFactoryConf'=>['class'=> 'Wikimedia\\Rdbms\\LBFactorySimple',], 'DataCenterUpdateStickTTL'=> 10, 'DBerrorLog'=> false, 'DBerrorLogTZ'=> false, 'LocalDatabases'=>[], 'DatabaseReplicaLagWarning'=> 10, 'DatabaseReplicaLagCritical'=> 30, 'MaxExecutionTimeForExpensiveQueries'=> 0, 'VirtualDomainsMapping'=>[], 'RemoteVirtualDomainsMapping'=>[], 'FileSchemaMigrationStage'=> 3, 'ExternalLinksDomainGaps'=>[], 'ContentHandlers'=>['wikitext'=>['class'=> 'MediaWiki\\Content\\WikitextContentHandler', 'services'=>['TitleFactory', 'ParserFactory', 'GlobalIdGenerator', 'LanguageNameUtils', 'LinkRenderer', 'MagicWordFactory', 'ParsoidParserFactory',],], 'javascript'=>['class'=> 'MediaWiki\\Content\\JavaScriptContentHandler', 'services'=>['MainConfig', 'ParserFactory', 'UserOptionsLookup', 'CodeHighlighter',],], 'json'=>['class'=> 'MediaWiki\\Content\\JsonContentHandler', 'services'=>['ParsoidParserFactory', 'TitleFactory',],], 'css'=>['class'=> 'MediaWiki\\Content\\CssContentHandler', 'services'=>['MainConfig', 'ParserFactory', 'UserOptionsLookup', 'CodeHighlighter',],], 'vue'=>['class'=> 'MediaWiki\\Content\\VueContentHandler', 'services'=>['MainConfig', 'ParserFactory', 'CodeHighlighter',],], 'text'=> 'MediaWiki\\Content\\TextContentHandler', 'unknown'=> 'MediaWiki\\Content\\FallbackContentHandler',], 'NamespaceContentModels'=>[], 'TextModelsToParse'=>['wikitext', 'javascript', 'css',], 'CompressRevisions'=> false, 'ExternalStores'=>[], 'ExternalServers'=>[], 'DefaultExternalStore'=> false, 'RevisionCacheExpiry'=> 604800, 'PageLanguageUseDB'=> false, 'DiffEngine'=> null, 'ExternalDiffEngine'=> false, 'Wikidiff2Options'=>[], 'RequestTimeLimit'=> null, 'TransactionalTimeLimit'=> 120, 'CriticalSectionTimeLimit'=> 180.0, 'MiserMode'=> false, 'DisableQueryPages'=> false, 'QueryCacheLimit'=> 1000, 'WantedPagesThreshold'=> 1, 'AllowSlowParserFunctions'=> false, 'AllowSchemaUpdates'=> true, 'MaxArticleSize'=> 2048, 'MemoryLimit'=> '50M', 'PoolCounterConf'=> null, 'PoolCountClientConf'=>['servers'=>['127.0.0.1',], 'timeout'=> 0.1,], 'MaxUserDBWriteDuration'=> false, 'MaxJobDBWriteDuration'=> false, 'LinkHolderBatchSize'=> 1000, 'MaximumMovedPages'=> 100, 'ForceDeferredUpdatesPreSend'=> false, 'MultiShardSiteStats'=> false, 'CacheDirectory'=> false, 'MainCacheType'=> 0, 'MessageCacheType'=> -1, 'ParserCacheType'=> -1, 'SessionCacheType'=> -1, 'AnonSessionCacheType'=> false, 'LanguageConverterCacheType'=> -1, 'ObjectCaches'=>[0=>['class'=> 'Wikimedia\\ObjectCache\\EmptyBagOStuff', 'reportDupes'=> false,], 1=>['class'=> 'MediaWiki\\ObjectCache\\SqlBagOStuff', 'loggroup'=> 'SQLBagOStuff',], 'memcached-php'=>['class'=> 'Wikimedia\\ObjectCache\\MemcachedPhpBagOStuff', 'loggroup'=> 'memcached',], 'memcached-pecl'=>['class'=> 'Wikimedia\\ObjectCache\\MemcachedPeclBagOStuff', 'loggroup'=> 'memcached',], 'hash'=>['class'=> 'Wikimedia\\ObjectCache\\HashBagOStuff', 'reportDupes'=> false,], 'apc'=>['class'=> 'Wikimedia\\ObjectCache\\APCUBagOStuff', 'reportDupes'=> false,], 'apcu'=>['class'=> 'Wikimedia\\ObjectCache\\APCUBagOStuff', 'reportDupes'=> false,],], 'WANObjectCache'=>[], 'MicroStashType'=> -1, 'MainStash'=> 1, 'ParsoidCacheConfig'=>['StashType'=> null, 'StashDuration'=> 86400,], 'ParsoidSelectiveUpdateSampleRate'=> 0, 'SplitParsoidParserCache'=> false, 'ParserCacheFilterConfig'=>['pcache'=>['default'=>['minCpuTime'=> 0,],], 'postproc-pcache'=>['default'=>['minCpuTime'=> 9223372036854775807,],], 'parsoid-pcache'=>['default'=>['minCpuTime'=> 0,],], 'postproc-parsoid-pcache'=>['default'=>['minCpuTime'=> 0,],],], 'ChronologyProtectorSecret'=> '', 'ParserCacheExpireTime'=> 86400, 'ParserCacheAsyncExpireTime'=> 60, 'ParserCacheAsyncRefreshJobs'=> true, 'OldRevisionParserCacheExpireTime'=> 3600, 'ObjectCacheSessionExpiry'=> 3600, 'SuspiciousIpExpiry'=> false, 'SessionPbkdf2Iterations'=> 10001, 'UseSessionCookieJwt'=> false, 'JwtSessionCookieIssuer'=> null, 'MemCachedServers'=>['127.0.0.1:11211',], 'MemCachedPersistent'=> false, 'MemCachedTimeout'=> 500000, 'UseLocalMessageCache'=> false, 'AdaptiveMessageCache'=> false, 'LocalisationCacheConf'=>['class'=> 'MediaWiki\\Language\\LocalisationCache', 'store'=> 'detect', 'storeClass'=> false, 'storeDirectory'=> false, 'storeServer'=>[], 'forceRecache'=> false, 'manualRecache'=> false,], 'CachePages'=> true, 'CacheEpoch'=> '20030516000000', 'GitInfoCacheDirectory'=> false, 'UseFileCache'=> false, 'FileCacheDepth'=> 2, 'RenderHashAppend'=> '', 'EnableSidebarCache'=> false, 'SidebarCacheExpiry'=> 86400, 'UseGzip'=> false, 'InvalidateCacheOnLocalSettingsChange'=> true, 'ExtensionInfoMTime'=> false, 'EnableRemoteBagOStuffTests'=> false, 'UseCdn'=> false, 'VaryOnXFP'=> false, 'InternalServer'=> false, 'CdnMaxAge'=> 18000, 'CdnMaxageLagged'=> 30, 'CdnMaxageStale'=> 10, 'CdnReboundPurgeDelay'=> 0, 'CdnMaxageSubstitute'=> 60, 'CdnServers'=>[], 'CdnServersNoPurge'=>[], 'HTCPRouting'=>[], 'HTCPMulticastTTL'=> 1, 'UsePrivateIPs'=> false, 'CdnMatchParameterOrder'=> true, 'LanguageCode'=> 'en', 'GrammarForms'=>[], 'InterwikiMagic'=> true, 'HideInterlanguageLinks'=> false, 'ExtraInterlanguageLinkPrefixes'=>[], 'InterlanguageLinkCodeMap'=>[], 'ExtraLanguageNames'=>[], 'ExtraLanguageCodes'=>['bh'=> 'bho', 'no'=> 'nb', 'simple'=> 'en',], 'DummyLanguageCodes'=>[], 'AllUnicodeFixes'=> false, 'LegacyEncoding'=> false, 'AmericanDates'=> false, 'TranslateNumerals'=> true, 'UseDatabaseMessages'=> true, 'MaxMsgCacheEntrySize'=> 10000, 'DisableLangConversion'=> false, 'DisableTitleConversion'=> false, 'DefaultLanguageVariant'=> false, 'UsePigLatinVariant'=> false, 'DisabledVariants'=>[], 'VariantArticlePath'=> false, 'UseXssLanguage'=> false, 'LoginLanguageSelector'=> false, 'ForceUIMsgAsContentMsg'=>[], 'RawHtmlMessages'=>[], 'Localtimezone'=> null, 'LocalTZoffset'=> null, 'OverrideUcfirstCharacters'=>[], 'MimeType'=> 'text/html', 'Html5Version'=> null, 'EditSubmitButtonLabelPublish'=> false, 'XhtmlNamespaces'=>[], 'SiteNotice'=> '', 'BrowserFormatDetection'=> 'telephone=no', 'SkinMetaTags'=>[], 'DefaultSkin'=> 'vector-2022', 'FallbackSkin'=> 'fallback', 'SkipSkins'=>[], 'DisableOutputCompression'=> false, 'FragmentMode'=>['html5', 'legacy',], 'ExternalInterwikiFragmentMode'=> 'legacy', 'FooterIcons'=>['copyright'=>['copyright'=>[],], 'poweredby'=>['mediawiki'=>['src'=> null, 'url'=> 'https:'alt'=> 'Powered by MediaWiki', 'lang'=> 'en',],],], 'EnableSectionShare'=> false, 'PageShareSkinsEnabled'=>[], 'UseCombinedLoginLink'=> false, 'Edititis'=> false, 'Send404Code'=> true, 'ShowRollbackEditCount'=> 10, 'EnableCanonicalServerLink'=> false, 'InterwikiLogoOverride'=>[], 'ResourceModules'=>[], 'ResourceModuleSkinStyles'=>[], 'ResourceLoaderSources'=>[], 'ResourceBasePath'=> null, 'ResourceLoaderMaxage'=>[], 'ResourceLoaderDebug'=> false, 'ResourceLoaderMaxQueryLength'=> false, 'ResourceLoaderValidateJS'=> true, 'ResourceLoaderEnableJSProfiler'=> false, 'ResourceLoaderStorageEnabled'=> true, 'ResourceLoaderStorageVersion'=> 1, 'ResourceLoaderEnableSourceMapLinks'=> true, 'AllowSiteCSSOnRestrictedPages'=> false, 'VueDevelopmentMode'=> false, 'CodexDevelopmentDir'=> null, 'MetaNamespace'=> false, 'MetaNamespaceTalk'=> false, 'CanonicalNamespaceNames'=>[-2=> 'Media', -1=> 'Special', 0=> '', 1=> 'Talk', 2=> 'User', 3=> 'User_talk', 4=> 'Project', 5=> 'Project_talk', 6=> 'File', 7=> 'File_talk', 8=> 'MediaWiki', 9=> 'MediaWiki_talk', 10=> 'Template', 11=> 'Template_talk', 12=> 'Help', 13=> 'Help_talk', 14=> 'Category', 15=> 'Category_talk',], 'ExtraNamespaces'=>[], 'ExtraGenderNamespaces'=>[], 'NamespaceAliases'=>[], 'LegalTitleChars'=> ' %!"$&\'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+', 'CapitalLinks' => true, 'CapitalLinkOverrides' => [ ], 'NamespacesWithSubpages' => [ 1 => true, 2 => true, 3 => true, 4 => true, 5 => true, 7 => true, 8 => true, 9 => true, 10 => true, 11 => true, 12 => true, 13 => true, 15 => true, ], 'NamespacesWithoutAutoSummaries' => [ ], 'ContentNamespaces' => [ 0, ], 'ShortPagesNamespaceExclusions' => [ ], 'ExtraSignatureNamespaces' => [ ], 'InvalidRedirectTargets' => [ 'Filepath', 'Mypage', 'Mytalk', 'Redirect', 'Mylog', ], 'DisableHardRedirects' => false, 'FixDoubleRedirects' => false, 'LocalInterwikis' => [ ], 'InterwikiExpiry' => 10800, 'InterwikiCache' => false, 'InterwikiScopes' => 3, 'InterwikiFallbackSite' => 'wiki', 'RedirectSources' => false, 'SiteTypes' => [ 'mediawiki' => 'MediaWiki\\Site\\MediaWikiSite', ], 'MaxTocLevel' => 999, 'MaxPPNodeCount' => 1000000, 'MaxTemplateDepth' => 100, 'MaxPPExpandDepth' => 100, 'UrlProtocols' => [ 'bitcoin:', 'ftp: 'ftps: 'geo:', 'git: 'gopher: 'http: 'https: 'irc: 'ircs: 'magnet:', 'mailto:', 'matrix:', 'mms: 'news:', 'nntp: 'redis: 'sftp: 'sip:', 'sips:', 'sms:', 'ssh: 'svn: 'tel:', 'telnet: 'urn:', 'wikipedia: 'worldwind: 'xmpp:', ' ], 'CleanSignatures' => true, 'AllowExternalImages' => false, 'AllowExternalImagesFrom' => '', 'EnableImageWhitelist' => false, 'TidyConfig' => [ ], 'ParsoidSettings' => [ 'useSelser' => true, ], 'ParsoidExperimentalParserFunctionOutput' => false, 'RawHtml' => false, 'ExternalLinkTarget' => false, 'NoFollowLinks' => true, 'NoFollowNsExceptions' => [ ], 'NoFollowDomainExceptions' => [ 'mediawiki.org', ], 'RegisterInternalExternals' => false, 'ExternalLinksIgnoreDomains' => [ ], 'AllowDisplayTitle' => true, 'RestrictDisplayTitle' => true, 'ExpensiveParserFunctionLimit' => 100, 'PreprocessorCacheThreshold' => 1000, 'EnableScaryTranscluding' => false, 'TranscludeCacheExpiry' => 3600, 'EnableMagicLinks' => [ 'ISBN' => false, 'PMID' => false, 'RFC' => false, ], 'ParserEnableUserLanguage' => false, 'ArticleCountMethod' => 'link', 'ActiveUserDays' => 30, 'LearnerEdits' => 10, 'LearnerMemberSince' => 4, 'ExperiencedUserEdits' => 500, 'ExperiencedUserMemberSince' => 30, 'ManualRevertSearchRadius' => 15, 'RevertedTagMaxDepth' => 15, 'CentralIdLookupProviders' => [ 'local' => [ 'class' => 'MediaWiki\\User\\CentralId\\LocalIdLookup', 'services' => [ 'MainConfig', 'DBLoadBalancerFactory', 'HideUserUtils', ], ], ], 'CentralIdLookupProvider' => 'local', 'UserRegistrationProviders' => [ 'local' => [ 'class' => 'MediaWiki\\User\\Registration\\LocalUserRegistrationProvider', 'services' => [ 'ConnectionProvider', ], ], ], 'PasswordPolicy' => [ 'policies' => [ 'bureaucrat' => [ 'MinimalPasswordLength' => 10, 'MinimumPasswordLengthToLogin' => 1, ], 'sysop' => [ 'MinimalPasswordLength' => 10, 'MinimumPasswordLengthToLogin' => 1, ], 'interface-admin' => [ 'MinimalPasswordLength' => 10, 'MinimumPasswordLengthToLogin' => 1, ], 'bot' => [ 'MinimalPasswordLength' => 10, 'MinimumPasswordLengthToLogin' => 1, ], 'default' => [ 'MinimalPasswordLength' => [ 'value' => 8, 'suggestChangeOnLogin' => true, ], 'PasswordCannotBeSubstringInUsername' => [ 'value' => true, 'suggestChangeOnLogin' => true, ], 'PasswordCannotMatchDefaults' => [ 'value' => true, 'suggestChangeOnLogin' => true, ], 'MaximalPasswordLength' => [ 'value' => 4096, 'suggestChangeOnLogin' => true, ], 'PasswordNotInCommonList' => [ 'value' => true, 'suggestChangeOnLogin' => true, ], ], ], 'checks' => [ 'MinimalPasswordLength' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkMinimalPasswordLength', ], 'MinimumPasswordLengthToLogin' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkMinimumPasswordLengthToLogin', ], 'PasswordCannotBeSubstringInUsername' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkPasswordCannotBeSubstringInUsername', ], 'PasswordCannotMatchDefaults' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkPasswordCannotMatchDefaults', ], 'MaximalPasswordLength' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkMaximalPasswordLength', ], 'PasswordNotInCommonList' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkPasswordNotInCommonList', ], ], ], 'AuthManagerConfig' => null, 'AuthManagerAutoConfig' => [ 'preauth' => [ 'MediaWiki\\Auth\\ThrottlePreAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\ThrottlePreAuthenticationProvider', 'sort' => 0, ], 'MediaWiki\\Auth\\PreviouslyRenamedAccountPreAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\PreviouslyRenamedAccountPreAuthenticationProvider', 'services' => [ 'ConnectionProvider', 'UserFactory', ], 'sort' => 0, ], ], 'primaryauth' => [ 'MediaWiki\\Auth\\TemporaryPasswordPrimaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\TemporaryPasswordPrimaryAuthenticationProvider', 'services' => [ 'DBLoadBalancerFactory', 'UserOptionsLookup', ], 'args' => [ [ 'authoritative' => false, ], ], 'sort' => 0, ], 'MediaWiki\\Auth\\LocalPasswordPrimaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\LocalPasswordPrimaryAuthenticationProvider', 'services' => [ 'DBLoadBalancerFactory', ], 'args' => [ [ 'authoritative' => true, ], ], 'sort' => 100, ], ], 'secondaryauth' => [ 'MediaWiki\\Auth\\CheckBlocksSecondaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\CheckBlocksSecondaryAuthenticationProvider', 'sort' => 0, ], 'MediaWiki\\Auth\\ResetPasswordSecondaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\ResetPasswordSecondaryAuthenticationProvider', 'sort' => 100, ], 'MediaWiki\\Auth\\EmailNotificationSecondaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\EmailNotificationSecondaryAuthenticationProvider', 'services' => [ 'DBLoadBalancerFactory', ], 'sort' => 200, ], ], ], 'RememberMe' => 'choose', 'ReauthenticateTime' => [ 'default' => 3600, ], 'ChangeCredentialsBlacklist' => [ 'MediaWiki\\Auth\\TemporaryPasswordAuthenticationRequest', ], 'RemoveCredentialsBlacklist' => [ 'MediaWiki\\Auth\\PasswordAuthenticationRequest', ], 'InvalidPasswordReset' => true, 'PasswordDefault' => 'pbkdf2', 'PasswordConfig' => [ 'A' => [ 'class' => 'MediaWiki\\Password\\MWOldPassword', ], 'B' => [ 'class' => 'MediaWiki\\Password\\MWSaltedPassword', ], 'pbkdf2-legacyA' => [ 'class' => 'MediaWiki\\Password\\LayeredParameterizedPassword', 'types' => [ 'A', 'pbkdf2', ], ], 'pbkdf2-legacyB' => [ 'class' => 'MediaWiki\\Password\\LayeredParameterizedPassword', 'types' => [ 'B', 'pbkdf2', ], ], 'bcrypt' => [ 'class' => 'MediaWiki\\Password\\BcryptPassword', 'cost' => 9, ], 'pbkdf2' => [ 'class' => 'MediaWiki\\Password\\Pbkdf2PasswordUsingOpenSSL', 'algo' => 'sha512', 'cost' => '30000', 'length' => '64', ], 'argon2' => [ 'class' => 'MediaWiki\\Password\\Argon2Password', 'algo' => 'auto', ], ], 'PasswordResetRoutes' => [ 'username' => true, 'email' => true, ], 'MaxSigChars' => 255, 'SignatureValidation' => 'warning', 'SignatureAllowedLintErrors' => [ 'obsolete-tag', ], 'MaxNameChars' => 255, 'ReservedUsernames' => [ 'MediaWiki default', 'Conversion script', 'Maintenance script', 'Template namespace initialisation script', 'ScriptImporter', 'Delete page script', 'Move page script', 'Command line script', 'Unknown user', 'msg:double-redirect-fixer', 'msg:usermessage-editor', 'msg:proxyblocker', 'msg:sorbs', 'msg:spambot_username', 'msg:autochange-username', ], 'DefaultUserOptions' => [ 'ccmeonemails' => 0, 'date' => 'default', 'diffonly' => 0, 'diff-type' => 'table', 'disablemail' => 0, 'editfont' => 'monospace', 'editondblclick' => 0, 'editrecovery' => 0, 'editsectiononrightclick' => 0, 'email-allow-new-users' => 1, 'enotifminoredits' => 0, 'enotifrevealaddr' => 0, 'enotifusertalkpages' => 1, 'enotifwatchlistpages' => 1, 'extendwatchlist' => 1, 'fancysig' => 0, 'forceeditsummary' => 0, 'forcesafemode' => 0, 'gender' => 'unknown', 'hidecategorization' => 1, 'hideminor' => 0, 'hidepatrolled' => 0, 'imagesize' => 2, 'minordefault' => 0, 'newpageshidepatrolled' => 0, 'nickname' => '', 'norollbackdiff' => 0, 'prefershttps' => 1, 'previewonfirst' => 0, 'previewontop' => 1, 'pst-cssjs' => 1, 'rcdays' => 7, 'rcenhancedfilters-disable' => 0, 'rclimit' => 50, 'requireemail' => 0, 'search-match-redirect' => true, 'search-special-page' => 'Search', 'search-thumbnail-extra-namespaces' => true, 'searchlimit' => 20, 'showhiddencats' => 0, 'shownumberswatching' => 1, 'showrollbackconfirmation' => 0, 'skin' => false, 'skin-responsive' => 1, 'thumbsize' => 5, 'underline' => 2, 'useeditwarning' => 1, 'uselivepreview' => 0, 'usenewrc' => 1, 'watchcreations' => 1, 'watchcreations-expiry' => 'infinite', 'watchdefault' => 1, 'watchdefault-expiry' => 'infinite', 'watchdeletion' => 0, 'watchlistdays' => 7, 'watchlisthideanons' => 0, 'watchlisthidebots' => 0, 'watchlisthidecategorization' => 1, 'watchlisthideliu' => 0, 'watchlisthideminor' => 0, 'watchlisthideown' => 0, 'watchlisthidepatrolled' => 0, 'watchlistreloadautomatically' => 0, 'watchlistunwatchlinks' => 0, 'watchmoves' => 0, 'watchrollback' => 0, 'watchuploads' => 1, 'watchrollback-expiry' => 'infinite', 'watchstar-expiry' => 'infinite', 'wlenhancedfilters-disable' => 0, 'wllimit' => 250, ], 'ConditionalUserOptions' => [ ], 'HiddenPrefs' => [ ], 'UserJsPrefLimit' => 100, 'InvalidUsernameCharacters' => '@:>=', 'UserrightsInterwikiDelimiter' => '@', 'SecureLogin' => false, 'AuthenticationTokenVersion' => null, 'SessionProviders' => [ 'MediaWiki\\Session\\CookieSessionProvider' => [ 'class' => 'MediaWiki\\Session\\CookieSessionProvider', 'args' => [ [ 'priority' => 30, ], ], 'services' => [ 'JwtCodec', 'UrlUtils', ], ], 'MediaWiki\\Session\\BotPasswordSessionProvider' => [ 'class' => 'MediaWiki\\Session\\BotPasswordSessionProvider', 'args' => [ [ 'priority' => 75, ], ], 'services' => [ 'GrantsInfo', ], ], ], 'AutoCreateTempUser' => [ 'known' => false, 'enabled' => false, 'actions' => [ 'edit', ], 'genPattern' => '~$1', 'matchPattern' => null, 'reservedPattern' => '~$1', 'serialProvider' => [ 'type' => 'local', 'useYear' => true, ], 'serialMapping' => [ 'type' => 'readable-numeric', ], 'expireAfterDays' => 90, 'notifyBeforeExpirationDays' => 10, ], 'AutoblockExemptions' => [ ], 'AutoblockExpiry' => 86400, 'BlockAllowsUTEdit' => true, 'BlockCIDRLimit' => [ 'IPv4' => 16, 'IPv6' => 19, ], 'BlockDisablesLogin' => false, 'EnableMultiBlocks' => false, 'WhitelistRead' => false, 'WhitelistReadRegexp' => false, 'EmailConfirmToEdit' => false, 'HideIdentifiableRedirects' => true, 'GroupPermissions' => [ '*' => [ 'createaccount' => true, 'autocreateaccount' => true, 'read' => true, 'edit' => true, 'createpage' => true, 'createtalk' => true, 'viewmyprivateinfo' => true, 'editmyprivateinfo' => true, 'editmyoptions' => true, ], 'user' => [ 'move' => true, 'move-subpages' => true, 'move-rootuserpages' => true, 'move-categorypages' => true, 'movefile' => true, 'read' => true, 'edit' => true, 'createpage' => true, 'createtalk' => true, 'upload' => true, 'reupload' => true, 'reupload-shared' => true, 'minoredit' => true, 'editmyusercss' => true, 'editmyuserjson' => true, 'editmyuserjs' => true, 'editmyuserjsredirect' => true, 'sendemail' => true, 'applychangetags' => true, 'changetags' => true, 'viewmywatchlist' => true, 'editmywatchlist' => true, 'createwithcontentmodel' => true, 'logout' => true, ], 'autoconfirmed' => [ 'autoconfirmed' => true, 'editsemiprotected' => true, ], 'bot' => [ 'bot' => true, 'autoconfirmed' => true, 'editsemiprotected' => true, 'nominornewtalk' => true, 'autopatrol' => true, 'suppressredirect' => true, 'apihighlimits' => true, ], 'sysop' => [ 'block' => true, 'createaccount' => true, 'createpreviouslyrenamedaccount' => true, 'delete' => true, 'bigdelete' => true, 'deletedhistory' => true, 'deletedtext' => true, 'undelete' => true, 'editcontentmodel' => true, 'editinterface' => true, 'editsitejson' => true, 'edituserjson' => true, 'import' => true, 'importupload' => true, 'move' => true, 'move-subpages' => true, 'move-rootuserpages' => true, 'move-categorypages' => true, 'patrol' => true, 'autopatrol' => true, 'protect' => true, 'editprotected' => true, 'rollback' => true, 'upload' => true, 'reupload' => true, 'reupload-shared' => true, 'unwatchedpages' => true, 'autoconfirmed' => true, 'editsemiprotected' => true, 'ipblock-exempt' => true, 'blockemail' => true, 'markbotedits' => true, 'apihighlimits' => true, 'browsearchive' => true, 'noratelimit' => true, 'movefile' => true, 'unblockself' => true, 'suppressredirect' => true, 'mergehistory' => true, 'managechangetags' => true, 'deletechangetags' => true, ], 'interface-admin' => [ 'editinterface' => true, 'editsitecss' => true, 'editsitejson' => true, 'editsitejs' => true, 'editusercss' => true, 'edituserjson' => true, 'edituserjs' => true, ], 'bureaucrat' => [ 'userrights' => true, 'noratelimit' => true, 'renameuser' => true, ], 'suppress' => [ 'hideuser' => true, 'suppressrevision' => true, 'viewsuppressed' => true, 'suppressionlog' => true, 'deleterevision' => true, 'deletelogentry' => true, ], ], 'PrivilegedGroups' => [ 'bureaucrat', 'interface-admin', 'suppress', 'sysop', ], 'RevokePermissions' => [ ], 'GroupInheritsPermissions' => [ ], 'ImplicitGroups' => [ '*', 'user', 'autoconfirmed', ], 'GroupsAddToSelf' => [ ], 'GroupsRemoveFromSelf' => [ ], 'RestrictedGroups' => [ ], 'UserRequirementsPrivateConditions' => [ ], 'RestrictionTypes' => [ 'create', 'edit', 'move', 'upload', ], 'RestrictionLevels' => [ '', 'autoconfirmed', 'sysop', ], 'CascadingRestrictionLevels' => [ 'sysop', ], 'SemiprotectedRestrictionLevels' => [ 'autoconfirmed', ], 'NamespaceProtection' => [ ], 'RestrictUserPageEditing' => false, 'NonincludableNamespaces' => [ ], 'AutoConfirmAge' => 0, 'AutoConfirmCount' => 0, 'Autopromote' => [ 'autoconfirmed' => [ '&', [ 1, null, ], [ 2, null, ], ], ], 'AutopromoteOnce' => [ 'onEdit' => [ ], ], 'AutopromoteOnceLogInRC' => true, 'AutopromoteOnceRCExcludedGroups' => [ ], 'AddGroups' => [ ], 'RemoveGroups' => [ ], 'AvailableRights' => [ ], 'ImplicitRights' => [ ], 'DeleteRevisionsLimit' => 0, 'DeleteRevisionsBatchSize' => 1000, 'HideUserContribLimit' => 1000, 'AccountCreationThrottle' => [ [ 'count' => 0, 'seconds' => 86400, ], ], 'TempAccountCreationThrottle' => [ [ 'count' => 1, 'seconds' => 600, ], [ 'count' => 6, 'seconds' => 86400, ], ], 'TempAccountNameAcquisitionThrottle' => [ [ 'count' => 60, 'seconds' => 86400, ], ], 'SpamRegex' => [ ], 'SummarySpamRegex' => [ ], 'EnableDnsBlacklist' => false, 'DnsBlacklistUrls' => [ ], 'ProxyList' => [ ], 'ProxyWhitelist' => [ ], 'SoftBlockRanges' => [ ], 'ApplyIpBlocksToXff' => false, 'RateLimits' => [ 'edit' => [ 'ip' => [ 8, 60, ], 'newbie' => [ 8, 60, ], 'user' => [ 90, 60, ], ], 'move' => [ 'newbie' => [ 2, 120, ], 'user' => [ 8, 60, ], ], 'upload' => [ 'ip' => [ 8, 60, ], 'newbie' => [ 8, 60, ], ], 'rollback' => [ 'user' => [ 10, 60, ], 'newbie' => [ 5, 120, ], ], 'mailpassword' => [ 'ip' => [ 5, 3600, ], ], 'sendemail' => [ 'ip' => [ 5, 86400, ], 'newbie' => [ 5, 86400, ], 'user' => [ 20, 86400, ], ], 'changeemail' => [ 'ip-all' => [ 10, 3600, ], 'user' => [ 4, 86400, ], ], 'confirmemail' => [ 'ip-all' => [ 10, 3600, ], 'user' => [ 4, 86400, ], ], 'purge' => [ 'ip' => [ 30, 60, ], 'user' => [ 30, 60, ], ], 'linkpurge' => [ 'ip' => [ 30, 60, ], 'user' => [ 30, 60, ], ], 'renderfile' => [ 'ip' => [ 700, 30, ], 'user' => [ 700, 30, ], ], 'renderfile-nonstandard' => [ 'ip' => [ 70, 30, ], 'user' => [ 70, 30, ], ], 'stashedit' => [ 'ip' => [ 30, 60, ], 'newbie' => [ 30, 60, ], ], 'stashbasehtml' => [ 'ip' => [ 5, 60, ], 'newbie' => [ 5, 60, ], ], 'changetags' => [ 'ip' => [ 8, 60, ], 'newbie' => [ 8, 60, ], ], 'editcontentmodel' => [ 'newbie' => [ 2, 120, ], 'user' => [ 8, 60, ], ], ], 'RateLimitsExcludedIPs' => [ ], 'PutIPinRC' => true, 'QueryPageDefaultLimit' => 50, 'ExternalQuerySources' => [ ], 'PasswordAttemptThrottle' => [ [ 'count' => 5, 'seconds' => 300, ], [ 'count' => 150, 'seconds' => 172800, ], ], 'GrantPermissions' => [ 'basic' => [ 'autocreateaccount' => true, 'autoconfirmed' => true, 'autopatrol' => true, 'editsemiprotected' => true, 'ipblock-exempt' => true, 'nominornewtalk' => true, 'patrolmarks' => true, 'read' => true, 'unwatchedpages' => true, ], 'highvolume' => [ 'bot' => true, 'apihighlimits' => true, 'noratelimit' => true, 'markbotedits' => true, ], 'import' => [ 'import' => true, 'importupload' => true, ], 'editpage' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'pagelang' => true, ], 'editprotected' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editprotected' => true, ], 'editmycssjs' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editmyusercss' => true, 'editmyuserjson' => true, 'editmyuserjs' => true, ], 'editmyoptions' => [ 'editmyoptions' => true, 'editmyuserjson' => true, ], 'editinterface' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editinterface' => true, 'edituserjson' => true, 'editsitejson' => true, ], 'editsiteconfig' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editinterface' => true, 'edituserjson' => true, 'editsitejson' => true, 'editusercss' => true, 'edituserjs' => true, 'editsitecss' => true, 'editsitejs' => true, ], 'createeditmovepage' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'createpage' => true, 'createtalk' => true, 'delete-redirect' => true, 'move' => true, 'move-rootuserpages' => true, 'move-subpages' => true, 'move-categorypages' => true, 'suppressredirect' => true, ], 'uploadfile' => [ 'upload' => true, 'reupload-own' => true, ], 'uploadeditmovefile' => [ 'upload' => true, 'reupload-own' => true, 'reupload' => true, 'reupload-shared' => true, 'upload_by_url' => true, 'movefile' => true, 'suppressredirect' => true, ], 'patrol' => [ 'patrol' => true, ], 'rollback' => [ 'rollback' => true, ], 'blockusers' => [ 'block' => true, 'blockemail' => true, ], 'viewdeleted' => [ 'browsearchive' => true, 'deletedhistory' => true, 'deletedtext' => true, ], 'viewrestrictedlogs' => [ 'suppressionlog' => true, ], 'delete' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'browsearchive' => true, 'deletedhistory' => true, 'deletedtext' => true, 'delete' => true, 'bigdelete' => true, 'deletelogentry' => true, 'deleterevision' => true, 'undelete' => true, ], 'oversight' => [ 'suppressrevision' => true, 'viewsuppressed' => true, ], 'protect' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editprotected' => true, 'protect' => true, ], 'viewmywatchlist' => [ 'viewmywatchlist' => true, ], 'editmywatchlist' => [ 'editmywatchlist' => true, ], 'sendemail' => [ 'sendemail' => true, ], 'createaccount' => [ 'createaccount' => true, ], 'privateinfo' => [ 'viewmyprivateinfo' => true, ], 'mergehistory' => [ 'mergehistory' => true, ], 'managesessions' => [ 'logout' => true, ], ], 'GrantPermissionGroups' => [ 'basic' => 'hidden', 'editpage' => 'page-interaction', 'createeditmovepage' => 'page-interaction', 'editprotected' => 'page-interaction', 'patrol' => 'page-interaction', 'uploadfile' => 'file-interaction', 'uploadeditmovefile' => 'file-interaction', 'sendemail' => 'email', 'viewmywatchlist' => 'watchlist-interaction', 'editmywatchlist' => 'watchlist-interaction', 'editmycssjs' => 'customization', 'editmyoptions' => 'customization', 'editinterface' => 'administration', 'editsiteconfig' => 'administration', 'rollback' => 'administration', 'blockusers' => 'administration', 'delete' => 'administration', 'viewdeleted' => 'administration', 'viewrestrictedlogs' => 'administration', 'protect' => 'administration', 'oversight' => 'administration', 'createaccount' => 'administration', 'mergehistory' => 'administration', 'import' => 'administration', 'highvolume' => 'high-volume', 'privateinfo' => 'private-information', 'managesessions' => 'private-information', ], 'GrantRiskGroups' => [ 'basic' => 'low', 'editpage' => 'low', 'createeditmovepage' => 'low', 'editprotected' => 'vandalism', 'patrol' => 'low', 'uploadfile' => 'low', 'uploadeditmovefile' => 'low', 'sendemail' => 'security', 'viewmywatchlist' => 'low', 'editmywatchlist' => 'low', 'editmycssjs' => 'security', 'editmyoptions' => 'security', 'editinterface' => 'vandalism', 'editsiteconfig' => 'security', 'rollback' => 'low', 'blockusers' => 'vandalism', 'delete' => 'vandalism', 'viewdeleted' => 'vandalism', 'viewrestrictedlogs' => 'security', 'protect' => 'vandalism', 'oversight' => 'security', 'createaccount' => 'low', 'mergehistory' => 'vandalism', 'import' => 'security', 'highvolume' => 'low', 'privateinfo' => 'low', 'managesessions' => 'low', ], 'EnableBotPasswords' => true, 'BotPasswordsCluster' => false, 'BotPasswordsDatabase' => false, 'BotPasswordsLimit' => 100, 'SecretKey' => false, 'JwtPrivateKey' => false, 'JwtPublicKey' => false, 'AllowUserJs' => false, 'ReauthenticateForActions' => [ 'edituserjs' => 'edituserjscss', 'editusercss' => 'edituserjscss', 'editsitejs' => 'editsitejscss', 'editsitecss' => 'editsitejscss', ], 'AllowUserCss' => false, 'AllowUserCssPrefs' => true, 'UseSiteJs' => true, 'UseSiteCss' => true, 'BreakFrames' => false, 'EditPageFrameOptions' => 'DENY', 'ApiFrameOptions' => 'DENY', 'CSPHeader' => false, 'CSPReportOnlyHeader' => false, 'CSPUseReportURIDirective' => false, 'CSPFalsePositiveUrls' => [ 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'chrome-extension' => true, ], 'AllowCrossOrigin' => false, 'RestAllowCrossOriginCookieAuth' => false, 'SessionSecret' => false, 'CookieExpiration' => 2592000, 'ExtendedLoginCookieExpiration' => 15552000, 'SessionCookieJwtExpiration' => 14400, 'CookieDomain' => '', 'CookiePath' => '/', 'CookieSecure' => 'detect', 'CookiePrefix' => false, 'CookieHttpOnly' => true, 'CookieSameSite' => null, 'CacheVaryCookies' => [ ], 'SessionName' => false, 'CookieSetOnAutoblock' => true, 'CookieSetOnIpBlock' => true, 'DeviceBoundSessions' => false, 'DeviceBoundSessionsReportOnly' => true, 'DeviceBoundSessionCookieName' => '__Host-dbsc', 'DeviceBoundSessionCredentialTTL' => 600, 'DeviceBoundSessionChallengeTTL' => 900, 'DeviceBoundSessionBindingTTL' => 2592000, 'DeviceBoundSessionScopeExcludes' => [ ], 'DebugLogFile' => '', 'DebugLogPrefix' => '', 'DebugRedirects' => false, 'DebugRawPage' => false, 'DebugComments' => false, 'DebugDumpSql' => false, 'TrxProfilerLimits' => [ 'GET' => [ 'masterConns' => 0, 'writes' => 0, 'readQueryTime' => 5, 'readQueryRows' => 10000, ], 'POST' => [ 'readQueryTime' => 5, 'writeQueryTime' => 1, 'readQueryRows' => 100000, 'maxAffected' => 1000, ], 'POST-nonwrite' => [ 'writes' => 0, 'readQueryTime' => 5, 'readQueryRows' => 10000, ], 'PostSend-GET' => [ 'readQueryTime' => 5, 'writeQueryTime' => 1, 'readQueryRows' => 10000, 'maxAffected' => 1000, 'masterConns' => 0, 'writes' => 0, ], 'PostSend-POST' => [ 'readQueryTime' => 5, 'writeQueryTime' => 1, 'readQueryRows' => 100000, 'maxAffected' => 1000, ], 'JobRunner' => [ 'readQueryTime' => 30, 'writeQueryTime' => 5, 'readQueryRows' => 100000, 'maxAffected' => 500, ], 'Maintenance' => [ 'writeQueryTime' => 5, 'maxAffected' => 1000, ], ], 'DebugLogGroups' => [ ], 'MWLoggerDefaultSpi' => [ 'class' => 'MediaWiki\\Logger\\LegacySpi', ], 'ShowDebug' => false, 'SpecialVersionShowHooks' => false, 'ShowExceptionDetails' => false, 'LogExceptionBacktrace' => true, 'PropagateErrors' => true, 'ShowHostnames' => false, 'OverrideHostname' => false, 'DevelopmentWarnings' => false, 'DeprecationReleaseLimit' => false, 'Profiler' => [ ], 'StatsTarget' => null, 'StatsFormat' => null, 'StatsPrefix' => 'mediawiki', 'OpenTelemetryConfig' => null, 'PageInfoTransclusionLimit' => 50, 'EnableJavaScriptTest' => false, 'DebugToolbar' => false, 'ApiClientErrorSampleRate' => 1.0, 'DisableTextSearch' => false, 'AdvancedSearchHighlighting' => false, 'SearchHighlightBoundaries' => '[\\p{Z}\\p{P}\\p{C}]', 'OpenSearchTemplates' => [ 'application/x-suggestions+json' => false, 'application/x-suggestions+xml' => false, ], 'OpenSearchDefaultLimit' => 10, 'OpenSearchDescriptionLength' => 100, 'SearchSuggestCacheExpiry' => 1200, 'DisableSearchUpdate' => false, 'NamespacesToBeSearchedDefault' => [ true, ], 'DisableInternalSearch' => false, 'SearchForwardUrl' => null, 'SitemapNamespaces' => false, 'SitemapNamespacesPriorities' => false, 'SitemapApiConfig' => [ ], 'SpecialSearchFormOptions' => [ ], 'SearchMatchRedirectPreference' => false, 'SearchRunSuggestedQuery' => true, 'Diff3' => '/usr/bin/diff3', 'Diff' => '/usr/bin/diff', 'PreviewOnOpenNamespaces' => [ 14 => true, ], 'UniversalEditButton' => true, 'UseAutomaticEditSummaries' => true, 'CommandLineDarkBg' => false, 'ReadOnly' => null, 'ReadOnlyWatchedItemStore' => false, 'ReadOnlyFile' => false, 'UpgradeKey' => false, 'GitBin' => '/usr/bin/git', 'GitRepositoryViewers' => [ 'https: 'ssh: 'https: 'git@github\\.com:(.*?)(\\.git)?' => 'https: ], 'InstallerInitialPages' => [ [ 'titlemsg' => 'mainpage', 'text' => '{{subst:int:mainpagetext}}{{subst:int:mainpagedocfooter}}', ], ], 'RCMaxAge' => 7776000, 'WatchersMaxAge' => 15552000, 'UnwatchedPageSecret' => 1, 'RCFilterByAge' => false, 'RCLinkLimits' => [ 50, 100, 250, 500, ], 'RCLinkDays' => [ 1, 3, 7, 14, 30, ], 'RCFeeds' => [ ], 'RCWatchCategoryMembership' => false, 'UseRCPatrol' => true, 'StructuredChangeFiltersLiveUpdatePollingRate' => 3, 'UseNPPatrol' => true, 'UseFilePatrol' => true, 'Feed' => true, 'FeedLimit' => 50, 'FeedCacheTimeout' => 60, 'FeedDiffCutoff' => 32768, 'OverrideSiteFeed' => [ ], 'FeedClasses' => [ 'rss' => 'MediaWiki\\Feed\\RSSFeed', 'atom' => 'MediaWiki\\Feed\\AtomFeed', ], 'AdvertisedFeedTypes' => [ 'atom', ], 'RCShowWatchingUsers' => false, 'RCShowChangedSize' => true, 'RCChangedSizeThreshold' => 500, 'ShowUpdatedMarker' => true, 'DisableAnonTalk' => false, 'UseTagFilter' => true, 'SoftwareTags' => [ 'mw-contentmodelchange' => true, 'mw-new-redirect' => true, 'mw-removed-redirect' => true, 'mw-changed-redirect-target' => true, 'mw-blank' => true, 'mw-replace' => true, 'mw-recreated' => true, 'mw-rollback' => true, 'mw-undo' => true, 'mw-manual-revert' => true, 'mw-reverted' => true, 'mw-server-side-upload' => true, 'mw-ipblock-appeal' => true, 'mw-edited-other-users-js' => true, 'mw-edited-other-users-css' => true, ], 'RestrictedTagViewRights' => [ ], 'UnwatchedPageThreshold' => false, 'RecentChangesFlags' => [ 'newpage' => [ 'letter' => 'newpageletter', 'title' => 'recentchanges-label-newpage', 'legend' => 'recentchanges-legend-newpage', 'grouping' => 'any', ], 'minor' => [ 'letter' => 'minoreditletter', 'title' => 'recentchanges-label-minor', 'legend' => 'recentchanges-legend-minor', 'class' => 'minoredit', 'grouping' => 'all', ], 'bot' => [ 'letter' => 'boteditletter', 'title' => 'recentchanges-label-bot', 'legend' => 'recentchanges-legend-bot', 'class' => 'botedit', 'grouping' => 'all', ], 'unpatrolled' => [ 'letter' => 'unpatrolledletter', 'title' => 'recentchanges-label-unpatrolled', 'legend' => 'recentchanges-legend-unpatrolled', 'grouping' => 'any', ], ], 'WatchlistExpiry' => false, 'EnableWatchstarPopover' => false, 'EnableWatchlistLabels' => false, 'WatchlistLabelsMaxPerUser' => 100, 'WatchlistPurgeRate' => 0.1, 'WatchlistExpiryMaxDuration' => '1 year', 'EnableChangesListQueryPartitioning' => false, 'RightsPage' => null, 'RightsUrl' => null, 'RightsText' => null, 'RightsIcon' => null, 'UseCopyrightUpload' => false, 'MaxCredits' => 0, 'ShowCreditsIfMax' => true, 'ImportSources' => [ ], 'ImportTargetNamespace' => null, 'ExportAllowHistory' => true, 'ExportMaxHistory' => 0, 'ExportAllowListContributors' => false, 'ExportMaxLinkDepth' => 0, 'ExportFromNamespaces' => false, 'ExportAllowAll' => false, 'ExportPagelistLimit' => 5000, 'XmlDumpSchemaVersion' => '0.11', 'WikiFarmSettingsDirectory' => null, 'WikiFarmSettingsExtension' => 'yaml', 'ExtensionFunctions' => [ ], 'ExtensionMessagesFiles' => [ ], 'MessagesDirs' => [ ], 'TranslationAliasesDirs' => [ ], 'ExtensionEntryPointListFiles' => [ ], 'EnableParserLimitReporting' => true, 'ValidSkinNames' => [ ], 'SpecialPages' => [ ], 'ExtensionCredits' => [ ], 'Hooks' => [ ], 'ServiceWiringFiles' => [ ], 'JobClasses' => [ 'deletePage' => 'MediaWiki\\Page\\DeletePageJob', 'refreshLinks' => 'MediaWiki\\JobQueue\\Jobs\\RefreshLinksJob', 'deleteLinks' => 'MediaWiki\\Page\\DeleteLinksJob', 'htmlCacheUpdate' => 'MediaWiki\\JobQueue\\Jobs\\HTMLCacheUpdateJob', 'sendMail' => [ 'class' => 'MediaWiki\\Mail\\EmaillingJob', 'services' => [ 'Emailer', ], ], 'enotifNotify' => [ 'class' => 'MediaWiki\\RecentChanges\\RecentChangeNotifyJob', 'services' => [ 'RecentChangeLookup', ], ], 'fixDoubleRedirect' => [ 'class' => 'MediaWiki\\JobQueue\\Jobs\\DoubleRedirectJob', 'services' => [ 'RevisionLookup', 'MagicWordFactory', 'WikiPageFactory', ], 'needsPage' => true, ], 'AssembleUploadChunks' => 'MediaWiki\\JobQueue\\Jobs\\AssembleUploadChunksJob', 'PublishStashedFile' => 'MediaWiki\\JobQueue\\Jobs\\PublishStashedFileJob', 'ThumbnailRender' => 'MediaWiki\\JobQueue\\Jobs\\ThumbnailRenderJob', 'UploadFromUrl' => 'MediaWiki\\JobQueue\\Jobs\\UploadFromUrlJob', 'recentChangesUpdate' => 'MediaWiki\\RecentChanges\\RecentChangesUpdateJob', 'refreshLinksPrioritized' => 'MediaWiki\\JobQueue\\Jobs\\RefreshLinksJob', 'refreshLinksDynamic' => 'MediaWiki\\JobQueue\\Jobs\\RefreshLinksJob', 'activityUpdateJob' => 'MediaWiki\\Watchlist\\ActivityUpdateJob', 'categoryMembershipChange' => [ 'class' => 'MediaWiki\\RecentChanges\\CategoryMembershipChangeJob', 'services' => [ 'RecentChangeFactory', ], ], 'CategoryCountUpdateJob' => [ 'class' => 'MediaWiki\\JobQueue\\Jobs\\CategoryCountUpdateJob', 'services' => [ 'ConnectionProvider', 'NamespaceInfo', ], ], 'clearUserWatchlist' => 'MediaWiki\\Watchlist\\ClearUserWatchlistJob', 'watchlistExpiry' => [ 'class' => 'MediaWiki\\Watchlist\\WatchlistExpiryJob', 'needsPage' => false, ], 'cdnPurge' => 'MediaWiki\\JobQueue\\Jobs\\CdnPurgeJob', 'userGroupExpiry' => 'MediaWiki\\User\\UserGroupExpiryJob', 'clearWatchlistNotifications' => 'MediaWiki\\Watchlist\\ClearWatchlistNotificationsJob', 'userOptionsUpdate' => 'MediaWiki\\User\\Options\\UserOptionsUpdateJob', 'revertedTagUpdate' => 'MediaWiki\\JobQueue\\Jobs\\RevertedTagUpdateJob', 'null' => 'MediaWiki\\JobQueue\\Jobs\\NullJob', 'userEditCountInit' => 'MediaWiki\\User\\UserEditCountInitJob', 'renameUserTable' => [ 'class' => 'MediaWiki\\RenameUser\\Job\\RenameUserTableJob', 'services' => [ 'MainConfig', 'DBLoadBalancerFactory', ], ], 'renameUserDerived' => [ 'class' => 'MediaWiki\\RenameUser\\Job\\RenameUserDerivedJob', 'services' => [ 'RenameUserFactory', 'UserFactory', ], ], 'renameUser' => [ 'class' => 'MediaWiki\\RenameUser\\Job\\RenameUserTableJob', 'services' => [ 'MainConfig', 'DBLoadBalancerFactory', ], ], ], 'JobTypesExcludedFromDefaultQueue' => [ 'AssembleUploadChunks', 'PublishStashedFile', 'UploadFromUrl', ], 'JobBackoffThrottling' => [ ], 'JobTypeConf' => [ 'default' => [ 'class' => 'MediaWiki\\JobQueue\\JobQueueDB', 'order' => 'random', 'claimTTL' => 3600, ], ], 'JobQueueIncludeInMaxLagFactor' => false, 'SpecialPageCacheUpdates' => [ 'Statistics' => [ 'MediaWiki\\Deferred\\SiteStatsUpdate', 'cacheUpdate', ], ], 'PagePropLinkInvalidations' => [ 'hiddencat' => 'categorylinks', ], 'CategoryMagicGallery' => true, 'CategoryPagingLimit' => 200, 'CategoryCollation' => 'uppercase', 'TempCategoryCollations' => [ ], 'SortedCategories' => false, 'TrackingCategories' => [ ], 'LogTypes' => [ '', 'block', 'protect', 'rights', 'delete', 'upload', 'move', 'import', 'interwiki', 'patrol', 'merge', 'suppress', 'tag', 'managetags', 'contentmodel', 'renameuser', ], 'LogRestrictions' => [ 'suppress' => 'suppressionlog', ], 'FilterLogTypes' => [ 'patrol' => true, 'tag' => true, 'newusers' => false, ], 'LogNames' => [ '' => 'all-logs-page', 'block' => 'blocklogpage', 'protect' => 'protectlogpage', 'rights' => 'rightslog', 'delete' => 'dellogpage', 'upload' => 'uploadlogpage', 'move' => 'movelogpage', 'import' => 'importlogpage', 'patrol' => 'patrol-log-page', 'merge' => 'mergelog', 'suppress' => 'suppressionlog', ], 'LogHeaders' => [ '' => 'alllogstext', 'block' => 'blocklogtext', 'delete' => 'dellogpagetext', 'import' => 'importlogpagetext', 'merge' => 'mergelogpagetext', 'move' => 'movelogpagetext', 'patrol' => 'patrol-log-header', 'protect' => 'protectlogtext', 'rights' => 'rightslogtext', 'suppress' => 'suppressionlogtext', 'upload' => 'uploadlogpagetext', ], 'LogActions' => [ ], 'LogActionsHandlers' => [ 'block/block' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'block/reblock' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'block/unblock' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'contentmodel/change' => 'MediaWiki\\Logging\\ContentModelLogFormatter', 'contentmodel/new' => 'MediaWiki\\Logging\\ContentModelLogFormatter', 'delete/delete' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/delete_redir' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/delete_redir2' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/event' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/restore' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/revision' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'import/interwiki' => 'MediaWiki\\Logging\\ImportLogFormatter', 'import/upload' => 'MediaWiki\\Logging\\ImportLogFormatter', 'interwiki/iw_add' => 'MediaWiki\\Logging\\InterwikiLogFormatter', 'interwiki/iw_delete' => 'MediaWiki\\Logging\\InterwikiLogFormatter', 'interwiki/iw_edit' => 'MediaWiki\\Logging\\InterwikiLogFormatter', 'managetags/activate' => 'MediaWiki\\Logging\\LogFormatter', 'managetags/create' => 'MediaWiki\\Logging\\LogFormatter', 'managetags/deactivate' => 'MediaWiki\\Logging\\LogFormatter', 'managetags/delete' => 'MediaWiki\\Logging\\LogFormatter', 'merge/merge' => [ 'class' => 'MediaWiki\\Logging\\MergeLogFormatter', 'services' => [ 'TitleParser', ], ], 'merge/merge-into' => [ 'class' => 'MediaWiki\\Logging\\MergeLogFormatter', 'services' => [ 'TitleParser', ], ], 'move/move' => [ 'class' => 'MediaWiki\\Logging\\MoveLogFormatter', 'services' => [ 'TitleParser', ], ], 'move/move_redir' => [ 'class' => 'MediaWiki\\Logging\\MoveLogFormatter', 'services' => [ 'TitleParser', ], ], 'patrol/patrol' => 'MediaWiki\\Logging\\PatrolLogFormatter', 'patrol/autopatrol' => 'MediaWiki\\Logging\\PatrolLogFormatter', 'protect/modify' => [ 'class' => 'MediaWiki\\Logging\\ProtectLogFormatter', 'services' => [ 'TitleParser', ], ], 'protect/move_prot' => [ 'class' => 'MediaWiki\\Logging\\ProtectLogFormatter', 'services' => [ 'TitleParser', ], ], 'protect/protect' => [ 'class' => 'MediaWiki\\Logging\\ProtectLogFormatter', 'services' => [ 'TitleParser', ], ], 'protect/unprotect' => [ 'class' => 'MediaWiki\\Logging\\ProtectLogFormatter', 'services' => [ 'TitleParser', ], ], 'renameuser/renameuser' => [ 'class' => 'MediaWiki\\Logging\\RenameuserLogFormatter', 'services' => [ 'TitleParser', ], ], 'rights/autopromote' => 'MediaWiki\\Logging\\RightsLogFormatter', 'rights/rights' => 'MediaWiki\\Logging\\RightsLogFormatter', 'suppress/block' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'suppress/delete' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'suppress/event' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'suppress/reblock' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'suppress/revision' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'tag/update' => 'MediaWiki\\Logging\\TagLogFormatter', 'upload/overwrite' => 'MediaWiki\\Logging\\UploadLogFormatter', 'upload/revert' => 'MediaWiki\\Logging\\UploadLogFormatter', 'upload/upload' => 'MediaWiki\\Logging\\UploadLogFormatter', ], 'ActionFilteredLogs' => [ 'block' => [ 'block' => [ 'block', ], 'reblock' => [ 'reblock', ], 'unblock' => [ 'unblock', ], ], 'contentmodel' => [ 'change' => [ 'change', ], 'new' => [ 'new', ], ], 'delete' => [ 'delete' => [ 'delete', ], 'delete_redir' => [ 'delete_redir', 'delete_redir2', ], 'restore' => [ 'restore', ], 'event' => [ 'event', ], 'revision' => [ 'revision', ], ], 'import' => [ 'interwiki' => [ 'interwiki', ], 'upload' => [ 'upload', ], ], 'managetags' => [ 'create' => [ 'create', ], 'delete' => [ 'delete', ], 'activate' => [ 'activate', ], 'deactivate' => [ 'deactivate', ], ], 'move' => [ 'move' => [ 'move', ], 'move_redir' => [ 'move_redir', ], ], 'newusers' => [ 'create' => [ 'create', 'newusers', ], 'create2' => [ 'create2', ], 'autocreate' => [ 'autocreate', ], 'byemail' => [ 'byemail', ], ], 'protect' => [ 'protect' => [ 'protect', ], 'modify' => [ 'modify', ], 'unprotect' => [ 'unprotect', ], 'move_prot' => [ 'move_prot', ], ], 'rights' => [ 'rights' => [ 'rights', ], 'autopromote' => [ 'autopromote', ], ], 'suppress' => [ 'event' => [ 'event', ], 'revision' => [ 'revision', ], 'delete' => [ 'delete', ], 'block' => [ 'block', ], 'reblock' => [ 'reblock', ], ], 'upload' => [ 'upload' => [ 'upload', ], 'overwrite' => [ 'overwrite', ], 'revert' => [ 'revert', ], ], ], 'NewUserLog' => true, 'WatchUserPageOnAccountCreation' => true, 'PageCreationLog' => true, 'AllowSpecialInclusion' => true, 'DisableQueryPageUpdate' => false, 'CountCategorizedImagesAsUsed' => false, 'MaxRedirectLinksRetrieved' => 500, 'RangeContributionsCIDRLimit' => [ 'IPv4' => 16, 'IPv6' => 32, ], 'Actions' => [ ], 'DefaultRobotPolicy' => 'index,follow', 'NamespaceRobotPolicies' => [ ], 'ArticleRobotPolicies' => [ ], 'ExemptFromUserRobotsControl' => null, 'DebugAPI' => false, 'APIModules' => [ ], 'APIFormatModules' => [ ], 'APIMetaModules' => [ ], 'APIPropModules' => [ ], 'APIListModules' => [ ], 'APIMaxDBRows' => 5000, 'APIMaxResultSize' => 8388608, 'APIMaxUncachedDiffs' => 1, 'APIMaxLagThreshold' => 7, 'APICacheHelpTimeout' => 3600, 'APIUselessQueryPages' => [ 'MIMEsearch', 'LinkSearch', ], 'AjaxLicensePreview' => true, 'CrossSiteAJAXdomains' => [ ], 'CrossSiteAJAXdomainExceptions' => [ ], 'AllowedCorsHeaders' => [ 'Accept', 'Accept-Language', 'Content-Language', 'Content-Type', 'Accept-Encoding', 'DNT', 'Origin', 'User-Agent', 'Api-User-Agent', 'Promise-Non-Write-API-Action', 'Access-Control-Max-Age', 'Authorization', ], 'RestAPIAdditionalRouteFiles' => [ ], 'RestLocalModuleTestBaseUrl' => null, 'RestModuleOverrides' => [ ], 'RestExternalModules' => [ ], 'RestTermsOfServiceUrl' => null, 'MaxShellMemory' => 307200, 'MaxShellFileSize' => 102400, 'MaxShellTime' => 180, 'MaxShellWallClockTime' => 180, 'ShellCgroup' => false, 'PhpCli' => '/usr/bin/php', 'ShellRestrictionMethod' => 'autodetect', 'ShellboxUrls' => [ 'default' => null, ], 'ShellboxSecretKey' => null, 'ShellboxShell' => '/bin/sh', 'HTTPTimeout' => 25, 'HTTPConnectTimeout' => 5.0, 'HTTPMaxTimeout' => 0, 'HTTPMaxConnectTimeout' => 0, 'HTTPImportTimeout' => 25, 'HTTPUserAgentContact' => false, 'AsyncHTTPTimeout' => 25, 'HTTPProxy' => '', 'LocalVirtualHosts' => [ ], 'LocalHTTPProxy' => false, 'AllowExternalReqID' => false, 'GenerateReqIDFormat' => 'rand24', 'JobRunRate' => 1, 'RunJobsAsync' => false, 'UpdateRowsPerJob' => 300, 'UpdateRowsPerQuery' => 100, 'RedirectOnLogin' => null, 'EventRelayerConfig' => [ 'default' => [ 'class' => 'Wikimedia\\EventRelayer\\EventRelayerNull', ], ], 'Pingback' => false, 'OriginTrials' => [ ], 'ReportToExpiry' => 86400, 'ReportToEndpoints' => [ ], 'FeaturePolicyReportOnly' => [ ], 'SkinsPreferred' => [ 'vector-2022', 'vector', ], 'SpecialContributeSkinsEnabled' => [ ], 'SpecialContributeNewPageTarget' => null, 'EnableEditRecovery' => false, 'EditRecoveryExpiry' => 2592000, 'UseCodexSpecialBlock' => false, 'ShowLogoutConfirmation' => false, 'EnableProtectionIndicators' => true, 'OutputPipelineStages' => [ ], 'FeatureShutdown' => [ ], 'UseLeximorph' => false, 'UsePostprocCacheLegacy' => false, 'UsePostprocCacheParsoid' => true, 'ParserOptionsLogUnsafeSampleRate' => 0, 'ReturnExperimentalPFragmentTypes' => [ ], 'UseParsoidLinksUpdate' => null, 'UseParsoidMessages' => false, 'UseParsoidParser' => true, 'SiteLookup' => [ ], ], 'type' => [ 'ConfigRegistry' => 'object', 'AssumeProxiesUseDefaultProtocolPorts' => 'boolean', 'ForceHTTPS' => 'boolean', 'ExtensionDirectory' => [ 'string', 'null', ], 'StyleDirectory' => [ 'string', 'null', ], 'UploadDirectory' => [ 'string', 'boolean', 'null', ], 'Logos' => [ 'object', 'boolean', ], 'ReferrerPolicy' => [ 'array', 'string', 'boolean', ], 'ActionPaths' => 'object', 'MainPageIsDomainRoot' => 'boolean', 'ImgAuthUrlPathMap' => 'object', 'LocalFileRepo' => 'object', 'ForeignFileRepos' => 'array', 'UseSharedUploads' => 'boolean', 'SharedUploadDirectory' => [ 'string', 'null', ], 'SharedUploadPath' => [ 'string', 'null', ], 'HashedSharedUploadDirectory' => 'boolean', 'FetchCommonsDescriptions' => 'boolean', 'SharedUploadDBname' => [ 'boolean', 'string', ], 'SharedUploadDBprefix' => 'string', 'SharedUploadDBschema' => [ 'string', 'null', ], 'CacheSharedUploads' => 'boolean', 'ForeignUploadTargets' => 'array', 'UploadDialog' => 'object', 'FileBackends' => 'object', 'LockManagers' => 'array', 'DefaultLockManager' => [ 'string', 'null', ], 'CopyUploadsDomains' => 'array', 'CopyUploadTimeout' => [ 'boolean', 'integer', ], 'SharedThumbnailScriptPath' => [ 'string', 'boolean', ], 'HashedUploadDirectory' => 'boolean', 'CSPUploadEntryPoint' => 'boolean', 'FileExtensions' => 'array', 'ProhibitedFileExtensions' => 'array', 'MimeTypeExclusions' => 'array', 'TrustedMediaFormats' => 'array', 'MediaHandlers' => 'object', 'NativeImageLazyLoading' => 'boolean', 'ParserTestMediaHandlers' => 'object', 'MaxInterlacingAreas' => 'object', 'SVGConverters' => 'object', 'SVGNativeRendering' => [ 'string', 'boolean', ], 'MaxImageArea' => [ 'string', 'integer', 'boolean', ], 'TiffThumbnailType' => 'array', 'GenerateThumbnailOnParse' => 'boolean', 'EnableAutoRotation' => [ 'boolean', 'null', ], 'Antivirus' => [ 'string', 'null', ], 'AntivirusSetup' => 'object', 'MimeDetectorCommand' => [ 'string', 'null', ], 'XMLMimeTypes' => 'object', 'ImageLimits' => 'array', 'ThumbLimits' => 'array', 'ThumbnailNamespaces' => 'array', 'ThumbnailSteps' => [ 'array', 'null', ], 'ThumbnailBuckets' => [ 'array', 'null', ], 'UploadThumbnailRenderMap' => 'object', 'GalleryOptions' => 'object', 'DjvuDump' => [ 'string', 'null', ], 'DjvuRenderer' => [ 'string', 'null', ], 'DjvuTxt' => [ 'string', 'null', ], 'DjvuPostProcessor' => [ 'string', 'null', ], 'SMTP' => [ 'boolean', 'object', ], 'EnotifFromEditor' => 'boolean', 'EmailConfirmationBanner' => 'boolean', 'EnotifRevealEditorAddress' => 'boolean', 'UsersNotifiedOnAllChanges' => 'object', 'DBmwschema' => [ 'string', 'null', ], 'SharedTables' => 'array', 'DBservers' => [ 'boolean', 'array', ], 'LBFactoryConf' => 'object', 'LocalDatabases' => 'array', 'VirtualDomainsMapping' => 'object', 'RemoteVirtualDomainsMapping' => 'object', 'FileSchemaMigrationStage' => 'integer', 'ExternalLinksDomainGaps' => 'object', 'ContentHandlers' => 'object', 'NamespaceContentModels' => 'object', 'TextModelsToParse' => 'array', 'ExternalStores' => 'array', 'ExternalServers' => 'object', 'DefaultExternalStore' => [ 'array', 'boolean', ], 'RevisionCacheExpiry' => 'integer', 'PageLanguageUseDB' => 'boolean', 'DiffEngine' => [ 'string', 'null', ], 'ExternalDiffEngine' => [ 'string', 'boolean', ], 'Wikidiff2Options' => 'object', 'RequestTimeLimit' => [ 'integer', 'null', ], 'CriticalSectionTimeLimit' => 'number', 'PoolCounterConf' => [ 'object', 'null', ], 'PoolCountClientConf' => 'object', 'MaxUserDBWriteDuration' => [ 'integer', 'boolean', ], 'MaxJobDBWriteDuration' => [ 'integer', 'boolean', ], 'MultiShardSiteStats' => 'boolean', 'ObjectCaches' => 'object', 'WANObjectCache' => 'object', 'MicroStashType' => [ 'string', 'integer', ], 'ParsoidCacheConfig' => 'object', 'ParsoidSelectiveUpdateSampleRate' => 'integer', 'SplitParsoidParserCache' => 'boolean', 'ParserCacheFilterConfig' => 'object', 'ChronologyProtectorSecret' => 'string', 'SuspiciousIpExpiry' => [ 'integer', 'boolean', ], 'MemCachedServers' => 'array', 'LocalisationCacheConf' => 'object', 'ExtensionInfoMTime' => [ 'integer', 'boolean', ], 'CdnServers' => 'object', 'CdnServersNoPurge' => 'object', 'HTCPRouting' => 'object', 'GrammarForms' => 'object', 'ExtraInterlanguageLinkPrefixes' => 'array', 'InterlanguageLinkCodeMap' => 'object', 'ExtraLanguageNames' => 'object', 'ExtraLanguageCodes' => 'object', 'DummyLanguageCodes' => 'object', 'DisabledVariants' => 'object', 'ForceUIMsgAsContentMsg' => 'object', 'RawHtmlMessages' => 'array', 'OverrideUcfirstCharacters' => 'object', 'XhtmlNamespaces' => 'object', 'BrowserFormatDetection' => 'string', 'SkinMetaTags' => 'object', 'SkipSkins' => 'object', 'FragmentMode' => 'array', 'FooterIcons' => 'object', 'PageShareSkinsEnabled' => 'array', 'InterwikiLogoOverride' => 'array', 'ResourceModules' => 'object', 'ResourceModuleSkinStyles' => 'object', 'ResourceLoaderSources' => 'object', 'ResourceLoaderMaxage' => 'object', 'ResourceLoaderMaxQueryLength' => [ 'integer', 'boolean', ], 'CanonicalNamespaceNames' => 'object', 'ExtraNamespaces' => 'object', 'ExtraGenderNamespaces' => 'object', 'NamespaceAliases' => 'object', 'CapitalLinkOverrides' => 'object', 'NamespacesWithSubpages' => 'object', 'NamespacesWithoutAutoSummaries' => 'array', 'ContentNamespaces' => 'array', 'ShortPagesNamespaceExclusions' => 'array', 'ExtraSignatureNamespaces' => 'array', 'InvalidRedirectTargets' => 'array', 'LocalInterwikis' => 'array', 'InterwikiCache' => [ 'boolean', 'object', ], 'SiteTypes' => 'object', 'UrlProtocols' => 'array', 'TidyConfig' => 'object', 'ParsoidSettings' => 'object', 'ParsoidExperimentalParserFunctionOutput' => 'boolean', 'NoFollowNsExceptions' => 'array', 'NoFollowDomainExceptions' => 'array', 'ExternalLinksIgnoreDomains' => 'array', 'EnableMagicLinks' => 'object', 'ManualRevertSearchRadius' => 'integer', 'RevertedTagMaxDepth' => 'integer', 'CentralIdLookupProviders' => 'object', 'CentralIdLookupProvider' => 'string', 'UserRegistrationProviders' => 'object', 'PasswordPolicy' => 'object', 'AuthManagerConfig' => [ 'object', 'null', ], 'AuthManagerAutoConfig' => 'object', 'RememberMe' => 'string', 'ReauthenticateTime' => 'object', 'ChangeCredentialsBlacklist' => 'array', 'RemoveCredentialsBlacklist' => 'array', 'PasswordConfig' => 'object', 'PasswordResetRoutes' => 'object', 'SignatureAllowedLintErrors' => 'array', 'ReservedUsernames' => 'array', 'DefaultUserOptions' => 'object', 'ConditionalUserOptions' => 'object', 'HiddenPrefs' => 'array', 'UserJsPrefLimit' => 'integer', 'AuthenticationTokenVersion' => [ 'string', 'null', ], 'SessionProviders' => 'object', 'AutoCreateTempUser' => 'object', 'AutoblockExemptions' => 'array', 'BlockCIDRLimit' => 'object', 'EnableMultiBlocks' => 'boolean', 'GroupPermissions' => 'object', 'PrivilegedGroups' => 'array', 'RevokePermissions' => 'object', 'GroupInheritsPermissions' => 'object', 'ImplicitGroups' => 'array', 'GroupsAddToSelf' => 'object', 'GroupsRemoveFromSelf' => 'object', 'RestrictedGroups' => 'object', 'UserRequirementsPrivateConditions' => 'array', 'RestrictionTypes' => 'array', 'RestrictionLevels' => 'array', 'CascadingRestrictionLevels' => 'array', 'SemiprotectedRestrictionLevels' => 'array', 'NamespaceProtection' => 'object', 'RestrictUserPageEditing' => 'boolean', 'NonincludableNamespaces' => 'object', 'Autopromote' => 'object', 'AutopromoteOnce' => 'object', 'AutopromoteOnceRCExcludedGroups' => 'array', 'AddGroups' => 'object', 'RemoveGroups' => 'object', 'AvailableRights' => 'array', 'ImplicitRights' => 'array', 'AccountCreationThrottle' => [ 'integer', 'array', ], 'TempAccountCreationThrottle' => 'array', 'TempAccountNameAcquisitionThrottle' => 'array', 'SpamRegex' => 'array', 'SummarySpamRegex' => 'array', 'DnsBlacklistUrls' => 'array', 'ProxyList' => [ 'string', 'array', ], 'ProxyWhitelist' => 'array', 'SoftBlockRanges' => 'array', 'RateLimits' => 'object', 'RateLimitsExcludedIPs' => 'array', 'ExternalQuerySources' => 'object', 'PasswordAttemptThrottle' => 'array', 'GrantPermissions' => 'object', 'GrantPermissionGroups' => 'object', 'GrantRiskGroups' => 'object', 'EnableBotPasswords' => 'boolean', 'BotPasswordsCluster' => [ 'string', 'boolean', ], 'BotPasswordsDatabase' => [ 'string', 'boolean', ], 'BotPasswordsLimit' => 'integer', 'ReauthenticateForActions' => 'object', 'CSPHeader' => [ 'boolean', 'object', ], 'CSPReportOnlyHeader' => [ 'boolean', 'object', ], 'CSPUseReportURIDirective' => [ 'boolean', 'object', ], 'CSPFalsePositiveUrls' => 'object', 'AllowCrossOrigin' => 'boolean', 'RestAllowCrossOriginCookieAuth' => 'boolean', 'CookieSameSite' => [ 'string', 'null', ], 'CacheVaryCookies' => 'array', 'DeviceBoundSessions' => 'boolean', 'DeviceBoundSessionsReportOnly' => 'boolean', 'DeviceBoundSessionCookieName' => 'string', 'DeviceBoundSessionCredentialTTL' => 'integer', 'DeviceBoundSessionChallengeTTL' => 'integer', 'DeviceBoundSessionBindingTTL' => 'integer', 'DeviceBoundSessionScopeExcludes' => 'array', 'TrxProfilerLimits' => 'object', 'DebugLogGroups' => 'object', 'MWLoggerDefaultSpi' => 'object', 'Profiler' => 'object', 'StatsTarget' => [ 'string', 'null', ], 'StatsFormat' => [ 'string', 'null', ], 'StatsPrefix' => 'string', 'OpenTelemetryConfig' => [ 'object', 'null', ], 'OpenSearchTemplates' => 'object', 'NamespacesToBeSearchedDefault' => 'object', 'SitemapNamespaces' => [ 'boolean', 'array', ], 'SitemapNamespacesPriorities' => [ 'boolean', 'object', ], 'SitemapApiConfig' => 'object', 'SpecialSearchFormOptions' => 'object', 'SearchMatchRedirectPreference' => 'boolean', 'SearchRunSuggestedQuery' => 'boolean', 'PreviewOnOpenNamespaces' => 'object', 'ReadOnlyWatchedItemStore' => 'boolean', 'GitRepositoryViewers' => 'object', 'InstallerInitialPages' => 'array', 'RCLinkLimits' => 'array', 'RCLinkDays' => 'array', 'RCFeeds' => 'object', 'OverrideSiteFeed' => 'object', 'FeedClasses' => 'object', 'AdvertisedFeedTypes' => 'array', 'SoftwareTags' => 'object', 'RestrictedTagViewRights' => 'object', 'RecentChangesFlags' => 'object', 'WatchlistExpiry' => 'boolean', 'EnableWatchstarPopover' => 'boolean', 'EnableWatchlistLabels' => 'boolean', 'WatchlistLabelsMaxPerUser' => 'integer', 'WatchlistPurgeRate' => 'number', 'WatchlistExpiryMaxDuration' => [ 'string', 'null', ], 'EnableChangesListQueryPartitioning' => 'boolean', 'ImportSources' => 'object', 'ExtensionFunctions' => 'array', 'ExtensionMessagesFiles' => 'object', 'MessagesDirs' => 'object', 'TranslationAliasesDirs' => 'object', 'ExtensionEntryPointListFiles' => 'object', 'ValidSkinNames' => 'object', 'SpecialPages' => 'object', 'ExtensionCredits' => 'object', 'Hooks' => 'object', 'ServiceWiringFiles' => 'array', 'JobClasses' => 'object', 'JobTypesExcludedFromDefaultQueue' => 'array', 'JobBackoffThrottling' => 'object', 'JobTypeConf' => 'object', 'SpecialPageCacheUpdates' => 'object', 'PagePropLinkInvalidations' => 'object', 'TempCategoryCollations' => 'array', 'SortedCategories' => 'boolean', 'TrackingCategories' => 'array', 'LogTypes' => 'array', 'LogRestrictions' => 'object', 'FilterLogTypes' => 'object', 'LogNames' => 'object', 'LogHeaders' => 'object', 'LogActions' => 'object', 'LogActionsHandlers' => 'object', 'ActionFilteredLogs' => 'object', 'WatchUserPageOnAccountCreation' => 'boolean', 'RangeContributionsCIDRLimit' => 'object', 'Actions' => 'object', 'NamespaceRobotPolicies' => 'object', 'ArticleRobotPolicies' => 'object', 'ExemptFromUserRobotsControl' => [ 'array', 'null', ], 'APIModules' => 'object', 'APIFormatModules' => 'object', 'APIMetaModules' => 'object', 'APIPropModules' => 'object', 'APIListModules' => 'object', 'APIUselessQueryPages' => 'array', 'CrossSiteAJAXdomains' => 'object', 'CrossSiteAJAXdomainExceptions' => 'object', 'AllowedCorsHeaders' => 'array', 'RestAPIAdditionalRouteFiles' => 'array', 'RestLocalModuleTestBaseUrl' => [ 'string', 'null', ], 'RestModuleOverrides' => 'object', 'RestExternalModules' => 'object', 'RestTermsOfServiceUrl' => [ 'string', 'null', ], 'ShellRestrictionMethod' => [ 'string', 'boolean', ], 'ShellboxUrls' => 'object', 'ShellboxSecretKey' => [ 'string', 'null', ], 'ShellboxShell' => [ 'string', 'null', ], 'HTTPTimeout' => 'number', 'HTTPConnectTimeout' => 'number', 'HTTPMaxTimeout' => 'number', 'HTTPMaxConnectTimeout' => 'number', 'HTTPUserAgentContact' => [ 'string', 'boolean', ], 'LocalVirtualHosts' => 'object', 'LocalHTTPProxy' => [ 'string', 'boolean', ], 'GenerateReqIDFormat' => 'string', 'EventRelayerConfig' => 'object', 'Pingback' => 'boolean', 'OriginTrials' => 'array', 'ReportToExpiry' => 'integer', 'ReportToEndpoints' => 'array', 'FeaturePolicyReportOnly' => 'array', 'SkinsPreferred' => 'array', 'SpecialContributeSkinsEnabled' => 'array', 'SpecialContributeNewPageTarget' => [ 'string', 'null', ], 'EnableEditRecovery' => 'boolean', 'EditRecoveryExpiry' => 'integer', 'UseCodexSpecialBlock' => 'boolean', 'ShowLogoutConfirmation' => 'boolean', 'EnableProtectionIndicators' => 'boolean', 'OutputPipelineStages' => 'object', 'FeatureShutdown' => 'array', 'UseLeximorph' => 'boolean', 'UsePostprocCacheLegacy' => 'boolean', 'UsePostprocCacheParsoid' => 'boolean', 'ParserOptionsLogUnsafeSampleRate' => 'integer', 'ReturnExperimentalPFragmentTypes' => 'array', 'UseParsoidLinksUpdate' => [ 'boolean', 'null', ], 'UseParsoidMessages' => [ 'boolean', 'null', ], 'UseParsoidParser' => 'boolean', 'SiteLookup' => 'object', ], 'mergeStrategy' => [ 'TiffThumbnailType' => 'replace', 'LBFactoryConf' => 'replace', 'InterwikiCache' => 'replace', 'PasswordPolicy' => 'array_replace_recursive', 'AuthManagerAutoConfig' => 'array_plus_2d', 'GroupPermissions' => 'array_plus_2d', 'RevokePermissions' => 'array_plus_2d', 'AddGroups' => 'array_merge_recursive', 'RemoveGroups' => 'array_merge_recursive', 'RateLimits' => 'array_plus_2d', 'GrantPermissions' => 'array_plus_2d', 'MWLoggerDefaultSpi' => 'replace', 'Profiler' => 'replace', 'Hooks' => 'array_merge_recursive', 'RestModuleOverrides' => 'array_replace_recursive', 'RestExternalModules' => 'array_replace_recursive', ], 'dynamicDefault' => [ 'UsePathInfo' => [ 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultUsePathInfo', ], ], 'Script' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultScript', ], ], 'LoadScript' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLoadScript', ], ], 'RestPath' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultRestPath', ], ], 'StylePath' => [ 'use' => [ 'ResourceBasePath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultStylePath', ], ], 'LocalStylePath' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLocalStylePath', ], ], 'ExtensionAssetsPath' => [ 'use' => [ 'ResourceBasePath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultExtensionAssetsPath', ], ], 'ArticlePath' => [ 'use' => [ 'Script', 'UsePathInfo', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultArticlePath', ], ], 'UploadPath' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultUploadPath', ], ], 'FileCacheDirectory' => [ 'use' => [ 'UploadDirectory', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultFileCacheDirectory', ], ], 'Logo' => [ 'use' => [ 'ResourceBasePath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLogo', ], ], 'DeletedDirectory' => [ 'use' => [ 'UploadDirectory', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultDeletedDirectory', ], ], 'ShowEXIF' => [ 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultShowEXIF', ], ], 'SharedPrefix' => [ 'use' => [ 'DBprefix', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultSharedPrefix', ], ], 'SharedSchema' => [ 'use' => [ 'DBmwschema', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultSharedSchema', ], ], 'DBerrorLogTZ' => [ 'use' => [ 'Localtimezone', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultDBerrorLogTZ', ], ], 'Localtimezone' => [ 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLocaltimezone', ], ], 'LocalTZoffset' => [ 'use' => [ 'Localtimezone', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLocalTZoffset', ], ], 'ResourceBasePath' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultResourceBasePath', ], ], 'MetaNamespace' => [ 'use' => [ 'Sitename', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultMetaNamespace', ], ], 'CookieSecure' => [ 'use' => [ 'ForceHTTPS', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultCookieSecure', ], ], 'CookiePrefix' => [ 'use' => [ 'SharedDB', 'SharedPrefix', 'SharedTables', 'DBname', 'DBprefix', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultCookiePrefix', ], ], 'ReadOnlyFile' => [ 'use' => [ 'UploadDirectory', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultReadOnlyFile', ], ], ], ], 'config-schema' => [ 'UploadStashScalerBaseUrl' => [ 'deprecated' => 'since 1.36 Use thumbProxyUrl in $wgLocalFileRepo', ], 'IllegalFileChars' => [ 'deprecated' => 'since 1.41; no longer customizable', ], 'ThumbnailNamespaces' => [ 'items' => [ 'type' => 'integer', ], ], 'LocalDatabases' => [ 'items' => [ 'type' => 'string', ], ], 'ParserCacheFilterConfig' => [ 'additionalProperties' => [ 'type' => 'object', 'description' => 'A map of namespace IDs to filter definitions.', 'additionalProperties' => [ 'type' => 'object', 'description' => 'A map of filter names to values.', 'properties' => [ 'minCpuTime' => [ 'type' => 'number', ], ], ], ], ], 'RawHtmlMessages' => [ 'items' => [ 'type' => 'string', ], ], 'InterwikiLogoOverride' => [ 'items' => [ 'type' => 'string', ], ], 'LegalTitleChars' => [ 'deprecated' => 'since 1.41; use Extension:TitleBlacklist to customize', ], 'ReauthenticateTime' => [ 'additionalProperties' => [ 'type' => [ 'integer', 'array', ], ], ], 'ChangeCredentialsBlacklist' => [ 'items' => [ 'type' => 'string', ], ], 'RemoveCredentialsBlacklist' => [ 'items' => [ 'type' => 'string', ], ], 'GroupPermissions' => [ 'additionalProperties' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'boolean', ], ], ], 'GroupInheritsPermissions' => [ 'additionalProperties' => [ 'type' => 'string', ], ], 'AvailableRights' => [ 'items' => [ 'type' => 'string', ], ], 'ImplicitRights' => [ 'items' => [ 'type' => 'string', ], ], 'SoftBlockRanges' => [ 'items' => [ 'type' => 'string', ], ], 'ExternalQuerySources' => [ 'additionalProperties' => [ 'type' => 'object', 'properties' => [ 'enabled' => [ 'type' => 'boolean', 'default' => false, ], 'url' => [ 'type' => 'string', 'format' => 'uri', ], 'timeout' => [ 'type' => 'integer', 'default' => 10, ], ], 'required' => [ 'enabled', 'url', ], 'additionalProperties' => false, ], ], 'GrantPermissions' => [ 'additionalProperties' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'boolean', ], ], ], 'GrantPermissionGroups' => [ 'additionalProperties' => [ 'type' => 'string', ], ], 'SitemapNamespacesPriorities' => [ 'deprecated' => 'since 1.45 and ignored', ], 'SitemapApiConfig' => [ 'additionalProperties' => [ 'enabled' => [ 'type' => 'bool', ], 'sitemapsPerIndex' => [ 'type' => 'int', ], 'pagesPerSitemap' => [ 'type' => 'int', ], 'expiry' => [ 'type' => 'int', ], 'skipRedirects' => [ 'type' => 'bool', ], ], ], 'SoftwareTags' => [ 'additionalProperties' => [ 'type' => 'boolean', ], ], 'UseCopyrightUpload' => [ 'deprecated' => 'since 1.47 This feature is being removed.', ], 'JobBackoffThrottling' => [ 'additionalProperties' => [ 'type' => 'number', ], ], 'JobTypeConf' => [ 'additionalProperties' => [ 'type' => 'object', 'properties' => [ 'class' => [ 'type' => 'string', ], 'order' => [ 'type' => 'string', ], 'claimTTL' => [ 'type' => 'integer', ], ], ], ], 'TrackingCategories' => [ 'deprecated' => 'since 1.25 Extensions should now register tracking categories using the new extension registration system.', ], 'RangeContributionsCIDRLimit' => [ 'additionalProperties' => [ 'type' => 'integer', ], ], 'RestModuleOverrides' => [ 'additionalProperties' => [ 'type' => 'object', 'properties' => [ 'availability' => [ 'type' => 'string', ], 'groups' => [ 'type' => 'array', ], ], ], ], 'RestExternalModules' => [ 'additionalProperties' => [ 'type' => 'object', 'properties' => [ 'info' => [ 'type' => 'object', 'properties' => [ 'version' => [ 'type' => 'string', ], 'title' => [ 'type' => 'string', ], 'x-i18n-title' => [ 'type' => 'string', ], 'description' => [ 'type' => 'string', ], 'x-i18n-description' => [ 'type' => 'string', ], ], 'required' => [ 'version', ], ], 'base' => [ 'type' => 'string', 'format' => 'uri', ], 'spec' => [ 'type' => 'string', 'format' => 'uri', ], ], 'required' => [ 'info', 'base', 'spec', ], ], ], 'ShellboxUrls' => [ 'additionalProperties' => [ 'type' => [ 'string', 'boolean', 'null', ], ], ], ], 'obsolete-config' => [ 'MangleFlashPolicy' => 'Since 1.39; no longer has any effect.', 'EnableOpenSearchSuggest' => 'Since 1.35, no longer used', 'AutoloadAttemptLowercase' => 'Since 1.40; no longer has any effect.', ],]
Represents a block that may prevent users from performing specific operations.
Definition Block.php:32
Interface for objects (potentially) representing an editable wiki page.
Shared interface for rigor levels when dealing with User methods.
A database connection without write operations.