DefaultSettings.php 291 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126
  1. <?php
  2. /**
  3. * Default values for MediaWiki configuration settings.
  4. *
  5. *
  6. * NEVER EDIT THIS FILE
  7. *
  8. *
  9. * To customize your installation, edit "LocalSettings.php". If you make
  10. * changes here, they will be lost on next upgrade of MediaWiki!
  11. *
  12. * In this file, variables whose default values depend on other
  13. * variables are set to false. The actual default value of these variables
  14. * will only be set in Setup.php, taking into account any custom settings
  15. * performed in LocalSettings.php.
  16. *
  17. * Documentation is in the source and on:
  18. * https://www.mediawiki.org/wiki/Manual:Configuration_settings
  19. *
  20. * @warning Note: this (and other things) will break if the autoloader is not
  21. * enabled. Please include includes/AutoLoader.php before including this file.
  22. *
  23. * This program is free software; you can redistribute it and/or modify
  24. * it under the terms of the GNU General Public License as published by
  25. * the Free Software Foundation; either version 2 of the License, or
  26. * (at your option) any later version.
  27. *
  28. * This program is distributed in the hope that it will be useful,
  29. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  30. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  31. * GNU General Public License for more details.
  32. *
  33. * You should have received a copy of the GNU General Public License along
  34. * with this program; if not, write to the Free Software Foundation, Inc.,
  35. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  36. * http://www.gnu.org/copyleft/gpl.html
  37. *
  38. * @file
  39. */
  40. use MediaWiki\MediaWikiServices;
  41. /**
  42. * @cond file_level_code
  43. * This is not a valid entry point, perform no further processing unless
  44. * MEDIAWIKI is defined
  45. */
  46. if ( !defined( 'MEDIAWIKI' ) ) {
  47. echo "This file is part of MediaWiki and is not a valid entry point\n";
  48. die( 1 );
  49. }
  50. /** @endcond */
  51. /**
  52. * wgConf hold the site configuration.
  53. * Not used for much in a default install.
  54. * @since 1.5
  55. */
  56. $wgConf = new SiteConfiguration;
  57. /**
  58. * Registry of factory functions to create config objects:
  59. * The 'main' key must be set, and the value should be a valid
  60. * callable.
  61. * @since 1.23
  62. */
  63. $wgConfigRegistry = [
  64. 'main' => 'GlobalVarConfig::newInstance'
  65. ];
  66. /**
  67. * MediaWiki version number
  68. * @since 1.2
  69. */
  70. $wgVersion = '1.34.0';
  71. /**
  72. * Name of the site. It must be changed in LocalSettings.php
  73. */
  74. $wgSitename = 'MediaWiki';
  75. /**
  76. * When the wiki is running behind a proxy and this is set to true, assumes that the proxy exposes
  77. * the wiki on the standard ports (443 for https and 80 for http).
  78. * @var bool
  79. * @since 1.26
  80. */
  81. $wgAssumeProxiesUseDefaultProtocolPorts = true;
  82. /**
  83. * URL of the server.
  84. *
  85. * @par Example:
  86. * @code
  87. * $wgServer = 'http://example.com';
  88. * @endcode
  89. *
  90. * This must be set in LocalSettings.php. The MediaWiki installer does this
  91. * automatically since 1.18.
  92. *
  93. * If you want to use protocol-relative URLs on your wiki, set this to a
  94. * protocol-relative URL like '//example.com' and set $wgCanonicalServer
  95. * to a fully qualified URL.
  96. */
  97. $wgServer = false;
  98. /**
  99. * Canonical URL of the server, to use in IRC feeds and notification e-mails.
  100. * Must be fully qualified, even if $wgServer is protocol-relative.
  101. *
  102. * Defaults to $wgServer, expanded to a fully qualified http:// URL if needed.
  103. * @since 1.18
  104. */
  105. $wgCanonicalServer = false;
  106. /**
  107. * Server name. This is automatically computed by parsing the bare
  108. * hostname out of $wgCanonicalServer. It should not be customized.
  109. * @since 1.24
  110. */
  111. $wgServerName = false;
  112. /************************************************************************//**
  113. * @name Script path settings
  114. * @{
  115. */
  116. /**
  117. * The path we should point to.
  118. * It might be a virtual path in case with use apache mod_rewrite for example.
  119. *
  120. * This *needs* to be set correctly.
  121. *
  122. * Other paths will be set to defaults based on it unless they are directly
  123. * set in LocalSettings.php
  124. */
  125. $wgScriptPath = '/wiki';
  126. /**
  127. * Whether to support URLs like index.php/Page_title These often break when PHP
  128. * is set up in CGI mode. PATH_INFO *may* be correct if cgi.fix_pathinfo is set,
  129. * but then again it may not; lighttpd converts incoming path data to lowercase
  130. * on systems with case-insensitive filesystems, and there have been reports of
  131. * problems on Apache as well.
  132. *
  133. * To be safe we'll continue to keep it off by default.
  134. *
  135. * Override this to false if $_SERVER['PATH_INFO'] contains unexpectedly
  136. * incorrect garbage, or to true if it is really correct.
  137. *
  138. * The default $wgArticlePath will be set based on this value at runtime, but if
  139. * you have customized it, having this incorrectly set to true can cause
  140. * redirect loops when "pretty URLs" are used.
  141. * @since 1.2.1
  142. */
  143. $wgUsePathInfo = ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
  144. ( strpos( PHP_SAPI, 'apache2filter' ) === false ) &&
  145. ( strpos( PHP_SAPI, 'isapi' ) === false );
  146. /** @} */
  147. /************************************************************************//**
  148. * @name URLs and file paths
  149. *
  150. * These various web and file path variables are set to their defaults
  151. * in Setup.php if they are not explicitly set from LocalSettings.php.
  152. *
  153. * These will relatively rarely need to be set manually, unless you are
  154. * splitting style sheets or images outside the main document root.
  155. *
  156. * In this section, a "path" is usually a host-relative URL, i.e. a URL without
  157. * the host part, that starts with a slash. In most cases a full URL is also
  158. * acceptable. A "directory" is a local file path.
  159. *
  160. * In both paths and directories, trailing slashes should not be included.
  161. *
  162. * @{
  163. */
  164. /**
  165. * The URL path to index.php.
  166. *
  167. * Defaults to "{$wgScriptPath}/index.php".
  168. */
  169. $wgScript = false;
  170. /**
  171. * The URL path to load.php.
  172. *
  173. * Defaults to "{$wgScriptPath}/load.php".
  174. * @since 1.17
  175. */
  176. $wgLoadScript = false;
  177. /**
  178. * The URL path to the REST API
  179. * Defaults to "{$wgScriptPath}/rest.php"
  180. * @since 1.34
  181. */
  182. $wgRestPath = false;
  183. /**
  184. * The URL path of the skins directory.
  185. * Defaults to "{$wgResourceBasePath}/skins".
  186. * @since 1.3
  187. */
  188. $wgStylePath = false;
  189. $wgStyleSheetPath = &$wgStylePath;
  190. /**
  191. * The URL path of the skins directory. Should not point to an external domain.
  192. * Defaults to "{$wgScriptPath}/skins".
  193. * @since 1.17
  194. */
  195. $wgLocalStylePath = false;
  196. /**
  197. * The URL path of the extensions directory.
  198. * Defaults to "{$wgResourceBasePath}/extensions".
  199. * @since 1.16
  200. */
  201. $wgExtensionAssetsPath = false;
  202. /**
  203. * Filesystem extensions directory.
  204. * Defaults to "{$IP}/extensions".
  205. * @since 1.25
  206. */
  207. $wgExtensionDirectory = "{$IP}/extensions";
  208. /**
  209. * Filesystem stylesheets directory.
  210. * Defaults to "{$IP}/skins".
  211. * @since 1.3
  212. */
  213. $wgStyleDirectory = "{$IP}/skins";
  214. /**
  215. * The URL path for primary article page views. This path should contain $1,
  216. * which is replaced by the article title.
  217. *
  218. * Defaults to "{$wgScript}/$1" or "{$wgScript}?title=$1",
  219. * depending on $wgUsePathInfo.
  220. */
  221. $wgArticlePath = false;
  222. /**
  223. * The URL path for the images directory.
  224. * Defaults to "{$wgScriptPath}/images".
  225. */
  226. $wgUploadPath = false;
  227. /**
  228. * The filesystem path of the images directory. Defaults to "{$IP}/images".
  229. */
  230. $wgUploadDirectory = false;
  231. /**
  232. * Directory where the cached page will be saved.
  233. * Defaults to "{$wgUploadDirectory}/cache".
  234. */
  235. $wgFileCacheDirectory = false;
  236. /**
  237. * The URL path of the wiki logo. The logo size should be 135x135 pixels.
  238. * Defaults to "$wgResourceBasePath/resources/assets/wiki.png".
  239. */
  240. $wgLogo = false;
  241. /**
  242. * Array with URL paths to HD versions of the wiki logo. The scaled logo size
  243. * should be under 135x155 pixels.
  244. * Only 1.5x and 2x versions are supported.
  245. *
  246. * @par Example:
  247. * @code
  248. * $wgLogoHD = [
  249. * "1.5x" => "path/to/1.5x_version.png",
  250. * "2x" => "path/to/2x_version.png"
  251. * ];
  252. * @endcode
  253. *
  254. * SVG is also supported but when enabled, it
  255. * disables 1.5x and 2x as svg will already
  256. * be optimised for screen resolution.
  257. *
  258. * @par Example:
  259. * @code
  260. * $wgLogoHD = [
  261. * "svg" => "path/to/svg_version.svg",
  262. * ];
  263. * @endcode
  264. *
  265. * @since 1.25
  266. */
  267. $wgLogoHD = false;
  268. /**
  269. * The URL path of the shortcut icon.
  270. * @since 1.6
  271. */
  272. $wgFavicon = '/favicon.ico';
  273. /**
  274. * The URL path of the icon for iPhone and iPod Touch web app bookmarks.
  275. * Defaults to no icon.
  276. * @since 1.12
  277. */
  278. $wgAppleTouchIcon = false;
  279. /**
  280. * Value for the referrer policy meta tag.
  281. * One or more of the values defined in the Referrer Policy specification:
  282. * https://w3c.github.io/webappsec-referrer-policy/
  283. * ('no-referrer', 'no-referrer-when-downgrade', 'same-origin',
  284. * 'origin', 'strict-origin', 'origin-when-cross-origin',
  285. * 'strict-origin-when-cross-origin', or 'unsafe-url')
  286. * Setting it to false prevents the meta tag from being output
  287. * (which results in falling back to the Referrer-Policy header,
  288. * or 'no-referrer-when-downgrade' if that's not set either.)
  289. * Setting it to an array (supported since 1.31) will create a meta tag for
  290. * each value, in the reverse of the order (meaning that the first array element
  291. * will be the default and the others used as fallbacks for browsers which do not
  292. * understand it).
  293. *
  294. * @var array|string|bool
  295. * @since 1.25
  296. */
  297. $wgReferrerPolicy = false;
  298. /**
  299. * The local filesystem path to a temporary directory. This must not be web accessible.
  300. *
  301. * When this setting is set to false, its value will automatically be decided
  302. * through the first call to wfTempDir(). See that method's implementation for
  303. * the actual detection logic.
  304. *
  305. * To find the temporary path for the current wiki, developers must not use
  306. * this variable directly. Use the global function wfTempDir() instead.
  307. *
  308. * The temporary directory is expected to be shared with other applications,
  309. * including other MediaWiki instances (which might not run the same version
  310. * or configution). When storing files here, take care to avoid conflicts
  311. * with other instances of MediaWiki. For example, when caching the result
  312. * of a computation, the file name should incorporate the input of the
  313. * computation so that it cannot be confused for the result of a similar
  314. * computation by another MediaWiki instance.
  315. *
  316. * @see wfTempDir()
  317. * @note Default changed to false in MediaWiki 1.20.
  318. */
  319. $wgTmpDirectory = false;
  320. /**
  321. * If set, this URL is added to the start of $wgUploadPath to form a complete
  322. * upload URL.
  323. * @since 1.4
  324. */
  325. $wgUploadBaseUrl = '';
  326. /**
  327. * To enable remote on-demand scaling, set this to the thumbnail base URL.
  328. * Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg
  329. * where 'e6' are the first two characters of the MD5 hash of the file name.
  330. * If $wgUploadStashScalerBaseUrl is set to false, thumbs are rendered locally as needed.
  331. * @since 1.17
  332. */
  333. $wgUploadStashScalerBaseUrl = false;
  334. /**
  335. * To set 'pretty' URL paths for actions other than
  336. * plain page views, add to this array.
  337. *
  338. * @par Example:
  339. * Set pretty URL for the edit action:
  340. * @code
  341. * 'edit' => "$wgScriptPath/edit/$1"
  342. * @endcode
  343. *
  344. * There must be an appropriate script or rewrite rule in place to handle these
  345. * URLs.
  346. * @since 1.5
  347. */
  348. $wgActionPaths = [];
  349. /** @} */
  350. /************************************************************************//**
  351. * @name Files and file uploads
  352. * @{
  353. */
  354. /**
  355. * Allow users to upload files.
  356. *
  357. * Use $wgLocalFileRepo to control how and where uploads are stored.
  358. * Disabled by default as for security reasons.
  359. * See <https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads>.
  360. *
  361. * @since 1.5
  362. */
  363. $wgEnableUploads = false;
  364. /**
  365. * The maximum age of temporary (incomplete) uploaded files
  366. */
  367. $wgUploadStashMaxAge = 6 * 3600; // 6 hours
  368. /**
  369. * Allows to move images and other media files
  370. */
  371. $wgAllowImageMoving = true;
  372. /**
  373. * Enable deferred upload tasks that use the job queue.
  374. * Only enable this if job runners are set up for both the
  375. * 'AssembleUploadChunks' and 'PublishStashedFile' job types.
  376. *
  377. * @note If you use suhosin, this setting is incompatible with
  378. * suhosin.session.encrypt.
  379. */
  380. $wgEnableAsyncUploads = false;
  381. /**
  382. * Additional characters that are not allowed in filenames. They are replaced with '-' when
  383. * uploading. Like $wgLegalTitleChars, this is a regexp character class.
  384. *
  385. * Slashes and backslashes are disallowed regardless of this setting, but included here for
  386. * completeness.
  387. */
  388. $wgIllegalFileChars = ":\\/\\\\";
  389. /**
  390. * What directory to place deleted uploads in.
  391. * Defaults to "{$wgUploadDirectory}/deleted".
  392. */
  393. $wgDeletedDirectory = false;
  394. /**
  395. * Set this to true if you use img_auth and want the user to see details on why access failed.
  396. */
  397. $wgImgAuthDetails = false;
  398. /**
  399. * Map of relative URL directories to match to internal mwstore:// base storage paths.
  400. * For img_auth.php requests, everything after "img_auth.php/" is checked to see
  401. * if starts with any of the prefixes defined here. The prefixes should not overlap.
  402. * The prefix that matches has a corresponding storage path, which the rest of the URL
  403. * is assumed to be relative to. The file at that path (or a 404) is send to the client.
  404. *
  405. * Example:
  406. * $wgImgAuthUrlPathMap['/timeline/'] = 'mwstore://local-fs/timeline-render/';
  407. * The above maps ".../img_auth.php/timeline/X" to "mwstore://local-fs/timeline-render/".
  408. * The name "local-fs" should correspond by name to an entry in $wgFileBackends.
  409. *
  410. * @see $wgFileBackends
  411. */
  412. $wgImgAuthUrlPathMap = [];
  413. /**
  414. * File repository structures
  415. *
  416. * $wgLocalFileRepo is a single repository structure, and $wgForeignFileRepos is
  417. * an array of such structures. Each repository structure is an associative
  418. * array of properties configuring the repository.
  419. *
  420. * Properties required for all repos:
  421. * - class The class name for the repository. May come from the core or an extension.
  422. * The core repository classes are FileRepo, LocalRepo, ForeignDBRepo.
  423. *
  424. * - name A unique name for the repository (but $wgLocalFileRepo should be 'local').
  425. * The name should consist of alpha-numeric characters.
  426. * - backend A file backend name (see $wgFileBackends).
  427. *
  428. * For most core repos:
  429. * - zones Associative array of zone names that each map to an array with:
  430. * container : backend container name the zone is in
  431. * directory : root path within container for the zone
  432. * url : base URL to the root of the zone
  433. * urlsByExt : map of file extension types to base URLs
  434. * (useful for using a different cache for videos)
  435. * Zones default to using "<repo name>-<zone name>" as the container name
  436. * and default to using the container root as the zone's root directory.
  437. * Nesting of zone locations within other zones should be avoided.
  438. * - url Public zone URL. The 'zones' settings take precedence.
  439. * - hashLevels The number of directory levels for hash-based division of files
  440. * - thumbScriptUrl The URL for thumb.php (optional, not recommended)
  441. * - transformVia404 Whether to skip media file transformation on parse and rely on a 404
  442. * handler instead.
  443. * - initialCapital Equivalent to $wgCapitalLinks (or $wgCapitalLinkOverrides[NS_FILE],
  444. * determines whether filenames implicitly start with a capital letter.
  445. * The current implementation may give incorrect description page links
  446. * when the local $wgCapitalLinks and initialCapital are mismatched.
  447. * - pathDisclosureProtection
  448. * May be 'paranoid' to remove all parameters from error messages, 'none' to
  449. * leave the paths in unchanged, or 'simple' to replace paths with
  450. * placeholders. Default for LocalRepo is 'simple'.
  451. * - fileMode This allows wikis to set the file mode when uploading/moving files. Default
  452. * is 0644.
  453. * - directory The local filesystem directory where public files are stored. Not used for
  454. * some remote repos.
  455. * - thumbDir The base thumbnail directory. Defaults to "<directory>/thumb".
  456. * - thumbUrl The base thumbnail URL. Defaults to "<url>/thumb".
  457. * - isPrivate Set this if measures should always be taken to keep the files private.
  458. * One should not trust this to assure that the files are not web readable;
  459. * the server configuration should be done manually depending on the backend.
  460. *
  461. * These settings describe a foreign MediaWiki installation. They are optional, and will be ignored
  462. * for local repositories:
  463. * - descBaseUrl URL of image description pages, e.g. https://en.wikipedia.org/wiki/File:
  464. * - scriptDirUrl URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g.
  465. * https://en.wikipedia.org/w
  466. * - articleUrl Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1
  467. * - fetchDescription Fetch the text of the remote file description page and display them
  468. * on the local wiki.
  469. * - abbrvThreshold File names over this size will use the short form of thumbnail names.
  470. * Short thumbnail names only have the width, parameters, and the extension.
  471. *
  472. * ForeignDBRepo:
  473. * - dbType, dbServer, dbUser, dbPassword, dbName, dbFlags
  474. * equivalent to the corresponding member of $wgDBservers
  475. * - tablePrefix Table prefix, the foreign wiki's $wgDBprefix
  476. * - hasSharedCache Set to true if the foreign wiki's $wgMainCacheType is identical to,
  477. * and accessible from, this wiki.
  478. *
  479. * ForeignAPIRepo:
  480. * - apibase Use for the foreign API's URL
  481. * - apiThumbCacheExpiry How long to locally cache thumbs for
  482. *
  483. * If you leave $wgLocalFileRepo set to false, Setup will fill in appropriate values.
  484. * Otherwise, set $wgLocalFileRepo to a repository structure as described above.
  485. * If you set $wgUseInstantCommons to true, it will add an entry for Commons.
  486. * If you set $wgForeignFileRepos to an array of repository structures, those will
  487. * be searched after the local file repo.
  488. * Otherwise, you will only have access to local media files.
  489. *
  490. * @see Setup.php for an example usage and default initialization.
  491. */
  492. $wgLocalFileRepo = false;
  493. /**
  494. * Enable the use of files from one or more other wikis.
  495. *
  496. * If you operate multiple wikis, you can declare a shared upload path here.
  497. * Uploads to the local wiki will NOT be stored here - See $wgLocalFileRepo
  498. * and $wgUploadDirectory for that.
  499. *
  500. * The wiki will only consider the foreign repository if no file of the given name
  501. * is found in the local repository (e.g. via `[[File:..]]` syntax).
  502. *
  503. * @since 1.11
  504. * @see $wgLocalFileRepo
  505. */
  506. $wgForeignFileRepos = [];
  507. /**
  508. * Use Wikimedia Commons as a foreign file repository.
  509. *
  510. * This is a shortcut for adding an entry to to $wgForeignFileRepos
  511. * for https://commons.wikimedia.org, using ForeignAPIRepo with the
  512. * default settings.
  513. *
  514. * @since 1.16
  515. */
  516. $wgUseInstantCommons = false;
  517. /**
  518. * Shortcut for adding an entry to $wgForeignFileRepos.
  519. *
  520. * Uses the following variables:
  521. *
  522. * - directory: $wgSharedUploadDirectory.
  523. * - url: $wgSharedUploadPath.
  524. * - hashLevels: Based on $wgHashedSharedUploadDirectory.
  525. * - thumbScriptUrl: $wgSharedThumbnailScriptPath.
  526. * - transformVia404: Based on $wgGenerateThumbnailOnParse.
  527. * - descBaseUrl: $wgRepositoryBaseUrl.
  528. * - fetchDescription: $wgFetchCommonsDescriptions.
  529. *
  530. * If $wgSharedUploadDBname is set, it uses the ForeignDBRepo
  531. * class, with also the following variables:
  532. *
  533. * - dbName: $wgSharedUploadDBname.
  534. * - dbType: $wgDBtype.
  535. * - dbServer: $wgDBserver.
  536. * - dbUser: $wgDBuser.
  537. * - dbPassword: $wgDBpassword.
  538. * - dbFlags: Based on $wgDebugDumpSql.
  539. * - tablePrefix: $wgSharedUploadDBprefix,
  540. * - hasSharedCache: $wgCacheSharedUploads.
  541. *
  542. * @var bool
  543. * @since 1.3
  544. */
  545. $wgUseSharedUploads = false;
  546. /**
  547. * Shortcut for the 'directory' setting of $wgForeignFileRepos.
  548. * Only used if $wgUseSharedUploads is enabled.
  549. *
  550. * @var string
  551. * @since 1.3
  552. */
  553. $wgSharedUploadDirectory = null;
  554. /**
  555. * Shortcut for the 'url' setting of $wgForeignFileRepos.
  556. * Only used if $wgUseSharedUploads is enabled.
  557. *
  558. * @var string
  559. * @since 1.3
  560. */
  561. $wgSharedUploadPath = null;
  562. /**
  563. * Shortcut for the 'hashLevels' setting of $wgForeignFileRepos.
  564. * Only used if $wgUseSharedUploads is enabled.
  565. *
  566. * @var bool
  567. * @since 1.3
  568. */
  569. $wgHashedSharedUploadDirectory = true;
  570. /**
  571. * Shortcut for the 'descBaseUrl' setting of $wgForeignFileRepos.
  572. * Only used if $wgUseSharedUploads is enabled.
  573. *
  574. * @since 1.5
  575. */
  576. $wgRepositoryBaseUrl = 'https://commons.wikimedia.org/wiki/File:';
  577. /**
  578. * Shortcut for the 'fetchDescription' setting of $wgForeignFileRepos.
  579. * Only used if $wgUseSharedUploads is enabled.
  580. *
  581. * @var bool
  582. * @since 1.5
  583. */
  584. $wgFetchCommonsDescriptions = false;
  585. /**
  586. * Shortcut for the ForeignDBRepo 'dbName' setting in $wgForeignFileRepos.
  587. * Set this to false if the uploads do not come from a wiki.
  588. * Only used if $wgUseSharedUploads is enabled.
  589. *
  590. * @var bool|string
  591. * @since 1.4
  592. */
  593. $wgSharedUploadDBname = false;
  594. /**
  595. * Shortcut for the ForeignDBRepo 'tablePrefix' setting in $wgForeignFileRepos.
  596. * Only used if $wgUseSharedUploads is enabled.
  597. *
  598. * @var string
  599. * @since 1.5
  600. */
  601. $wgSharedUploadDBprefix = '';
  602. /**
  603. * Shortcut for the ForeignDBRepo 'hasSharedCache' setting in $wgForeignFileRepos.
  604. * Only used if $wgUseSharedUploads is enabled.
  605. *
  606. * @var bool
  607. * @since 1.5
  608. */
  609. $wgCacheSharedUploads = true;
  610. /**
  611. * Array of foreign file repo names (set in $wgForeignFileRepos above) that
  612. * are allowable upload targets. These wikis must have some method of
  613. * authentication (i.e. CentralAuth), and be CORS-enabled for this wiki.
  614. * The string 'local' signifies the default local file repository.
  615. *
  616. * Example:
  617. * $wgForeignUploadTargets = [ 'shared' ];
  618. */
  619. $wgForeignUploadTargets = [ 'local' ];
  620. /**
  621. * Configuration for file uploads using the embeddable upload dialog
  622. * (https://www.mediawiki.org/wiki/Upload_dialog).
  623. *
  624. * This applies also to foreign uploads to this wiki (the configuration is loaded by remote wikis
  625. * using the action=query&meta=siteinfo API).
  626. *
  627. * See below for documentation of each property. None of the properties may be omitted.
  628. */
  629. $wgUploadDialog = [
  630. // Fields to make available in the dialog. `true` means that this field is visible, `false` means
  631. // that it is hidden. The "Name" field can't be hidden. Note that you also have to add the
  632. // matching replacement to the 'filepage' format key below to make use of these.
  633. 'fields' => [
  634. 'description' => true,
  635. 'date' => false,
  636. 'categories' => false,
  637. ],
  638. // Suffix of localisation messages used to describe the license under which the uploaded file will
  639. // be released. The same value may be set for both 'local' and 'foreign' uploads.
  640. 'licensemessages' => [
  641. // The 'local' messages are used for local uploads on this wiki:
  642. // * upload-form-label-own-work-message-generic-local
  643. // * upload-form-label-not-own-work-message-generic-local
  644. // * upload-form-label-not-own-work-local-generic-local
  645. 'local' => 'generic-local',
  646. // The 'foreign' messages are used for cross-wiki uploads from other wikis to this wiki:
  647. // * upload-form-label-own-work-message-generic-foreign
  648. // * upload-form-label-not-own-work-message-generic-foreign
  649. // * upload-form-label-not-own-work-local-generic-foreign
  650. 'foreign' => 'generic-foreign',
  651. ],
  652. // Upload comments to use for 'local' and 'foreign' uploads. This can also be set to a single
  653. // string value, in which case it is used for both kinds of uploads. Available replacements:
  654. // * $HOST - domain name from which a cross-wiki upload originates
  655. // * $PAGENAME - wiki page name from which an upload originates
  656. 'comment' => [
  657. 'local' => '',
  658. 'foreign' => '',
  659. ],
  660. // Format of the file page wikitext to be generated from the fields input by the user.
  661. 'format' => [
  662. // Wrapper for the whole page. Available replacements:
  663. // * $DESCRIPTION - file description, as input by the user (only if the 'description' field is
  664. // enabled), wrapped as defined below in the 'description' key
  665. // * $DATE - file creation date, as input by the user (only if the 'date' field is enabled)
  666. // * $SOURCE - as defined below in the 'ownwork' key, may be extended in the future
  667. // * $AUTHOR - linked user name, may be extended in the future
  668. // * $LICENSE - as defined below in the 'license' key, may be extended in the future
  669. // * $CATEGORIES - file categories wikitext, as input by the user (only if the 'categories'
  670. // field is enabled), or if no input, as defined below in the 'uncategorized' key
  671. 'filepage' => '$DESCRIPTION',
  672. // Wrapped for file description. Available replacements:
  673. // * $LANGUAGE - source wiki's content language
  674. // * $TEXT - input by the user
  675. 'description' => '$TEXT',
  676. 'ownwork' => '',
  677. 'license' => '',
  678. 'uncategorized' => '',
  679. ],
  680. ];
  681. /**
  682. * File backend structure configuration.
  683. *
  684. * This is an array of file backend configuration arrays.
  685. * Each backend configuration has the following parameters:
  686. * - name : A unique name for the backend
  687. * - class : The file backend class to use
  688. * - wikiId : A unique string that identifies the wiki (container prefix)
  689. * - lockManager : The name of a lock manager (see $wgLockManagers) [optional]
  690. * - fileJournal : File journal configuration for FileJournal::__construct() [optional]
  691. *
  692. * See FileBackend::__construct() for more details.
  693. * Additional parameters are specific to the file backend class used.
  694. * These settings should be global to all wikis when possible.
  695. *
  696. * FileBackendMultiWrite::__construct() is augmented with a 'template' option that
  697. * can be used in any of the values of the 'backends' array. Its value is the name of
  698. * another backend in $wgFileBackends. When set, it pre-fills the array with all of the
  699. * configuration of the named backend. Explicitly set values in the array take precedence.
  700. *
  701. * There are two particularly important aspects about each backend:
  702. * - a) Whether it is fully qualified or wiki-relative.
  703. * By default, the paths of files are relative to the current wiki,
  704. * which works via prefixing them with the current wiki ID when accessed.
  705. * Setting 'domainId' forces the backend to be fully qualified by prefixing
  706. * all paths with the specified value instead. This can be useful if
  707. * multiple wikis need to share the same data. Note that 'name' is *not*
  708. * part of any prefix and thus should not be relied upon for namespacing.
  709. * - b) Whether it is only defined for some wikis or is defined on all
  710. * wikis in the wiki farm. Defining a backend globally is useful
  711. * if multiple wikis need to share the same data.
  712. * One should be aware of these aspects when configuring a backend for use with
  713. * any basic feature or plugin. For example, suppose an extension stores data for
  714. * different wikis in different directories and sometimes needs to access data from
  715. * a foreign wiki's directory in order to render a page on given wiki. The extension
  716. * would need a fully qualified backend that is defined on all wikis in the wiki farm.
  717. */
  718. $wgFileBackends = [];
  719. /**
  720. * Array of configuration arrays for each lock manager.
  721. * Each backend configuration has the following parameters:
  722. * - name : A unique name for the lock manager
  723. * - class : The lock manger class to use
  724. *
  725. * See LockManager::__construct() for more details.
  726. * Additional parameters are specific to the lock manager class used.
  727. * These settings should be global to all wikis.
  728. */
  729. $wgLockManagers = [];
  730. /**
  731. * Show Exif data, on by default if available.
  732. * Requires PHP's Exif extension: https://www.php.net/manual/en/ref.exif.php
  733. *
  734. * @note FOR WINDOWS USERS:
  735. * To enable Exif functions, add the following line to the "Windows
  736. * extensions" section of php.ini:
  737. * @code{.ini}
  738. * extension=extensions/php_exif.dll
  739. * @endcode
  740. */
  741. $wgShowEXIF = function_exists( 'exif_read_data' );
  742. /**
  743. * If to automatically update the img_metadata field
  744. * if the metadata field is outdated but compatible with the current version.
  745. * Defaults to false.
  746. */
  747. $wgUpdateCompatibleMetadata = false;
  748. /**
  749. * Allow for upload to be copied from an URL.
  750. * The timeout for copy uploads is set by $wgCopyUploadTimeout.
  751. * You have to assign the user right 'upload_by_url' to a user group, to use this.
  752. */
  753. $wgAllowCopyUploads = false;
  754. /**
  755. * A list of domains copy uploads can come from
  756. *
  757. * @since 1.20
  758. */
  759. $wgCopyUploadsDomains = [];
  760. /**
  761. * Enable copy uploads from Special:Upload. $wgAllowCopyUploads must also be
  762. * true. If $wgAllowCopyUploads is true, but this is false, you will only be
  763. * able to perform copy uploads from the API or extensions (e.g. UploadWizard).
  764. */
  765. $wgCopyUploadsFromSpecialUpload = false;
  766. /**
  767. * Proxy to use for copy upload requests.
  768. * @since 1.20
  769. */
  770. $wgCopyUploadProxy = false;
  771. /**
  772. * Different timeout for upload by url
  773. * This could be useful since when fetching large files, you may want a
  774. * timeout longer than the default $wgHTTPTimeout. False means fallback
  775. * to default.
  776. *
  777. * @var int|bool
  778. *
  779. * @since 1.22
  780. */
  781. $wgCopyUploadTimeout = false;
  782. /**
  783. * Max size for uploads, in bytes. If not set to an array, applies to all
  784. * uploads. If set to an array, per upload type maximums can be set, using the
  785. * file and url keys. If the * key is set this value will be used as maximum
  786. * for non-specified types.
  787. *
  788. * @par Example:
  789. * @code
  790. * $wgMaxUploadSize = [
  791. * '*' => 250 * 1024,
  792. * 'url' => 500 * 1024,
  793. * ];
  794. * @endcode
  795. * Sets the maximum for all uploads to 250 kB except for upload-by-url, which
  796. * will have a maximum of 500 kB.
  797. */
  798. $wgMaxUploadSize = 1024 * 1024 * 100; # 100MB
  799. /**
  800. * Minimum upload chunk size, in bytes. When using chunked upload, non-final
  801. * chunks smaller than this will be rejected. May be reduced based on the
  802. * 'upload_max_filesize' or 'post_max_size' PHP settings.
  803. * @since 1.26
  804. */
  805. $wgMinUploadChunkSize = 1024; # 1KB
  806. /**
  807. * Point the upload navigation link to an external URL
  808. * Useful if you want to use a shared repository by default
  809. * without disabling local uploads (use $wgEnableUploads = false for that).
  810. *
  811. * @par Example:
  812. * @code
  813. * $wgUploadNavigationUrl = 'https://commons.wikimedia.org/wiki/Special:Upload';
  814. * @endcode
  815. */
  816. $wgUploadNavigationUrl = false;
  817. /**
  818. * Point the upload link for missing files to an external URL, as with
  819. * $wgUploadNavigationUrl. The URL will get "(?|&)wpDestFile=<filename>"
  820. * appended to it as appropriate.
  821. */
  822. $wgUploadMissingFileUrl = false;
  823. /**
  824. * Give a path here to use thumb.php for thumbnail generation on client
  825. * request, instead of generating them on render and outputting a static URL.
  826. * This is necessary if some of your apache servers don't have read/write
  827. * access to the thumbnail path.
  828. *
  829. * @par Example:
  830. * @code
  831. * $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
  832. * @endcode
  833. */
  834. $wgThumbnailScriptPath = false;
  835. /**
  836. * Shortcut for the 'thumbScriptUrl' setting of $wgForeignFileRepos.
  837. * Only used if $wgUseSharedUploads is enabled.
  838. *
  839. * @var string
  840. * @since 1.3
  841. */
  842. $wgSharedThumbnailScriptPath = false;
  843. /**
  844. * Set this to false if you do not want MediaWiki to divide your images
  845. * directory into many subdirectories, for improved performance.
  846. *
  847. * It's almost always good to leave this enabled. In previous versions of
  848. * MediaWiki, some users set this to false to allow images to be added to the
  849. * wiki by simply copying them into $wgUploadDirectory and then running
  850. * maintenance/rebuildImages.php to register them in the database. This is no
  851. * longer recommended, use maintenance/importImages.php instead.
  852. *
  853. * @note That this variable may be ignored if $wgLocalFileRepo is set.
  854. * @todo Deprecate the setting and ultimately remove it from Core.
  855. */
  856. $wgHashedUploadDirectory = true;
  857. /**
  858. * This is the list of preferred extensions for uploading files. Uploading files
  859. * with extensions not in this list will trigger a warning.
  860. *
  861. * @warning If you add any OpenOffice or Microsoft Office file formats here,
  862. * such as odt or doc, and untrusted users are allowed to upload files, then
  863. * your wiki will be vulnerable to cross-site request forgery (CSRF).
  864. */
  865. $wgFileExtensions = [ 'png', 'gif', 'jpg', 'jpeg', 'webp' ];
  866. /**
  867. * Files with these extensions will never be allowed as uploads.
  868. * An array of file extensions to blacklist. You should append to this array
  869. * if you want to blacklist additional files.
  870. */
  871. $wgFileBlacklist = [
  872. # HTML may contain cookie-stealing JavaScript and web bugs
  873. 'html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht',
  874. # PHP scripts may execute arbitrary code on the server
  875. 'php', 'phtml', 'php3', 'php4', 'php5', 'phps', 'phar',
  876. # Other types that may be interpreted by some servers
  877. 'shtml', 'jhtml', 'pl', 'py', 'cgi',
  878. # May contain harmful executables for Windows victims
  879. 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' ];
  880. /**
  881. * Files with these MIME types will never be allowed as uploads
  882. * if $wgVerifyMimeType is enabled.
  883. */
  884. $wgMimeTypeBlacklist = [
  885. # HTML may contain cookie-stealing JavaScript and web bugs
  886. 'text/html', 'text/javascript', 'text/x-javascript', 'application/x-shellscript',
  887. # PHP scripts may execute arbitrary code on the server
  888. 'application/x-php', 'text/x-php',
  889. # Other types that may be interpreted by some servers
  890. 'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh',
  891. # Client-side hazards on Internet Explorer
  892. 'text/scriptlet', 'application/x-msdownload',
  893. # Windows metafile, client-side vulnerability on some systems
  894. 'application/x-msmetafile',
  895. ];
  896. /**
  897. * Allow Java archive uploads.
  898. * This is not recommended for public wikis since a maliciously-constructed
  899. * applet running on the same domain as the wiki can steal the user's cookies.
  900. */
  901. $wgAllowJavaUploads = false;
  902. /**
  903. * This is a flag to determine whether or not to check file extensions on upload.
  904. *
  905. * @warning Setting this to false is insecure for public wikis.
  906. */
  907. $wgCheckFileExtensions = true;
  908. /**
  909. * If this is turned off, users may override the warning for files not covered
  910. * by $wgFileExtensions.
  911. *
  912. * @warning Setting this to false is insecure for public wikis.
  913. */
  914. $wgStrictFileExtensions = true;
  915. /**
  916. * Setting this to true will disable the upload system's checks for HTML/JavaScript.
  917. *
  918. * @warning THIS IS VERY DANGEROUS on a publicly editable site, so USE
  919. * $wgGroupPermissions TO RESTRICT UPLOADING to only those that you trust
  920. */
  921. $wgDisableUploadScriptChecks = false;
  922. /**
  923. * Warn if uploaded files are larger than this (in bytes), or false to disable
  924. */
  925. $wgUploadSizeWarning = false;
  926. /**
  927. * list of trusted media-types and MIME types.
  928. * Use the MEDIATYPE_xxx constants to represent media types.
  929. * This list is used by File::isSafeFile
  930. *
  931. * Types not listed here will have a warning about unsafe content
  932. * displayed on the images description page. It would also be possible
  933. * to use this for further restrictions, like disabling direct
  934. * [[media:...]] links for non-trusted formats.
  935. */
  936. $wgTrustedMediaFormats = [
  937. MEDIATYPE_BITMAP, // all bitmap formats
  938. MEDIATYPE_AUDIO, // all audio formats
  939. MEDIATYPE_VIDEO, // all plain video formats
  940. "image/svg+xml", // svg (only needed if inline rendering of svg is not supported)
  941. "application/pdf", // PDF files
  942. # "application/x-shockwave-flash", //flash/shockwave movie
  943. ];
  944. /**
  945. * Plugins for media file type handling.
  946. * Each entry in the array maps a MIME type to a class name
  947. *
  948. * Core media handlers are listed in MediaHandlerFactory,
  949. * and extensions should use extension.json.
  950. */
  951. $wgMediaHandlers = [];
  952. /**
  953. * Media handler overrides for parser tests (they don't need to generate actual
  954. * thumbnails, so a mock will do)
  955. */
  956. $wgParserTestMediaHandlers = [
  957. 'image/jpeg' => 'MockBitmapHandler',
  958. 'image/png' => 'MockBitmapHandler',
  959. 'image/gif' => 'MockBitmapHandler',
  960. 'image/tiff' => 'MockBitmapHandler',
  961. 'image/webp' => 'MockBitmapHandler',
  962. 'image/x-ms-bmp' => 'MockBitmapHandler',
  963. 'image/x-bmp' => 'MockBitmapHandler',
  964. 'image/x-xcf' => 'MockBitmapHandler',
  965. 'image/svg+xml' => 'MockSvgHandler',
  966. 'image/vnd.djvu' => 'MockDjVuHandler',
  967. ];
  968. /**
  969. * Plugins for page content model handling.
  970. * Each entry in the array maps a model id to a class name or callback
  971. * that creates an instance of the appropriate ContentHandler subclass.
  972. *
  973. * @since 1.21
  974. */
  975. $wgContentHandlers = [
  976. // the usual case
  977. CONTENT_MODEL_WIKITEXT => WikitextContentHandler::class,
  978. // dumb version, no syntax highlighting
  979. CONTENT_MODEL_JAVASCRIPT => JavaScriptContentHandler::class,
  980. // simple implementation, for use by extensions, etc.
  981. CONTENT_MODEL_JSON => JsonContentHandler::class,
  982. // dumb version, no syntax highlighting
  983. CONTENT_MODEL_CSS => CssContentHandler::class,
  984. // plain text, for use by extensions, etc.
  985. CONTENT_MODEL_TEXT => TextContentHandler::class,
  986. ];
  987. /**
  988. * Whether to enable server-side image thumbnailing. If false, images will
  989. * always be sent to the client in full resolution, with appropriate width= and
  990. * height= attributes on the <img> tag for the client to do its own scaling.
  991. */
  992. $wgUseImageResize = true;
  993. /**
  994. * Resizing can be done using PHP's internal image libraries or using
  995. * ImageMagick or another third-party converter, e.g. GraphicMagick.
  996. * These support more file formats than PHP, which only supports PNG,
  997. * GIF, JPG, XBM and WBMP.
  998. *
  999. * Use Image Magick instead of PHP builtin functions.
  1000. */
  1001. $wgUseImageMagick = false;
  1002. /**
  1003. * The convert command shipped with ImageMagick
  1004. */
  1005. $wgImageMagickConvertCommand = '/usr/bin/convert';
  1006. /**
  1007. * Array of max pixel areas for interlacing per MIME type
  1008. * @since 1.27
  1009. */
  1010. $wgMaxInterlacingAreas = [];
  1011. /**
  1012. * Sharpening parameter to ImageMagick
  1013. */
  1014. $wgSharpenParameter = '0x0.4';
  1015. /**
  1016. * Reduction in linear dimensions below which sharpening will be enabled
  1017. */
  1018. $wgSharpenReductionThreshold = 0.85;
  1019. /**
  1020. * Temporary directory used for ImageMagick. The directory must exist. Leave
  1021. * this set to false to let ImageMagick decide for itself.
  1022. */
  1023. $wgImageMagickTempDir = false;
  1024. /**
  1025. * Use another resizing converter, e.g. GraphicMagick
  1026. * %s will be replaced with the source path, %d with the destination
  1027. * %w and %h will be replaced with the width and height.
  1028. *
  1029. * @par Example for GraphicMagick:
  1030. * @code
  1031. * $wgCustomConvertCommand = "gm convert %s -resize %wx%h %d"
  1032. * @endcode
  1033. *
  1034. * Leave as false to skip this.
  1035. */
  1036. $wgCustomConvertCommand = false;
  1037. /**
  1038. * used for lossless jpeg rotation
  1039. *
  1040. * @since 1.21
  1041. */
  1042. $wgJpegTran = '/usr/bin/jpegtran';
  1043. /**
  1044. * At default setting of 'yuv420', JPEG thumbnails will use 4:2:0 chroma
  1045. * subsampling to reduce file size, at the cost of possible color fringing
  1046. * at sharp edges.
  1047. *
  1048. * See https://en.wikipedia.org/wiki/Chroma_subsampling
  1049. *
  1050. * Supported values:
  1051. * false - use scaling system's default (same as pre-1.27 behavior)
  1052. * 'yuv444' - luma and chroma at same resolution
  1053. * 'yuv422' - chroma at 1/2 resolution horizontally, full vertically
  1054. * 'yuv420' - chroma at 1/2 resolution in both dimensions
  1055. *
  1056. * This setting is currently supported only for the ImageMagick backend;
  1057. * others may default to 4:2:0 or 4:4:4 or maintaining the source file's
  1058. * sampling in the thumbnail.
  1059. *
  1060. * @since 1.27
  1061. */
  1062. $wgJpegPixelFormat = 'yuv420';
  1063. /**
  1064. * When scaling a JPEG thumbnail, this is the quality we request
  1065. * from the backend. It should be an int between 1 and 100,
  1066. * with 100 indicating 100% quality.
  1067. *
  1068. * @since 1.32
  1069. */
  1070. $wgJpegQuality = 80;
  1071. /**
  1072. * Some tests and extensions use exiv2 to manipulate the Exif metadata in some
  1073. * image formats.
  1074. */
  1075. $wgExiv2Command = '/usr/bin/exiv2';
  1076. /**
  1077. * Path to exiftool binary. Used for lossless ICC profile swapping.
  1078. *
  1079. * @since 1.26
  1080. */
  1081. $wgExiftool = '/usr/bin/exiftool';
  1082. /**
  1083. * Scalable Vector Graphics (SVG) may be uploaded as images.
  1084. * Since SVG support is not yet standard in browsers, it is
  1085. * necessary to rasterize SVGs to PNG as a fallback format.
  1086. *
  1087. * An external program is required to perform this conversion.
  1088. * If set to an array, the first item is a PHP callable and any further items
  1089. * are passed as parameters after $srcPath, $dstPath, $width, $height
  1090. */
  1091. $wgSVGConverters = [
  1092. 'ImageMagick' =>
  1093. '$path/convert -background "#ffffff00" -thumbnail $widthx$height\! $input PNG:$output',
  1094. 'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
  1095. 'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
  1096. 'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d '
  1097. . '$output $input',
  1098. 'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input',
  1099. 'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
  1100. 'ImagickExt' => [ 'SvgHandler::rasterizeImagickExt' ],
  1101. ];
  1102. /**
  1103. * Pick a converter defined in $wgSVGConverters
  1104. */
  1105. $wgSVGConverter = 'ImageMagick';
  1106. /**
  1107. * If not in the executable PATH, specify the SVG converter path.
  1108. */
  1109. $wgSVGConverterPath = '';
  1110. /**
  1111. * Don't scale a SVG larger than this
  1112. */
  1113. $wgSVGMaxSize = 5120;
  1114. /**
  1115. * Don't read SVG metadata beyond this point.
  1116. * Default is 1024*256 bytes
  1117. */
  1118. $wgSVGMetadataCutoff = 262144;
  1119. /**
  1120. * Obsolete, no longer used.
  1121. * SVG file uploads now always allow <title> elements.
  1122. *
  1123. * @deprecated 1.34
  1124. */
  1125. $wgAllowTitlesInSVG = true;
  1126. /**
  1127. * Whether thumbnails should be generated in target language (usually, same as
  1128. * page language), if available.
  1129. * Currently, applies only to SVG images that use the systemLanguage attribute
  1130. * to specify text language.
  1131. *
  1132. * @since 1.33
  1133. */
  1134. $wgMediaInTargetLanguage = true;
  1135. /**
  1136. * The maximum number of pixels a source image can have if it is to be scaled
  1137. * down by a scaler that requires the full source image to be decompressed
  1138. * and stored in decompressed form, before the thumbnail is generated.
  1139. *
  1140. * This provides a limit on memory usage for the decompression side of the
  1141. * image scaler. The limit is used when scaling PNGs with any of the
  1142. * built-in image scalers, such as ImageMagick or GD. It is ignored for
  1143. * JPEGs with ImageMagick, and when using the VipsScaler extension.
  1144. *
  1145. * The default is 50 MB if decompressed to RGBA form, which corresponds to
  1146. * 12.5 million pixels or 3500x3500.
  1147. */
  1148. $wgMaxImageArea = 1.25e7;
  1149. /**
  1150. * Force thumbnailing of animated GIFs above this size to a single
  1151. * frame instead of an animated thumbnail. As of MW 1.17 this limit
  1152. * is checked against the total size of all frames in the animation.
  1153. * It probably makes sense to keep this equal to $wgMaxImageArea.
  1154. */
  1155. $wgMaxAnimatedGifArea = 1.25e7;
  1156. /**
  1157. * Browsers don't support TIFF inline generally...
  1158. * For inline display, we need to convert to PNG or JPEG.
  1159. * Note scaling should work with ImageMagick, but may not with GD scaling.
  1160. *
  1161. * @par Example:
  1162. * @code
  1163. * // PNG is lossless, but inefficient for photos
  1164. * $wgTiffThumbnailType = [ 'png', 'image/png' ];
  1165. * // JPEG is good for photos, but has no transparency support. Bad for diagrams.
  1166. * $wgTiffThumbnailType = [ 'jpg', 'image/jpeg' ];
  1167. * @endcode
  1168. */
  1169. $wgTiffThumbnailType = [];
  1170. /**
  1171. * If rendered thumbnail files are older than this timestamp, they
  1172. * will be rerendered on demand as if the file didn't already exist.
  1173. * Update if there is some need to force thumbs and SVG rasterizations
  1174. * to rerender, such as fixes to rendering bugs.
  1175. */
  1176. $wgThumbnailEpoch = '20030516000000';
  1177. /**
  1178. * Certain operations are avoided if there were too many recent failures,
  1179. * for example, thumbnail generation. Bump this value to invalidate all
  1180. * memory of failed operations and thus allow further attempts to resume.
  1181. * This is useful when a cause for the failures has been found and fixed.
  1182. */
  1183. $wgAttemptFailureEpoch = 1;
  1184. /**
  1185. * If set, inline scaled images will still produce "<img>" tags ready for
  1186. * output instead of showing an error message.
  1187. *
  1188. * This may be useful if errors are transitory, especially if the site
  1189. * is configured to automatically render thumbnails on request.
  1190. *
  1191. * On the other hand, it may obscure error conditions from debugging.
  1192. * Enable the debug log or the 'thumbnail' log group to make sure errors
  1193. * are logged to a file for review.
  1194. */
  1195. $wgIgnoreImageErrors = false;
  1196. /**
  1197. * Allow thumbnail rendering on page view. If this is false, a valid
  1198. * thumbnail URL is still output, but no file will be created at
  1199. * the target location. This may save some time if you have a
  1200. * thumb.php or 404 handler set up which is faster than the regular
  1201. * webserver(s).
  1202. */
  1203. $wgGenerateThumbnailOnParse = true;
  1204. /**
  1205. * Show thumbnails for old images on the image description page
  1206. */
  1207. $wgShowArchiveThumbnails = true;
  1208. /**
  1209. * If set to true, images that contain certain the exif orientation tag will
  1210. * be rotated accordingly. If set to null, try to auto-detect whether a scaler
  1211. * is available that can rotate.
  1212. */
  1213. $wgEnableAutoRotation = null;
  1214. /**
  1215. * Internal name of virus scanner. This serves as a key to the
  1216. * $wgAntivirusSetup array. Set this to NULL to disable virus scanning. If not
  1217. * null, every file uploaded will be scanned for viruses.
  1218. */
  1219. $wgAntivirus = null;
  1220. /**
  1221. * Configuration for different virus scanners. This an associative array of
  1222. * associative arrays. It contains one setup array per known scanner type.
  1223. * The entry is selected by $wgAntivirus, i.e.
  1224. * valid values for $wgAntivirus are the keys defined in this array.
  1225. *
  1226. * The configuration array for each scanner contains the following keys:
  1227. * "command", "codemap", "messagepattern":
  1228. *
  1229. * "command" is the full command to call the virus scanner - %f will be
  1230. * replaced with the name of the file to scan. If not present, the filename
  1231. * will be appended to the command. Note that this must be overwritten if the
  1232. * scanner is not in the system path; in that case, please set
  1233. * $wgAntivirusSetup[$wgAntivirus]['command'] to the desired command with full
  1234. * path.
  1235. *
  1236. * "codemap" is a mapping of exit code to return codes of the detectVirus
  1237. * function in SpecialUpload.
  1238. * - An exit code mapped to AV_SCAN_FAILED causes the function to consider
  1239. * the scan to be failed. This will pass the file if $wgAntivirusRequired
  1240. * is not set.
  1241. * - An exit code mapped to AV_SCAN_ABORTED causes the function to consider
  1242. * the file to have an unsupported format, which is probably immune to
  1243. * viruses. This causes the file to pass.
  1244. * - An exit code mapped to AV_NO_VIRUS will cause the file to pass, meaning
  1245. * no virus was found.
  1246. * - All other codes (like AV_VIRUS_FOUND) will cause the function to report
  1247. * a virus.
  1248. * - You may use "*" as a key in the array to catch all exit codes not mapped otherwise.
  1249. *
  1250. * "messagepattern" is a perl regular expression to extract the meaningful part of the scanners
  1251. * output. The relevant part should be matched as group one (\1).
  1252. * If not defined or the pattern does not match, the full message is shown to the user.
  1253. */
  1254. $wgAntivirusSetup = [
  1255. # setup for clamav
  1256. 'clamav' => [
  1257. 'command' => 'clamscan --no-summary ',
  1258. 'codemap' => [
  1259. "0" => AV_NO_VIRUS, # no virus
  1260. "1" => AV_VIRUS_FOUND, # virus found
  1261. "52" => AV_SCAN_ABORTED, # unsupported file format (probably immune)
  1262. "*" => AV_SCAN_FAILED, # else scan failed
  1263. ],
  1264. 'messagepattern' => '/.*?:(.*)/sim',
  1265. ],
  1266. ];
  1267. /**
  1268. * Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected.
  1269. */
  1270. $wgAntivirusRequired = true;
  1271. /**
  1272. * Determines if the MIME type of uploaded files should be checked
  1273. */
  1274. $wgVerifyMimeType = true;
  1275. /**
  1276. * Determines whether extra checks for IE type detection should be applied.
  1277. * This is a conservative check for exactly what IE 6 or so checked for,
  1278. * and shouldn't trigger on for instance JPEG files containing links in EXIF
  1279. * metadata.
  1280. *
  1281. * @since 1.34
  1282. */
  1283. $wgVerifyMimeTypeIE = true;
  1284. /**
  1285. * Sets the MIME type definition file to use by includes/libs/mime/MimeAnalyzer.php.
  1286. * Set to null, to use built-in defaults only.
  1287. * example: $wgMimeTypeFile = '/etc/mime.types';
  1288. */
  1289. $wgMimeTypeFile = 'includes/mime.types';
  1290. /**
  1291. * Sets the MIME type info file to use by includes/libs/mime/MimeAnalyzer.php.
  1292. * Set to null, to use built-in defaults only.
  1293. */
  1294. $wgMimeInfoFile = 'includes/mime.info';
  1295. /**
  1296. * Sets an external MIME detector program. The command must print only
  1297. * the MIME type to standard output.
  1298. * The name of the file to process will be appended to the command given here.
  1299. * If not set or NULL, PHP's mime_content_type function will be used.
  1300. *
  1301. * @par Example:
  1302. * @code
  1303. * #$wgMimeDetectorCommand = "file -bi"; # use external MIME detector (Linux)
  1304. * @endcode
  1305. */
  1306. $wgMimeDetectorCommand = null;
  1307. /**
  1308. * Switch for trivial MIME detection. Used by thumb.php to disable all fancy
  1309. * things, because only a few types of images are needed and file extensions
  1310. * can be trusted.
  1311. */
  1312. $wgTrivialMimeDetection = false;
  1313. /**
  1314. * Additional XML types we can allow via MIME-detection.
  1315. * array = [ 'rootElement' => 'associatedMimeType' ]
  1316. */
  1317. $wgXMLMimeTypes = [
  1318. 'http://www.w3.org/2000/svg:svg' => 'image/svg+xml',
  1319. 'svg' => 'image/svg+xml',
  1320. 'http://www.lysator.liu.se/~alla/dia/:diagram' => 'application/x-dia-diagram',
  1321. 'http://www.w3.org/1999/xhtml:html' => 'text/html', // application/xhtml+xml?
  1322. 'html' => 'text/html', // application/xhtml+xml?
  1323. ];
  1324. /**
  1325. * Limit images on image description pages to a user-selectable limit. In order
  1326. * to reduce disk usage, limits can only be selected from a list.
  1327. * The user preference is saved as an array offset in the database, by default
  1328. * the offset is set with $wgDefaultUserOptions['imagesize']. Make sure you
  1329. * change it if you alter the array (see T10858).
  1330. * This is the list of settings the user can choose from:
  1331. */
  1332. $wgImageLimits = [
  1333. [ 320, 240 ],
  1334. [ 640, 480 ],
  1335. [ 800, 600 ],
  1336. [ 1024, 768 ],
  1337. [ 1280, 1024 ]
  1338. ];
  1339. /**
  1340. * Adjust thumbnails on image pages according to a user setting. In order to
  1341. * reduce disk usage, the values can only be selected from a list. This is the
  1342. * list of settings the user can choose from:
  1343. */
  1344. $wgThumbLimits = [
  1345. 120,
  1346. 150,
  1347. 180,
  1348. 200,
  1349. 250,
  1350. 300
  1351. ];
  1352. /**
  1353. * When defined, is an array of image widths used as buckets for thumbnail generation.
  1354. * The goal is to save resources by generating thumbnails based on reference buckets instead of
  1355. * always using the original. This will incur a speed gain but cause a quality loss.
  1356. *
  1357. * The buckets generation is chained, with each bucket generated based on the above bucket
  1358. * when possible. File handlers have to opt into using that feature. For now only BitmapHandler
  1359. * supports it.
  1360. */
  1361. $wgThumbnailBuckets = null;
  1362. /**
  1363. * When using thumbnail buckets as defined above, this sets the minimum distance to the bucket
  1364. * above the requested size. The distance represents how many extra pixels of width the bucket
  1365. * needs in order to be used as the reference for a given thumbnail. For example, with the
  1366. * following buckets:
  1367. *
  1368. * $wgThumbnailBuckets = [ 128, 256, 512 ];
  1369. *
  1370. * and a distance of 50:
  1371. *
  1372. * $wgThumbnailMinimumBucketDistance = 50;
  1373. *
  1374. * If we want to render a thumbnail of width 220px, the 512px bucket will be used,
  1375. * because 220 + 50 = 270 and the closest bucket bigger than 270px is 512.
  1376. */
  1377. $wgThumbnailMinimumBucketDistance = 50;
  1378. /**
  1379. * When defined, is an array of thumbnail widths to be rendered at upload time. The idea is to
  1380. * prerender common thumbnail sizes, in order to avoid the necessity to render them on demand, which
  1381. * has a performance impact for the first client to view a certain size.
  1382. *
  1383. * This obviously means that more disk space is needed per upload upfront.
  1384. *
  1385. * @since 1.25
  1386. */
  1387. $wgUploadThumbnailRenderMap = [];
  1388. /**
  1389. * The method through which the thumbnails will be prerendered for the entries in
  1390. * $wgUploadThumbnailRenderMap
  1391. *
  1392. * The method can be either "http" or "jobqueue". The former uses an http request to hit the
  1393. * thumbnail's URL.
  1394. * This method only works if thumbnails are configured to be rendered by a 404 handler. The latter
  1395. * option uses the job queue to render the thumbnail.
  1396. *
  1397. * @since 1.25
  1398. */
  1399. $wgUploadThumbnailRenderMethod = 'jobqueue';
  1400. /**
  1401. * When using the "http" wgUploadThumbnailRenderMethod, lets one specify a custom Host HTTP header.
  1402. *
  1403. * @since 1.25
  1404. */
  1405. $wgUploadThumbnailRenderHttpCustomHost = false;
  1406. /**
  1407. * When using the "http" wgUploadThumbnailRenderMethod, lets one specify a custom domain to send the
  1408. * HTTP request to.
  1409. *
  1410. * @since 1.25
  1411. */
  1412. $wgUploadThumbnailRenderHttpCustomDomain = false;
  1413. /**
  1414. * When this variable is true and JPGs use the sRGB ICC profile, swaps it for the more lightweight
  1415. * (and free) TinyRGB profile when generating thumbnails.
  1416. *
  1417. * @since 1.26
  1418. */
  1419. $wgUseTinyRGBForJPGThumbnails = false;
  1420. /**
  1421. * Parameters for the "<gallery>" tag.
  1422. * Fields are:
  1423. * - imagesPerRow: Default number of images per-row in the gallery. 0 -> Adapt to screensize
  1424. * - imageWidth: Width of the cells containing images in galleries (in "px")
  1425. * - imageHeight: Height of the cells containing images in galleries (in "px")
  1426. * - captionLength: Length to truncate filename to in caption when using "showfilename".
  1427. * A value of 'true' will truncate the filename to one line using CSS
  1428. * and will be the behaviour after deprecation.
  1429. * @deprecated since 1.28
  1430. * - showBytes: Show the filesize in bytes in categories
  1431. * - showDimensions: Show the dimensions (width x height) in categories
  1432. * - mode: Gallery mode
  1433. */
  1434. $wgGalleryOptions = [];
  1435. /**
  1436. * Adjust width of upright images when parameter 'upright' is used
  1437. * This allows a nicer look for upright images without the need to fix the width
  1438. * by hardcoded px in wiki sourcecode.
  1439. */
  1440. $wgThumbUpright = 0.75;
  1441. /**
  1442. * Default value for chmoding of new directories.
  1443. */
  1444. $wgDirectoryMode = 0777;
  1445. /**
  1446. * Generate and use thumbnails suitable for screens with 1.5 and 2.0 pixel densities.
  1447. *
  1448. * This means a 320x240 use of an image on the wiki will also generate 480x360 and 640x480
  1449. * thumbnails, output via the srcset attribute.
  1450. */
  1451. $wgResponsiveImages = true;
  1452. /**
  1453. * @name DJVU settings
  1454. * @{
  1455. */
  1456. /**
  1457. * Path of the djvudump executable
  1458. * Enable this and $wgDjvuRenderer to enable djvu rendering
  1459. * example: $wgDjvuDump = 'djvudump';
  1460. */
  1461. $wgDjvuDump = null;
  1462. /**
  1463. * Path of the ddjvu DJVU renderer
  1464. * Enable this and $wgDjvuDump to enable djvu rendering
  1465. * example: $wgDjvuRenderer = 'ddjvu';
  1466. */
  1467. $wgDjvuRenderer = null;
  1468. /**
  1469. * Path of the djvutxt DJVU text extraction utility
  1470. * Enable this and $wgDjvuDump to enable text layer extraction from djvu files
  1471. * example: $wgDjvuTxt = 'djvutxt';
  1472. */
  1473. $wgDjvuTxt = null;
  1474. /**
  1475. * Path of the djvutoxml executable
  1476. * This works like djvudump except much, much slower as of version 3.5.
  1477. *
  1478. * For now we recommend you use djvudump instead. The djvuxml output is
  1479. * probably more stable, so we'll switch back to it as soon as they fix
  1480. * the efficiency problem.
  1481. * https://sourceforge.net/tracker/index.php?func=detail&aid=1704049&group_id=32953&atid=406583
  1482. *
  1483. * @par Example:
  1484. * @code
  1485. * $wgDjvuToXML = 'djvutoxml';
  1486. * @endcode
  1487. */
  1488. $wgDjvuToXML = null;
  1489. /**
  1490. * Shell command for the DJVU post processor
  1491. * Default: pnmtojpeg, since ddjvu generates ppm output
  1492. * Set this to false to output the ppm file directly.
  1493. */
  1494. $wgDjvuPostProcessor = 'pnmtojpeg';
  1495. /**
  1496. * File extension for the DJVU post processor output
  1497. */
  1498. $wgDjvuOutputExtension = 'jpg';
  1499. /** @} */ # end of DJvu }
  1500. /** @} */ # end of file uploads }
  1501. /************************************************************************//**
  1502. * @name Email settings
  1503. * @{
  1504. */
  1505. /**
  1506. * Site admin email address.
  1507. *
  1508. * Defaults to "wikiadmin@$wgServerName" (in Setup.php).
  1509. */
  1510. $wgEmergencyContact = false;
  1511. /**
  1512. * Sender email address for e-mail notifications.
  1513. *
  1514. * The address we use as sender when a user requests a password reminder,
  1515. * as well as other e-mail notifications.
  1516. *
  1517. * Defaults to "apache@$wgServerName" (in Setup.php).
  1518. */
  1519. $wgPasswordSender = false;
  1520. /**
  1521. * Reply-To address for e-mail notifications.
  1522. *
  1523. * Defaults to $wgPasswordSender (in Setup.php).
  1524. */
  1525. $wgNoReplyAddress = false;
  1526. /**
  1527. * Set to true to enable the e-mail basic features:
  1528. * Password reminders, etc. If sending e-mail on your
  1529. * server doesn't work, you might want to disable this.
  1530. */
  1531. $wgEnableEmail = true;
  1532. /**
  1533. * Set to true to enable user-to-user e-mail.
  1534. * This can potentially be abused, as it's hard to track.
  1535. */
  1536. $wgEnableUserEmail = true;
  1537. /**
  1538. * Set to true to enable the Special Mute page. This allows users
  1539. * to mute unwanted communications from other users, and is linked
  1540. * to from emails originating from Special:Email.
  1541. *
  1542. * @since 1.34
  1543. * @deprecated 1.34
  1544. */
  1545. $wgEnableSpecialMute = false;
  1546. /**
  1547. * Set to true to enable user-to-user e-mail blacklist.
  1548. *
  1549. * @since 1.30
  1550. */
  1551. $wgEnableUserEmailBlacklist = false;
  1552. /**
  1553. * If true put the sending user's email in a Reply-To header
  1554. * instead of From (false). ($wgPasswordSender will be used as From.)
  1555. *
  1556. * Some mailers (eg SMTP) set the SMTP envelope sender to the From value,
  1557. * which can cause problems with SPF validation and leak recipient addresses
  1558. * when bounces are sent to the sender. In addition, DMARC restrictions
  1559. * can cause emails to fail to be received when false.
  1560. */
  1561. $wgUserEmailUseReplyTo = true;
  1562. /**
  1563. * Minimum time, in hours, which must elapse between password reminder
  1564. * emails for a given account. This is to prevent abuse by mail flooding.
  1565. */
  1566. $wgPasswordReminderResendTime = 24;
  1567. /**
  1568. * The time, in seconds, when an emailed temporary password expires.
  1569. */
  1570. $wgNewPasswordExpiry = 3600 * 24 * 7;
  1571. /**
  1572. * The time, in seconds, when an email confirmation email expires
  1573. */
  1574. $wgUserEmailConfirmationTokenExpiry = 7 * 24 * 60 * 60;
  1575. /**
  1576. * The number of days that a user's password is good for. After this number of days, the
  1577. * user will be asked to reset their password. Set to false to disable password expiration.
  1578. */
  1579. $wgPasswordExpirationDays = false;
  1580. /**
  1581. * If a user's password is expired, the number of seconds when they can still login,
  1582. * and cancel their password change, but are sent to the password change form on each login.
  1583. */
  1584. $wgPasswordExpireGrace = 3600 * 24 * 7; // 7 days
  1585. /**
  1586. * SMTP Mode.
  1587. *
  1588. * For using a direct (authenticated) SMTP server connection.
  1589. * Default to false or fill an array :
  1590. *
  1591. * @code
  1592. * $wgSMTP = [
  1593. * 'host' => 'SMTP domain',
  1594. * 'IDHost' => 'domain for MessageID',
  1595. * 'port' => '25',
  1596. * 'auth' => [true|false],
  1597. * 'username' => [SMTP username],
  1598. * 'password' => [SMTP password],
  1599. * ];
  1600. * @endcode
  1601. */
  1602. $wgSMTP = false;
  1603. /**
  1604. * Additional email parameters, will be passed as the last argument to mail() call.
  1605. */
  1606. $wgAdditionalMailParams = null;
  1607. /**
  1608. * For parts of the system that have been updated to provide HTML email content, send
  1609. * both text and HTML parts as the body of the email
  1610. */
  1611. $wgAllowHTMLEmail = false;
  1612. /**
  1613. * Allow sending of e-mail notifications with the editor's address as sender.
  1614. *
  1615. * This setting depends on $wgEnotifRevealEditorAddress also being enabled.
  1616. * If both are enabled, notifications for actions from users that have opted-in,
  1617. * will be sent to other users with their address as "From" instead of "Reply-To".
  1618. *
  1619. * If disabled, or not opted-in, notifications come from $wgPasswordSender.
  1620. *
  1621. * @var bool
  1622. */
  1623. $wgEnotifFromEditor = false;
  1624. // TODO move UPO to preferences probably ?
  1625. # If set to true, users get a corresponding option in their preferences and can choose to
  1626. # enable or disable at their discretion
  1627. # If set to false, the corresponding input form on the user preference page is suppressed
  1628. # It call this to be a "user-preferences-option (UPO)"
  1629. /**
  1630. * Require email authentication before sending mail to an email address.
  1631. * This is highly recommended. It prevents MediaWiki from being used as an open
  1632. * spam relay.
  1633. */
  1634. $wgEmailAuthentication = true;
  1635. /**
  1636. * Allow users to enable email notification ("enotif") on watchlist changes.
  1637. */
  1638. $wgEnotifWatchlist = false;
  1639. /**
  1640. * Allow users to enable email notification ("enotif") when someone edits their
  1641. * user talk page.
  1642. *
  1643. * The owner of the user talk page must also have the 'enotifusertalkpages' user
  1644. * preference set to true.
  1645. */
  1646. $wgEnotifUserTalk = false;
  1647. /**
  1648. * Allow sending of e-mail notifications with the editor's address in "Reply-To".
  1649. *
  1650. * Note, enabling this only actually uses it in notification e-mails if the user
  1651. * opted-in to this feature. This feature flag also controls visibility of the
  1652. * 'enotifrevealaddr' preference, which, if users opt into, will make e-mail
  1653. * notifications about their actions use their address as "Reply-To".
  1654. *
  1655. * To set the address as "From" instead of "Reply-To", also enable $wgEnotifFromEditor.
  1656. *
  1657. * If disabled, or not opted-in, notifications come from $wgPasswordSender.
  1658. *
  1659. * @var bool
  1660. */
  1661. $wgEnotifRevealEditorAddress = false;
  1662. /**
  1663. * Potentially send notification mails on minor edits to pages. This is enabled
  1664. * by default. If this is false, users will never be notified on minor edits.
  1665. *
  1666. * If it is true, editors with the 'nominornewtalk' right (typically bots) will still not
  1667. * trigger notifications for minor edits they make (to any page, not just user talk).
  1668. *
  1669. * Finally, if the watcher/recipient has the 'enotifminoredits' user preference set to
  1670. * false, they will not receive notifications for minor edits.
  1671. *
  1672. * User talk notifications are also affected by $wgEnotifMinorEdits, the above settings,
  1673. * $wgEnotifUserTalk, and the preference described there.
  1674. */
  1675. $wgEnotifMinorEdits = true;
  1676. /**
  1677. * Send a generic mail instead of a personalised mail for each user. This
  1678. * always uses UTC as the time zone, and doesn't include the username.
  1679. *
  1680. * For pages with many users watching, this can significantly reduce mail load.
  1681. * Has no effect when using sendmail rather than SMTP.
  1682. */
  1683. $wgEnotifImpersonal = false;
  1684. /**
  1685. * Maximum number of users to mail at once when using impersonal mail. Should
  1686. * match the limit on your mail server.
  1687. */
  1688. $wgEnotifMaxRecips = 500;
  1689. /**
  1690. * Use real name instead of username in e-mail "from" field.
  1691. */
  1692. $wgEnotifUseRealName = false;
  1693. /**
  1694. * Array of usernames who will be sent a notification email for every change
  1695. * which occurs on a wiki. Users will not be notified of their own changes.
  1696. */
  1697. $wgUsersNotifiedOnAllChanges = [];
  1698. /** @} */ # end of email settings
  1699. /************************************************************************//**
  1700. * @name Database settings
  1701. * @{
  1702. */
  1703. /**
  1704. * Current wiki database name
  1705. *
  1706. * Should be alphanumeric, without spaces nor hyphens.
  1707. * This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain).
  1708. *
  1709. * This should still be set even if $wgLBFactoryConf is configured.
  1710. */
  1711. $wgDBname = 'my_wiki';
  1712. /**
  1713. * Current wiki database schema name
  1714. *
  1715. * Should be alphanumeric, without spaces nor hyphens.
  1716. * This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain).
  1717. *
  1718. * This should still be set even if $wgLBFactoryConf is configured.
  1719. */
  1720. $wgDBmwschema = null;
  1721. /**
  1722. * Current wiki database table name prefix
  1723. *
  1724. * Should be alphanumeric, without spaces nor hyphens, preferably ending in an underscore.
  1725. * This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain).
  1726. *
  1727. * This should still be set even if $wgLBFactoryConf is configured.
  1728. */
  1729. $wgDBprefix = '';
  1730. /**
  1731. * Database host name or IP address
  1732. */
  1733. $wgDBserver = 'localhost';
  1734. /**
  1735. * Database port number (for PostgreSQL and Microsoft SQL Server).
  1736. */
  1737. $wgDBport = 5432;
  1738. /**
  1739. * Database username
  1740. */
  1741. $wgDBuser = 'wikiuser';
  1742. /**
  1743. * Database user's password
  1744. */
  1745. $wgDBpassword = '';
  1746. /**
  1747. * Database type
  1748. */
  1749. $wgDBtype = 'mysql';
  1750. /**
  1751. * Whether to use SSL in DB connection.
  1752. *
  1753. * This setting is only used if $wgLBFactoryConf['class'] is set to
  1754. * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
  1755. * the DBO_SSL flag must be set in the 'flags' option of the database
  1756. * connection to achieve the same functionality.
  1757. */
  1758. $wgDBssl = false;
  1759. /**
  1760. * Whether to use compression in DB connection.
  1761. *
  1762. * This setting is only used $wgLBFactoryConf['class'] is set to
  1763. * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
  1764. * the DBO_COMPRESS flag must be set in the 'flags' option of the database
  1765. * connection to achieve the same functionality.
  1766. */
  1767. $wgDBcompress = false;
  1768. /**
  1769. * Separate username for maintenance tasks. Leave as null to use the default.
  1770. */
  1771. $wgDBadminuser = null;
  1772. /**
  1773. * Separate password for maintenance tasks. Leave as null to use the default.
  1774. */
  1775. $wgDBadminpassword = null;
  1776. /**
  1777. * Search type.
  1778. * Leave as null to select the default search engine for the
  1779. * selected database type (eg SearchMySQL), or set to a class
  1780. * name to override to a custom search engine.
  1781. */
  1782. $wgSearchType = null;
  1783. /**
  1784. * Alternative search types
  1785. * Sometimes you want to support multiple search engines for testing. This
  1786. * allows users to select their search engine of choice via url parameters
  1787. * to Special:Search and the action=search API. If using this, there's no
  1788. * need to add $wgSearchType to it, that is handled automatically.
  1789. */
  1790. $wgSearchTypeAlternatives = null;
  1791. /**
  1792. * MySQL table options to use during installation or update
  1793. */
  1794. $wgDBTableOptions = 'ENGINE=InnoDB, DEFAULT CHARSET=binary';
  1795. /**
  1796. * SQL Mode - default is turning off all modes, including strict, if set.
  1797. * null can be used to skip the setting for performance reasons and assume
  1798. * DBA has done his best job.
  1799. * String override can be used for some additional fun :-)
  1800. */
  1801. $wgSQLMode = '';
  1802. /**
  1803. * Default group to use when getting database connections.
  1804. * Will be used as default query group in ILoadBalancer::getConnection.
  1805. * @since 1.32
  1806. */
  1807. $wgDBDefaultGroup = null;
  1808. /**
  1809. * To override default SQLite data directory ($docroot/../data)
  1810. */
  1811. $wgSQLiteDataDir = '';
  1812. /**
  1813. * Shared database for multiple wikis. Commonly used for storing a user table
  1814. * for single sign-on. The server for this database must be the same as for the
  1815. * main database.
  1816. *
  1817. * For backwards compatibility the shared prefix is set to the same as the local
  1818. * prefix, and the user table is listed in the default list of shared tables.
  1819. * The user_properties table is also added so that users will continue to have their
  1820. * preferences shared (preferences were stored in the user table prior to 1.16)
  1821. *
  1822. * $wgSharedTables may be customized with a list of tables to share in the shared
  1823. * database. However it is advised to limit what tables you do share as many of
  1824. * MediaWiki's tables may have side effects if you try to share them.
  1825. *
  1826. * $wgSharedPrefix is the table prefix for the shared database. It defaults to
  1827. * $wgDBprefix.
  1828. *
  1829. * $wgSharedSchema is the table schema for the shared database. It defaults to
  1830. * $wgDBmwschema.
  1831. *
  1832. * @deprecated since 1.21 In new code, use the $wiki parameter to LBFactory::getMainLB() to
  1833. * access remote databases. Using LBFactory::getMainLB() allows the shared database to
  1834. * reside on separate servers to the wiki's own database, with suitable
  1835. * configuration of $wgLBFactoryConf.
  1836. */
  1837. $wgSharedDB = null;
  1838. /**
  1839. * @see $wgSharedDB
  1840. */
  1841. $wgSharedPrefix = false;
  1842. /**
  1843. * @see $wgSharedDB
  1844. */
  1845. $wgSharedTables = [ 'user', 'user_properties' ];
  1846. /**
  1847. * @see $wgSharedDB
  1848. * @since 1.23
  1849. */
  1850. $wgSharedSchema = false;
  1851. /**
  1852. * Database load balancer
  1853. * This is a two-dimensional array, an array of server info structures
  1854. * Fields are:
  1855. * - host: Host name
  1856. * - dbname: Default database name
  1857. * - user: DB user
  1858. * - password: DB password
  1859. * - type: DB type
  1860. * - driver: DB driver (when there are multiple drivers)
  1861. *
  1862. * - load: Ratio of DB_REPLICA load, must be >=0, the sum of all loads must be >0.
  1863. * If this is zero for any given server, no normal query traffic will be
  1864. * sent to it. It will be excluded from lag checks in maintenance scripts.
  1865. * The only way it can receive traffic is if groupLoads is used.
  1866. *
  1867. * - groupLoads: (optional) Array of load ratios, the key is the query group name. A query
  1868. * may belong to several groups, the most specific group defined here is used.
  1869. *
  1870. * - flags: (optional) Bit field of properties:
  1871. * - DBO_DEFAULT: Transactionalize web requests and use autocommit otherwise
  1872. * - DBO_DEBUG: Equivalent of $wgDebugDumpSql
  1873. * - DBO_SSL: Use TLS connection encryption if available
  1874. * - DBO_COMPRESS: Use protocol compression with database connections
  1875. * - DBO_PERSISTENT: Enables persistent database connections
  1876. *
  1877. * - max lag: (optional) Maximum replication lag before a replica DB goes out of rotation
  1878. * - is static: (optional) Set to true if the dataset is static and no replication is used.
  1879. * - cliMode: (optional) Connection handles will not assume that requests are short-lived
  1880. * nor that INSERT..SELECT can be rewritten into a buffered SELECT and INSERT.
  1881. * This is what DBO_DEFAULT uses to determine when a web request is present.
  1882. * [Default: uses value of $wgCommandLineMode]
  1883. *
  1884. * These and any other user-defined properties will be assigned to the mLBInfo member
  1885. * variable of the Database object.
  1886. *
  1887. * Leave at false to use the single-server variables above. If you set this
  1888. * variable, the single-server variables will generally be ignored (except
  1889. * perhaps in some command-line scripts).
  1890. *
  1891. * The first server listed in this array (with key 0) will be the master. The
  1892. * rest of the servers will be replica DBs. To prevent writes to your replica DBs due to
  1893. * accidental misconfiguration or MediaWiki bugs, set read_only=1 on all your
  1894. * replica DBs in my.cnf. You can set read_only mode at runtime using:
  1895. *
  1896. * @code
  1897. * SET @@read_only=1;
  1898. * @endcode
  1899. *
  1900. * Since the effect of writing to a replica DB is so damaging and difficult to clean
  1901. * up, we at Wikimedia set read_only=1 in my.cnf on all our DB servers, even
  1902. * our masters, and then set read_only=0 on masters at runtime.
  1903. */
  1904. $wgDBservers = false;
  1905. /**
  1906. * Load balancer factory configuration
  1907. * To set up a multi-master wiki farm, set the class here to something that
  1908. * can return a LoadBalancer with an appropriate master on a call to getMainLB().
  1909. * The class identified here is responsible for reading $wgDBservers,
  1910. * $wgDBserver, etc., so overriding it may cause those globals to be ignored.
  1911. *
  1912. * The LBFactoryMulti class is provided for this purpose, please see
  1913. * includes/db/LBFactoryMulti.php for configuration information.
  1914. */
  1915. $wgLBFactoryConf = [ 'class' => \Wikimedia\Rdbms\LBFactorySimple::class ];
  1916. /**
  1917. * After a state-changing request is done by a client, this determines
  1918. * how many seconds that client should keep using the master datacenter.
  1919. * This avoids unexpected stale or 404 responses due to replication lag.
  1920. * @since 1.27
  1921. */
  1922. $wgDataCenterUpdateStickTTL = 10;
  1923. /**
  1924. * File to log database errors to
  1925. */
  1926. $wgDBerrorLog = false;
  1927. /**
  1928. * Timezone to use in the error log.
  1929. * Defaults to the wiki timezone ($wgLocaltimezone).
  1930. *
  1931. * A list of usable timezones can found at:
  1932. * https://www.php.net/manual/en/timezones.php
  1933. *
  1934. * @par Examples:
  1935. * @code
  1936. * $wgDBerrorLogTZ = 'UTC';
  1937. * $wgDBerrorLogTZ = 'GMT';
  1938. * $wgDBerrorLogTZ = 'PST8PDT';
  1939. * $wgDBerrorLogTZ = 'Europe/Sweden';
  1940. * $wgDBerrorLogTZ = 'CET';
  1941. * @endcode
  1942. *
  1943. * @since 1.20
  1944. */
  1945. $wgDBerrorLogTZ = false;
  1946. /**
  1947. * Other wikis on this site, can be administered from a single developer account.
  1948. *
  1949. * @var string[] List of wiki DB domain IDs; the format of each ID consist of 1-3 hyphen
  1950. * delimited alphanumeric components (each with no hyphens nor spaces) of any of the forms:
  1951. * - "<DB NAME>-<DB SCHEMA>-<TABLE PREFIX>"
  1952. * - "<DB NAME>-<TABLE PREFIX>"
  1953. * - "<DB NAME>"
  1954. * If hyphens appear in any of the components, then the domain ID parsing may not work
  1955. * in all cases and site functionality might be affected. If the schema ($wgDBmwschema)
  1956. * is left to the default "mediawiki" for all wikis, then the schema should be omitted
  1957. * from these IDs.
  1958. */
  1959. $wgLocalDatabases = [];
  1960. /**
  1961. * If lag is higher than $wgSlaveLagWarning, show a warning in some special
  1962. * pages (like watchlist). If the lag is higher than $wgSlaveLagCritical,
  1963. * show a more obvious warning.
  1964. */
  1965. $wgSlaveLagWarning = 10;
  1966. /**
  1967. * @see $wgSlaveLagWarning
  1968. */
  1969. $wgSlaveLagCritical = 30;
  1970. /**
  1971. * Use Windows Authentication instead of $wgDBuser / $wgDBpassword for MS SQL Server
  1972. */
  1973. $wgDBWindowsAuthentication = false;
  1974. /** @} */ # End of DB settings }
  1975. /************************************************************************//**
  1976. * @name Text storage
  1977. * @{
  1978. */
  1979. /**
  1980. * We can also compress text stored in the 'text' table. If this is set on, new
  1981. * revisions will be compressed on page save if zlib support is available. Any
  1982. * compressed revisions will be decompressed on load regardless of this setting,
  1983. * but will not be readable at all* if zlib support is not available.
  1984. */
  1985. $wgCompressRevisions = false;
  1986. /**
  1987. * External stores allow including content
  1988. * from non database sources following URL links.
  1989. *
  1990. * Short names of ExternalStore classes may be specified in an array here:
  1991. * @code
  1992. * $wgExternalStores = [ "http","file","custom" ]...
  1993. * @endcode
  1994. *
  1995. * CAUTION: Access to database might lead to code execution
  1996. */
  1997. $wgExternalStores = [];
  1998. /**
  1999. * An array of external MySQL servers.
  2000. *
  2001. * @par Example:
  2002. * Create a cluster named 'cluster1' containing three servers:
  2003. * @code
  2004. * $wgExternalServers = [
  2005. * 'cluster1' => <array in the same format as $wgDBservers>
  2006. * ];
  2007. * @endcode
  2008. *
  2009. * Used by \Wikimedia\Rdbms\LBFactorySimple, may be ignored if $wgLBFactoryConf is set to
  2010. * another class.
  2011. */
  2012. $wgExternalServers = [];
  2013. /**
  2014. * The place to put new revisions, false to put them in the local text table.
  2015. * Part of a URL, e.g. DB://cluster1
  2016. *
  2017. * Can be an array instead of a single string, to enable data distribution. Keys
  2018. * must be consecutive integers, starting at zero.
  2019. *
  2020. * @par Example:
  2021. * @code
  2022. * $wgDefaultExternalStore = [ 'DB://cluster1', 'DB://cluster2' ];
  2023. * @endcode
  2024. *
  2025. * @var array
  2026. */
  2027. $wgDefaultExternalStore = false;
  2028. /**
  2029. * Revision text may be cached in $wgMemc to reduce load on external storage
  2030. * servers and object extraction overhead for frequently-loaded revisions.
  2031. *
  2032. * Set to 0 to disable, or number of seconds before cache expiry.
  2033. */
  2034. $wgRevisionCacheExpiry = 86400 * 7;
  2035. /** @} */ # end text storage }
  2036. /************************************************************************//**
  2037. * @name Performance hacks and limits
  2038. * @{
  2039. */
  2040. /**
  2041. * Disable database-intensive features
  2042. */
  2043. $wgMiserMode = false;
  2044. /**
  2045. * Disable all query pages if miser mode is on, not just some
  2046. */
  2047. $wgDisableQueryPages = false;
  2048. /**
  2049. * Number of rows to cache in 'querycache' table when miser mode is on
  2050. */
  2051. $wgQueryCacheLimit = 1000;
  2052. /**
  2053. * Number of links to a page required before it is deemed "wanted"
  2054. */
  2055. $wgWantedPagesThreshold = 1;
  2056. /**
  2057. * Enable slow parser functions
  2058. */
  2059. $wgAllowSlowParserFunctions = false;
  2060. /**
  2061. * Allow schema updates
  2062. */
  2063. $wgAllowSchemaUpdates = true;
  2064. /**
  2065. * Maximum article size in kilobytes
  2066. */
  2067. $wgMaxArticleSize = 2048;
  2068. /**
  2069. * The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to
  2070. * raise PHP's memory limit if it's below this amount.
  2071. */
  2072. $wgMemoryLimit = "50M";
  2073. /**
  2074. * The minimum amount of time that MediaWiki needs for "slow" write request,
  2075. * particularly ones with multiple non-atomic writes that *should* be as
  2076. * transactional as possible; MediaWiki will call set_time_limit() if needed.
  2077. * @since 1.26
  2078. */
  2079. $wgTransactionalTimeLimit = 120;
  2080. /** @} */ # end performance hacks }
  2081. /************************************************************************//**
  2082. * @name Cache settings
  2083. * @{
  2084. */
  2085. /**
  2086. * Directory for caching data in the local filesystem. Should not be accessible
  2087. * from the web.
  2088. *
  2089. * Note: if multiple wikis share the same localisation cache directory, they
  2090. * must all have the same set of extensions. You can set a directory just for
  2091. * the localisation cache using $wgLocalisationCacheConf['storeDirectory'].
  2092. */
  2093. $wgCacheDirectory = false;
  2094. /**
  2095. * Main cache type. This should be a cache with fast access, but it may have
  2096. * limited space. By default, it is disabled, since the stock database cache
  2097. * is not fast enough to make it worthwhile.
  2098. *
  2099. * The options are:
  2100. *
  2101. * - CACHE_ANYTHING: Use anything, as long as it works
  2102. * - CACHE_NONE: Do not cache
  2103. * - CACHE_DB: Store cache objects in the DB
  2104. * - CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers
  2105. * - CACHE_ACCEL: APC, APCU or WinCache
  2106. * - (other): A string may be used which identifies a cache
  2107. * configuration in $wgObjectCaches.
  2108. *
  2109. * @see $wgMessageCacheType, $wgParserCacheType
  2110. */
  2111. $wgMainCacheType = CACHE_NONE;
  2112. /**
  2113. * The cache type for storing the contents of the MediaWiki namespace. This
  2114. * cache is used for a small amount of data which is expensive to regenerate.
  2115. *
  2116. * For available types see $wgMainCacheType.
  2117. */
  2118. $wgMessageCacheType = CACHE_ANYTHING;
  2119. /**
  2120. * The cache type for storing article HTML. This is used to store data which
  2121. * is expensive to regenerate, and benefits from having plenty of storage space.
  2122. *
  2123. * For available types see $wgMainCacheType.
  2124. */
  2125. $wgParserCacheType = CACHE_ANYTHING;
  2126. /**
  2127. * The cache type for storing session data.
  2128. *
  2129. * For available types see $wgMainCacheType.
  2130. */
  2131. $wgSessionCacheType = CACHE_ANYTHING;
  2132. /**
  2133. * The cache type for storing language conversion tables,
  2134. * which are used when parsing certain text and interface messages.
  2135. *
  2136. * For available types see $wgMainCacheType.
  2137. *
  2138. * @since 1.20
  2139. */
  2140. $wgLanguageConverterCacheType = CACHE_ANYTHING;
  2141. /**
  2142. * Advanced object cache configuration.
  2143. *
  2144. * Use this to define the class names and constructor parameters which are used
  2145. * for the various cache types. Custom cache types may be defined here and
  2146. * referenced from $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType,
  2147. * or $wgLanguageConverterCacheType.
  2148. *
  2149. * The format is an associative array where the key is a cache identifier, and
  2150. * the value is an associative array of parameters. The "class" parameter is the
  2151. * class name which will be used. Alternatively, a "factory" parameter may be
  2152. * given, giving a callable function which will generate a suitable cache object.
  2153. */
  2154. $wgObjectCaches = [
  2155. CACHE_NONE => [ 'class' => EmptyBagOStuff::class, 'reportDupes' => false ],
  2156. CACHE_DB => [ 'class' => SqlBagOStuff::class, 'loggroup' => 'SQLBagOStuff' ],
  2157. CACHE_ANYTHING => [ 'factory' => 'ObjectCache::newAnything' ],
  2158. CACHE_ACCEL => [ 'factory' => 'ObjectCache::getLocalServerInstance' ],
  2159. CACHE_MEMCACHED => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
  2160. 'db-replicated' => [
  2161. 'class' => ReplicatedBagOStuff::class,
  2162. 'readFactory' => [
  2163. 'class' => SqlBagOStuff::class,
  2164. 'args' => [ [ 'replicaOnly' => true ] ]
  2165. ],
  2166. 'writeFactory' => [
  2167. 'class' => SqlBagOStuff::class,
  2168. 'args' => [ [ 'replicaOnly' => false ] ]
  2169. ],
  2170. 'loggroup' => 'SQLBagOStuff',
  2171. 'reportDupes' => false
  2172. ],
  2173. 'apc' => [ 'class' => APCBagOStuff::class, 'reportDupes' => false ],
  2174. 'apcu' => [ 'class' => APCUBagOStuff::class, 'reportDupes' => false ],
  2175. 'wincache' => [ 'class' => WinCacheBagOStuff::class, 'reportDupes' => false ],
  2176. 'memcached-php' => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
  2177. 'memcached-pecl' => [ 'class' => MemcachedPeclBagOStuff::class, 'loggroup' => 'memcached' ],
  2178. 'hash' => [ 'class' => HashBagOStuff::class, 'reportDupes' => false ],
  2179. ];
  2180. /**
  2181. * Main Wide-Area-Network cache type. This should be a cache with fast access,
  2182. * but it may have limited space. By default, it is disabled, since the basic stock
  2183. * cache is not fast enough to make it worthwhile. For single data-center setups, this can
  2184. * simply be pointed to a cache in $wgWANObjectCaches that uses a local $wgObjectCaches
  2185. * cache with a relayer of type EventRelayerNull.
  2186. *
  2187. * The options are:
  2188. * - false: Configure the cache using $wgMainCacheType, without using
  2189. * a relayer (only matters if there are multiple data-centers)
  2190. * - CACHE_NONE: Do not cache
  2191. * - (other): A string may be used which identifies a cache
  2192. * configuration in $wgWANObjectCaches
  2193. * @since 1.26
  2194. */
  2195. $wgMainWANCache = false;
  2196. /**
  2197. * Advanced WAN object cache configuration.
  2198. *
  2199. * Each WAN cache wraps a registered object cache (for the local cluster)
  2200. * and it must also be configured to point to a PubSub instance. Subscribers
  2201. * must be configured to relay purges to the actual cache servers.
  2202. *
  2203. * The format is an associative array where the key is a cache identifier, and
  2204. * the value is an associative array of parameters. The "cacheId" parameter is
  2205. * a cache identifier from $wgObjectCaches. The "loggroup" parameter controls
  2206. * where log events are sent.
  2207. *
  2208. * @since 1.26
  2209. */
  2210. $wgWANObjectCaches = [
  2211. CACHE_NONE => [
  2212. 'class' => WANObjectCache::class,
  2213. 'cacheId' => CACHE_NONE
  2214. ]
  2215. /* Example of a simple single data-center cache:
  2216. 'memcached-php' => [
  2217. 'class' => WANObjectCache::class,
  2218. 'cacheId' => 'memcached-php'
  2219. ]
  2220. */
  2221. ];
  2222. /**
  2223. * Verify and enforce WAN cache purges using reliable DB sources as streams.
  2224. *
  2225. * These secondary cache purges are de-duplicated via simple cache mutexes.
  2226. * This improves consistency when cache purges are lost, which becomes more likely
  2227. * as more cache servers are added or if there are multiple datacenters. Only keys
  2228. * related to important mutable content will be checked.
  2229. *
  2230. * @var bool
  2231. * @since 1.29
  2232. */
  2233. $wgEnableWANCacheReaper = false;
  2234. /**
  2235. * The object store type of the main stash.
  2236. *
  2237. * This store should be a very fast storage system optimized for holding lightweight data
  2238. * like incrementable hit counters and current user activity. The store should replicate the
  2239. * dataset among all data-centers. Any add(), merge(), lock(), and unlock() operations should
  2240. * maintain "best effort" linearizability; as long as connectivity is strong, latency is low,
  2241. * and there is no eviction pressure prompted by low free space, those operations should be
  2242. * linearizable. In terms of PACELC (https://en.wikipedia.org/wiki/PACELC_theorem), the store
  2243. * should act as a PA/EL distributed system for these operations. One optimization for these
  2244. * operations is to route them to a "primary" data-center (e.g. one that serves HTTP POST) for
  2245. * synchronous execution and then replicate to the others asynchronously. This means that at
  2246. * least calls to these operations during HTTP POST requests would quickly return.
  2247. *
  2248. * All other operations, such as get(), set(), delete(), changeTTL(), incr(), and decr(),
  2249. * should be synchronous in the local data-center, replicating asynchronously to the others.
  2250. * This behavior can be overriden by the use of the WRITE_SYNC and READ_LATEST flags.
  2251. *
  2252. * The store should *preferably* have eventual consistency to handle network partitions.
  2253. *
  2254. * Modules that rely on the stash should be prepared for:
  2255. * - add(), merge(), lock(), and unlock() to be slower than other write operations,
  2256. * at least in "secondary" data-centers (e.g. one that only serves HTTP GET/HEAD)
  2257. * - Other write operations to have race conditions accross data-centers
  2258. * - Read operations to have race conditions accross data-centers
  2259. * - Consistency to be either eventual (with Last-Write-Wins) or just "best effort"
  2260. *
  2261. * In general, this means avoiding updates during idempotent HTTP requests (GET/HEAD) and
  2262. * avoiding assumptions of true linearizability (e.g. accepting anomalies). Modules that need
  2263. * these kind of guarantees should use other storage mediums.
  2264. *
  2265. * The options are:
  2266. * - db: Store cache objects in the DB
  2267. * - (other): A string may be used which identifies a cache
  2268. * configuration in $wgObjectCaches
  2269. *
  2270. * @since 1.26
  2271. */
  2272. $wgMainStash = 'db-replicated';
  2273. /**
  2274. * The expiry time for the parser cache, in seconds.
  2275. * The default is 86400 (one day).
  2276. */
  2277. $wgParserCacheExpireTime = 86400;
  2278. /**
  2279. * The expiry time to use for session storage, in seconds.
  2280. */
  2281. $wgObjectCacheSessionExpiry = 3600;
  2282. /**
  2283. * Whether to use PHP session handling ($_SESSION and session_*() functions)
  2284. *
  2285. * If the constant MW_NO_SESSION is defined, this is forced to 'disable'.
  2286. *
  2287. * If the constant MW_NO_SESSION_HANDLER is defined, this is ignored and PHP
  2288. * session handling will function independently of SessionHandler.
  2289. * SessionHandler and PHP's session handling may attempt to override each
  2290. * others' cookies.
  2291. *
  2292. * @since 1.27
  2293. * @var string
  2294. * - 'enable': Integrate with PHP's session handling as much as possible.
  2295. * - 'warn': Integrate but log warnings if anything changes $_SESSION.
  2296. * - 'disable': Throw exceptions if PHP session handling is used.
  2297. */
  2298. $wgPHPSessionHandling = 'enable';
  2299. /**
  2300. * Number of internal PBKDF2 iterations to use when deriving session secrets.
  2301. *
  2302. * @since 1.28
  2303. */
  2304. $wgSessionPbkdf2Iterations = 10001;
  2305. /**
  2306. * The list of MemCached servers and port numbers
  2307. */
  2308. $wgMemCachedServers = [ '127.0.0.1:11211' ];
  2309. /**
  2310. * Use persistent connections to MemCached, which are shared across multiple
  2311. * requests.
  2312. */
  2313. $wgMemCachedPersistent = false;
  2314. /**
  2315. * Read/write timeout for MemCached server communication, in microseconds.
  2316. */
  2317. $wgMemCachedTimeout = 500000;
  2318. /**
  2319. * Set this to true to maintain a copy of the message cache on the local server.
  2320. *
  2321. * This layer of message cache is in addition to the one configured by $wgMessageCacheType.
  2322. *
  2323. * The local copy is put in APC. If APC is not installed, this setting does nothing.
  2324. *
  2325. * Note that this is about the message cache, which stores interface messages
  2326. * maintained as wiki pages. This is separate from the localisation cache for interface
  2327. * messages provided by the software, which is configured by $wgLocalisationCacheConf.
  2328. */
  2329. $wgUseLocalMessageCache = false;
  2330. /**
  2331. * Instead of caching everything, only cache those messages which have
  2332. * been customised in the site content language. This means that
  2333. * MediaWiki:Foo/ja is ignored if MediaWiki:Foo doesn't exist.
  2334. * This option is probably only useful for translatewiki.net.
  2335. */
  2336. $wgAdaptiveMessageCache = false;
  2337. /**
  2338. * Localisation cache configuration.
  2339. *
  2340. * Used by Language::getLocalisationCache() to decide how to construct the
  2341. * LocalisationCache instance. Associative array with keys:
  2342. *
  2343. * class: The class to use for constructing the LocalisationCache object.
  2344. * This may be overridden by extensions to a subclass of LocalisationCache.
  2345. * Sub classes are expected to still honor the 'storeClass', 'storeDirectory'
  2346. * and 'manualRecache' options where applicable.
  2347. *
  2348. * storeClass: Which LCStore class implementation to use. This is optional.
  2349. * The default LocalisationCache class offers the 'store' option
  2350. * as abstraction for this.
  2351. *
  2352. * store: How and where to store localisation cache data.
  2353. * This option is ignored if 'storeClass' is explicitly set to a class name.
  2354. * Must be one of:
  2355. * - 'detect' (default): Automatically select 'files' if 'storeDirectory'
  2356. * or $wgCacheDirectory is set, and fall back to 'db' otherwise.
  2357. * - 'files': Store in $wgCacheDirectory as CDB files.
  2358. * - 'array': Store in $wgCacheDirectory as PHP static array files.
  2359. * - 'db': Store in the l10n_cache database table.
  2360. *
  2361. * storeDirectory: If the selected LCStore class puts its data in files, then it
  2362. * will use this directory. If set to false (default), then
  2363. * $wgCacheDirectory is used instead.
  2364. *
  2365. * manualRecache: Set this to true to disable cache updates on web requests.
  2366. * Use maintenance/rebuildLocalisationCache.php instead.
  2367. */
  2368. $wgLocalisationCacheConf = [
  2369. 'class' => LocalisationCache::class,
  2370. 'store' => 'detect',
  2371. 'storeClass' => false,
  2372. 'storeDirectory' => false,
  2373. 'storeServer' => [],
  2374. 'forceRecache' => false,
  2375. 'manualRecache' => false,
  2376. ];
  2377. /**
  2378. * Allow client-side caching of pages
  2379. */
  2380. $wgCachePages = true;
  2381. /**
  2382. * Set this to current time to invalidate all prior cached pages. Affects both
  2383. * client-side and server-side caching.
  2384. * You can get the current date on your server by using the command:
  2385. * @verbatim
  2386. * date +%Y%m%d%H%M%S
  2387. * @endverbatim
  2388. */
  2389. $wgCacheEpoch = '20030516000000';
  2390. /**
  2391. * Directory where GitInfo will look for pre-computed cache files. If false,
  2392. * $wgCacheDirectory/gitinfo will be used.
  2393. */
  2394. $wgGitInfoCacheDirectory = false;
  2395. /**
  2396. * This will cache static pages for non-logged-in users to reduce
  2397. * database traffic on public sites. ResourceLoader requests to default
  2398. * language and skins are cached as well as single module requests.
  2399. */
  2400. $wgUseFileCache = false;
  2401. /**
  2402. * Depth of the subdirectory hierarchy to be created under
  2403. * $wgFileCacheDirectory. The subdirectories will be named based on
  2404. * the MD5 hash of the title. A value of 0 means all cache files will
  2405. * be put directly into the main file cache directory.
  2406. */
  2407. $wgFileCacheDepth = 2;
  2408. /**
  2409. * Append a configured value to the parser cache and the sitenotice key so
  2410. * that they can be kept separate for some class of activity.
  2411. */
  2412. $wgRenderHashAppend = '';
  2413. /**
  2414. * If on, the sidebar navigation links are cached for users with the
  2415. * current language set. This can save a touch of load on a busy site
  2416. * by shaving off extra message lookups.
  2417. *
  2418. * However it is also fragile: changing the site configuration, or
  2419. * having a variable $wgArticlePath, can produce broken links that
  2420. * don't update as expected.
  2421. */
  2422. $wgEnableSidebarCache = false;
  2423. /**
  2424. * Expiry time for the sidebar cache, in seconds
  2425. */
  2426. $wgSidebarCacheExpiry = 86400;
  2427. /**
  2428. * When using the file cache, we can store the cached HTML gzipped to save disk
  2429. * space. Pages will then also be served compressed to clients that support it.
  2430. *
  2431. * Requires zlib support enabled in PHP.
  2432. */
  2433. $wgUseGzip = false;
  2434. /**
  2435. * Invalidate various caches when LocalSettings.php changes. This is equivalent
  2436. * to setting $wgCacheEpoch to the modification time of LocalSettings.php, as
  2437. * was previously done in the default LocalSettings.php file.
  2438. *
  2439. * On high-traffic wikis, this should be set to false, to avoid the need to
  2440. * check the file modification time, and to avoid the performance impact of
  2441. * unnecessary cache invalidations.
  2442. */
  2443. $wgInvalidateCacheOnLocalSettingsChange = true;
  2444. /**
  2445. * When loading extensions through the extension registration system, this
  2446. * can be used to invalidate the cache. A good idea would be to set this to
  2447. * one file, you can just `touch` that one to invalidate the cache
  2448. *
  2449. * @par Example:
  2450. * @code
  2451. * $wgExtensionInfoMtime = filemtime( "$IP/LocalSettings.php" );
  2452. * @endcode
  2453. *
  2454. * If set to false, the mtime for each individual JSON file will be checked,
  2455. * which can be slow if a large number of extensions are being loaded.
  2456. *
  2457. * @var int|bool
  2458. */
  2459. $wgExtensionInfoMTime = false;
  2460. /** @} */ # end of cache settings
  2461. /************************************************************************//**
  2462. * @name HTTP proxy (CDN) settings
  2463. *
  2464. * Many of these settings apply to any HTTP proxy used in front of MediaWiki,
  2465. * although they are sometimes still referred to as Squid settings for
  2466. * historical reasons.
  2467. *
  2468. * Achieving a high hit ratio with an HTTP proxy requires special configuration.
  2469. * See https://www.mediawiki.org/wiki/Manual:Performance_tuning#Page_view_caching
  2470. * for more details.
  2471. *
  2472. * @{
  2473. */
  2474. /**
  2475. * Enable/disable CDN.
  2476. *
  2477. * See https://www.mediawiki.org/wiki/Manual:Performance_tuning#Page_view_caching
  2478. *
  2479. * @since 1.34 Renamed from $wgUseSquid.
  2480. */
  2481. $wgUseCdn = false;
  2482. /**
  2483. * Add X-Forwarded-Proto to the Vary and Key headers for API requests and
  2484. * RSS/Atom feeds. Use this if you have an SSL termination setup
  2485. * and need to split the cache between HTTP and HTTPS for API requests,
  2486. * feed requests and HTTP redirect responses in order to prevent cache
  2487. * pollution. This does not affect 'normal' requests to index.php other than
  2488. * HTTP redirects.
  2489. */
  2490. $wgVaryOnXFP = false;
  2491. /**
  2492. * Internal server name as known to CDN, if different.
  2493. *
  2494. * @par Example:
  2495. * @code
  2496. * $wgInternalServer = 'http://yourinternal.tld:8000';
  2497. * @endcode
  2498. */
  2499. $wgInternalServer = false;
  2500. /**
  2501. * Cache TTL for the CDN sent as s-maxage (without ESI) or
  2502. * Surrogate-Control (with ESI). Without ESI, you should strip
  2503. * out s-maxage in the CDN config.
  2504. *
  2505. * 18000 seconds = 5 hours, more cache hits with 2678400 = 31 days.
  2506. *
  2507. * @since 1.34 Renamed from $wgSquidMaxage
  2508. */
  2509. $wgCdnMaxAge = 18000;
  2510. /**
  2511. * Cache timeout for the CDN when DB replica DB lag is high
  2512. * @see $wgCdnMaxAge
  2513. *
  2514. * @since 1.27
  2515. */
  2516. $wgCdnMaxageLagged = 30;
  2517. /**
  2518. * If set, any SquidPurge call on a URL or URLs will send a second purge no less than
  2519. * this many seconds later via the job queue. This requires delayed job support.
  2520. * This should be safely higher than the 'max lag' value in $wgLBFactoryConf, so that
  2521. * replica DB lag does not cause page to be stuck in stales states in CDN.
  2522. *
  2523. * This also fixes race conditions in two-tiered CDN setups (e.g. cdn2 => cdn1 => MediaWiki).
  2524. * If a purge for a URL reaches cdn2 before cdn1 and a request reaches cdn2 for that URL,
  2525. * it will populate the response from the stale cdn1 value. When cdn1 gets the purge, cdn2
  2526. * will still be stale. If the rebound purge delay is safely higher than the time to relay
  2527. * a purge to all nodes, then the rebound purge will clear cdn2 after cdn1 was cleared.
  2528. *
  2529. * @since 1.27
  2530. */
  2531. $wgCdnReboundPurgeDelay = 0;
  2532. /**
  2533. * Cache timeout for the CDN when a response is known to be wrong or incomplete (due to load)
  2534. * @see $wgCdnMaxAge
  2535. * @since 1.27
  2536. */
  2537. $wgCdnMaxageSubstitute = 60;
  2538. /**
  2539. * Default maximum age for raw CSS/JS accesses
  2540. *
  2541. * 300 seconds = 5 minutes.
  2542. */
  2543. $wgForcedRawSMaxage = 300;
  2544. /**
  2545. * List of proxy servers to purge on changes; default port is 80. Use IP addresses.
  2546. *
  2547. * When MediaWiki is running behind a proxy, it will trust X-Forwarded-For
  2548. * headers sent/modified from these proxies when obtaining the remote IP address
  2549. *
  2550. * For a list of trusted servers which *aren't* purged, see $wgSquidServersNoPurge.
  2551. *
  2552. * @since 1.34 Renamed from $wgSquidServers.
  2553. */
  2554. $wgCdnServers = [];
  2555. /**
  2556. * As with $wgCdnServers, except these servers aren't purged on page changes;
  2557. * use to set a list of trusted proxies, etc. Supports both individual IP
  2558. * addresses and CIDR blocks.
  2559. *
  2560. * @since 1.23 Supports CIDR ranges
  2561. * @since 1.34 Renamed from $wgSquidServersNoPurge
  2562. */
  2563. $wgCdnServersNoPurge = [];
  2564. /**
  2565. * Whether to use a Host header in purge requests sent to the proxy servers
  2566. * configured in $wgCdnServers. Set this to false to support a CDN
  2567. * configured in forward-proxy mode.
  2568. *
  2569. * If this is set to true, a Host header will be sent, and only the path
  2570. * component of the URL will appear on the request line, as if the request
  2571. * were a non-proxy HTTP 1.1 request. Varnish only supports this style of
  2572. * request. Squid supports this style of request only if reverse-proxy mode
  2573. * (http_port ... accel) is enabled.
  2574. *
  2575. * If this is set to false, no Host header will be sent, and the absolute URL
  2576. * will be sent in the request line, as is the standard for an HTTP proxy
  2577. * request in both HTTP 1.0 and 1.1. This style of request is not supported
  2578. * by Varnish, but is supported by Squid in either configuration (forward or
  2579. * reverse).
  2580. *
  2581. * @since 1.21
  2582. * @deprecated since 1.33, will always be true in a future release.
  2583. */
  2584. $wgSquidPurgeUseHostHeader = true;
  2585. /**
  2586. * Routing configuration for HTCP multicast purging. Add elements here to
  2587. * enable HTCP and determine which purges are sent where. If set to an empty
  2588. * array, HTCP is disabled.
  2589. *
  2590. * Each key in this array is a regular expression to match against the purged
  2591. * URL, or an empty string to match all URLs. The purged URL is matched against
  2592. * the regexes in the order specified, and the first rule whose regex matches
  2593. * is used, all remaining rules will thus be ignored.
  2594. *
  2595. * @par Example configuration to send purges for upload.wikimedia.org to one
  2596. * multicast group and all other purges to another:
  2597. * @code
  2598. * $wgHTCPRouting = [
  2599. * '|^https?://upload\.wikimedia\.org|' => [
  2600. * 'host' => '239.128.0.113',
  2601. * 'port' => 4827,
  2602. * ],
  2603. * '' => [
  2604. * 'host' => '239.128.0.112',
  2605. * 'port' => 4827,
  2606. * ],
  2607. * ];
  2608. * @endcode
  2609. *
  2610. * You can also pass an array of hosts to send purges too. This is useful when
  2611. * you have several multicast groups or unicast address that should receive a
  2612. * given purge. Multiple hosts support was introduced in MediaWiki 1.22.
  2613. *
  2614. * @par Example of sending purges to multiple hosts:
  2615. * @code
  2616. * $wgHTCPRouting = [
  2617. * '' => [
  2618. * // Purges to text caches using multicast
  2619. * [ 'host' => '239.128.0.114', 'port' => '4827' ],
  2620. * // Purges to a hardcoded list of caches
  2621. * [ 'host' => '10.88.66.1', 'port' => '4827' ],
  2622. * [ 'host' => '10.88.66.2', 'port' => '4827' ],
  2623. * [ 'host' => '10.88.66.3', 'port' => '4827' ],
  2624. * ],
  2625. * ];
  2626. * @endcode
  2627. *
  2628. * @since 1.22
  2629. * @see $wgHTCPMulticastTTL
  2630. */
  2631. $wgHTCPRouting = [];
  2632. /**
  2633. * HTCP multicast TTL.
  2634. * @see $wgHTCPRouting
  2635. */
  2636. $wgHTCPMulticastTTL = 1;
  2637. /**
  2638. * Should forwarded Private IPs be accepted?
  2639. */
  2640. $wgUsePrivateIPs = false;
  2641. /** @} */ # end of HTTP proxy settings
  2642. /************************************************************************//**
  2643. * @name Language, regional and character encoding settings
  2644. * @{
  2645. */
  2646. /**
  2647. * Site language code. See languages/data/Names.php for languages supported by
  2648. * MediaWiki out of the box. Not all languages listed there have translations,
  2649. * see languages/messages/ for the list of languages with some localisation.
  2650. *
  2651. * Warning: Don't use any of MediaWiki's deprecated language codes listed in
  2652. * LanguageCode::getDeprecatedCodeMapping or $wgDummyLanguageCodes, like "no"
  2653. * for Norwegian (use "nb" instead). If you do, things will break unexpectedly.
  2654. *
  2655. * This defines the default interface language for all users, but users can
  2656. * change it in their preferences.
  2657. *
  2658. * This also defines the language of pages in the wiki. The content is wrapped
  2659. * in a html element with lang=XX attribute. This behavior can be overridden
  2660. * via hooks, see Title::getPageLanguage.
  2661. */
  2662. $wgLanguageCode = 'en';
  2663. /**
  2664. * Language cache size, or really how many languages can we handle
  2665. * simultaneously without degrading to crawl speed.
  2666. */
  2667. $wgLangObjCacheSize = 10;
  2668. /**
  2669. * Some languages need different word forms, usually for different cases.
  2670. * Used in Language::convertGrammar().
  2671. *
  2672. * @par Example:
  2673. * @code
  2674. * $wgGrammarForms['en']['genitive']['car'] = 'car\'s';
  2675. * @endcode
  2676. */
  2677. $wgGrammarForms = [];
  2678. /**
  2679. * Treat language links as magic connectors, not inline links
  2680. */
  2681. $wgInterwikiMagic = true;
  2682. /**
  2683. * Hide interlanguage links from the sidebar
  2684. */
  2685. $wgHideInterlanguageLinks = false;
  2686. /**
  2687. * List of additional interwiki prefixes that should be treated as
  2688. * interlanguage links (i.e. placed in the sidebar).
  2689. * Notes:
  2690. * - This will not do anything unless the prefixes are defined in the interwiki
  2691. * map.
  2692. * - The display text for these custom interlanguage links will be fetched from
  2693. * the system message "interlanguage-link-xyz" where xyz is the prefix in
  2694. * this array.
  2695. * - A friendly name for each site, used for tooltip text, may optionally be
  2696. * placed in the system message "interlanguage-link-sitename-xyz" where xyz is
  2697. * the prefix in this array.
  2698. */
  2699. $wgExtraInterlanguageLinkPrefixes = [];
  2700. /**
  2701. * List of language names or overrides for default names in Names.php
  2702. */
  2703. $wgExtraLanguageNames = [];
  2704. /**
  2705. * List of mappings from one language code to another.
  2706. * This array makes the codes not appear as a selectable language on the
  2707. * installer, and excludes them when running the transstat.php script.
  2708. *
  2709. * In Setup.php, the variable $wgDummyLanguageCodes is created by combining
  2710. * these codes with a list of "deprecated" codes, which are mostly leftovers
  2711. * from renames or other legacy things, and the internal codes 'qqq' and 'qqx'.
  2712. * If a mapping in $wgExtraLanguageCodes collide with a built-in mapping, the
  2713. * value in $wgExtraLanguageCodes will be used.
  2714. *
  2715. * @since 1.29
  2716. */
  2717. $wgExtraLanguageCodes = [
  2718. // Language codes of macro languages, which get mapped to the main language
  2719. 'bh' => 'bho', // Bihari language family
  2720. 'no' => 'nb', // Norwegian language family
  2721. // Language variants which get mapped to the main language
  2722. 'simple' => 'en', // Simple English
  2723. ];
  2724. /**
  2725. * Functionally the same as $wgExtraLanguageCodes, but deprecated. Instead of
  2726. * appending values to this array, append them to $wgExtraLanguageCodes.
  2727. *
  2728. * @deprecated since 1.29
  2729. */
  2730. $wgDummyLanguageCodes = [];
  2731. /**
  2732. * Set this to true to replace Arabic presentation forms with their standard
  2733. * forms in the U+0600-U+06FF block. This only works if $wgLanguageCode is
  2734. * set to "ar".
  2735. *
  2736. * Note that pages with titles containing presentation forms will become
  2737. * inaccessible, run maintenance/cleanupTitles.php to fix this.
  2738. *
  2739. * @deprecated since 1.33: in the future will always be true.
  2740. */
  2741. $wgFixArabicUnicode = true;
  2742. /**
  2743. * Set this to true to replace ZWJ-based chillu sequences in Malayalam text
  2744. * with their Unicode 5.1 equivalents. This only works if $wgLanguageCode is
  2745. * set to "ml". Note that some clients (even new clients as of 2010) do not
  2746. * support these characters.
  2747. *
  2748. * If you enable this on an existing wiki, run maintenance/cleanupTitles.php to
  2749. * fix any ZWJ sequences in existing page titles.
  2750. *
  2751. * @deprecated since 1.33: in the future will always be true.
  2752. */
  2753. $wgFixMalayalamUnicode = true;
  2754. /**
  2755. * Set this to always convert certain Unicode sequences to modern ones
  2756. * regardless of the content language. This has a small performance
  2757. * impact.
  2758. *
  2759. * See $wgFixArabicUnicode and $wgFixMalayalamUnicode for conversion
  2760. * details.
  2761. *
  2762. * @since 1.17
  2763. */
  2764. $wgAllUnicodeFixes = false;
  2765. /**
  2766. * Set this to eg 'ISO-8859-1' to perform character set conversion when
  2767. * loading old revisions not marked with "utf-8" flag. Use this when
  2768. * converting a wiki from MediaWiki 1.4 or earlier to UTF-8 without the
  2769. * burdensome mass conversion of old text data.
  2770. *
  2771. * @note This DOES NOT touch any fields other than old_text. Titles, comments,
  2772. * user names, etc still must be converted en masse in the database before
  2773. * continuing as a UTF-8 wiki.
  2774. */
  2775. $wgLegacyEncoding = false;
  2776. /**
  2777. * If set to true, the MediaWiki 1.4 to 1.5 schema conversion will
  2778. * create stub reference rows in the text table instead of copying
  2779. * the full text of all current entries from 'cur' to 'text'.
  2780. *
  2781. * This will speed up the conversion step for large sites, but
  2782. * requires that the cur table be kept around for those revisions
  2783. * to remain viewable.
  2784. *
  2785. * This option affects the updaters *only*. Any present cur stub
  2786. * revisions will be readable at runtime regardless of this setting.
  2787. */
  2788. $wgLegacySchemaConversion = false;
  2789. /**
  2790. * Enable dates like 'May 12' instead of '12 May', if the default date format
  2791. * is 'dmy or mdy'.
  2792. */
  2793. $wgAmericanDates = false;
  2794. /**
  2795. * For Hindi and Arabic use local numerals instead of Western style (0-9)
  2796. * numerals in interface.
  2797. */
  2798. $wgTranslateNumerals = true;
  2799. /**
  2800. * Translation using MediaWiki: namespace.
  2801. * Interface messages will be loaded from the database.
  2802. */
  2803. $wgUseDatabaseMessages = true;
  2804. /**
  2805. * Maximum entry size in the message cache, in bytes
  2806. */
  2807. $wgMaxMsgCacheEntrySize = 10000;
  2808. /**
  2809. * Whether to enable language variant conversion.
  2810. */
  2811. $wgDisableLangConversion = false;
  2812. /**
  2813. * Whether to enable language variant conversion for links.
  2814. */
  2815. $wgDisableTitleConversion = false;
  2816. /**
  2817. * Default variant code, if false, the default will be the language code
  2818. */
  2819. $wgDefaultLanguageVariant = false;
  2820. /**
  2821. * Whether to enable the pig Latin variant of English (en-x-piglatin),
  2822. * used to ease variant development work.
  2823. */
  2824. $wgUsePigLatinVariant = false;
  2825. /**
  2826. * Disabled variants array of language variant conversion.
  2827. *
  2828. * @par Example:
  2829. * @code
  2830. * $wgDisabledVariants[] = 'zh-mo';
  2831. * $wgDisabledVariants[] = 'zh-my';
  2832. * @endcode
  2833. */
  2834. $wgDisabledVariants = [];
  2835. /**
  2836. * Like $wgArticlePath, but on multi-variant wikis, this provides a
  2837. * path format that describes which parts of the URL contain the
  2838. * language variant.
  2839. *
  2840. * @par Example:
  2841. * @code
  2842. * $wgLanguageCode = 'sr';
  2843. * $wgVariantArticlePath = '/$2/$1';
  2844. * $wgArticlePath = '/wiki/$1';
  2845. * @endcode
  2846. *
  2847. * A link to /wiki/ would be redirected to /sr/Главна_страна
  2848. *
  2849. * It is important that $wgArticlePath not overlap with possible values
  2850. * of $wgVariantArticlePath.
  2851. */
  2852. $wgVariantArticlePath = false;
  2853. /**
  2854. * Show a bar of language selection links in the user login and user
  2855. * registration forms; edit the "loginlanguagelinks" message to
  2856. * customise these.
  2857. */
  2858. $wgLoginLanguageSelector = false;
  2859. /**
  2860. * When translating messages with wfMessage(), it is not always clear what
  2861. * should be considered UI messages and what should be content messages.
  2862. *
  2863. * For example, for the English Wikipedia, there should be only one 'mainpage',
  2864. * so when getting the link for 'mainpage', we should treat it as site content
  2865. * and call ->inContentLanguage()->text(), but for rendering the text of the
  2866. * link, we call ->text(). The code behaves this way by default. However,
  2867. * sites like the Wikimedia Commons do offer different versions of 'mainpage'
  2868. * and the like for different languages. This array provides a way to override
  2869. * the default behavior.
  2870. *
  2871. * @par Example:
  2872. * To allow language-specific main page and community
  2873. * portal:
  2874. * @code
  2875. * $wgForceUIMsgAsContentMsg = [ 'mainpage', 'portal-url' ];
  2876. * @endcode
  2877. */
  2878. $wgForceUIMsgAsContentMsg = [];
  2879. /**
  2880. * Fake out the timezone that the server thinks it's in. This will be used for
  2881. * date display and not for what's stored in the DB. Leave to null to retain
  2882. * your server's OS-based timezone value.
  2883. *
  2884. * This variable is currently used only for signature formatting and for local
  2885. * time/date parser variables ({{LOCALTIME}} etc.)
  2886. *
  2887. * Timezones can be translated by editing MediaWiki messages of type
  2888. * timezone-nameinlowercase like timezone-utc.
  2889. *
  2890. * A list of usable timezones can found at:
  2891. * https://www.php.net/manual/en/timezones.php
  2892. *
  2893. * @par Examples:
  2894. * @code
  2895. * $wgLocaltimezone = 'UTC';
  2896. * $wgLocaltimezone = 'GMT';
  2897. * $wgLocaltimezone = 'PST8PDT';
  2898. * $wgLocaltimezone = 'Europe/Sweden';
  2899. * $wgLocaltimezone = 'CET';
  2900. * @endcode
  2901. */
  2902. $wgLocaltimezone = null;
  2903. /**
  2904. * Set an offset from UTC in minutes to use for the default timezone setting
  2905. * for anonymous users and new user accounts.
  2906. *
  2907. * This setting is used for most date/time displays in the software, and is
  2908. * overridable in user preferences. It is *not* used for signature timestamps.
  2909. *
  2910. * By default, this will be set to match $wgLocaltimezone.
  2911. */
  2912. $wgLocalTZoffset = null;
  2913. /**
  2914. * List of Unicode characters for which capitalization is overridden in
  2915. * Language::ucfirst. The characters should be
  2916. * represented as char_to_convert => conversion_override. See T219279 for details
  2917. * on why this is useful during php version transitions.
  2918. *
  2919. * @warning: EXPERIMENTAL!
  2920. *
  2921. * @since 1.34
  2922. * @var array
  2923. */
  2924. $wgOverrideUcfirstCharacters = [];
  2925. /** @} */ # End of language/charset settings
  2926. /*************************************************************************//**
  2927. * @name Output format and skin settings
  2928. * @{
  2929. */
  2930. /**
  2931. * The default Content-Type header.
  2932. */
  2933. $wgMimeType = 'text/html';
  2934. /**
  2935. * Defines the value of the version attribute in the &lt;html&gt; tag, if any.
  2936. *
  2937. * If your wiki uses RDFa, set it to the correct value for RDFa+HTML5.
  2938. * Correct current values are 'HTML+RDFa 1.0' or 'XHTML+RDFa 1.0'.
  2939. * See also https://www.w3.org/TR/rdfa-in-html/#document-conformance
  2940. * @since 1.16
  2941. */
  2942. $wgHtml5Version = null;
  2943. /**
  2944. * Temporary variable that allows HTMLForms to be rendered as tables.
  2945. * Table based layouts cause various issues when designing for mobile.
  2946. * This global allows skins or extensions a means to force non-table based rendering.
  2947. * Setting to false forces form components to always render as div elements.
  2948. * @since 1.24
  2949. */
  2950. $wgHTMLFormAllowTableFormat = true;
  2951. /**
  2952. * Temporary variable that applies MediaWiki UI wherever it can be supported.
  2953. * Temporary variable that should be removed when mediawiki ui is more
  2954. * stable and change has been communicated.
  2955. * @since 1.24
  2956. */
  2957. $wgUseMediaWikiUIEverywhere = false;
  2958. /**
  2959. * Whether to label the store-to-database-and-show-to-others button in the editor
  2960. * as "Save page"/"Save changes" if false (the default) or, if true, instead as
  2961. * "Publish page"/"Publish changes".
  2962. *
  2963. * @since 1.28
  2964. */
  2965. $wgEditSubmitButtonLabelPublish = false;
  2966. /**
  2967. * Permit other namespaces in addition to the w3.org default.
  2968. *
  2969. * Use the prefix for the key and the namespace for the value.
  2970. *
  2971. * @par Example:
  2972. * @code
  2973. * $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg';
  2974. * @endcode
  2975. * Normally we wouldn't have to define this in the root "<html>"
  2976. * element, but IE needs it there in some circumstances.
  2977. *
  2978. * This is ignored if $wgMimeType is set to a non-XML MIME type.
  2979. */
  2980. $wgXhtmlNamespaces = [];
  2981. /**
  2982. * Site notice shown at the top of each page
  2983. *
  2984. * MediaWiki:Sitenotice page, which will override this. You can also
  2985. * provide a separate message for logged-out users using the
  2986. * MediaWiki:Anonnotice page.
  2987. */
  2988. $wgSiteNotice = '';
  2989. /**
  2990. * Default skin, for new users and anonymous visitors. Registered users may
  2991. * change this to any one of the other available skins in their preferences.
  2992. */
  2993. $wgDefaultSkin = 'vector';
  2994. /**
  2995. * Fallback skin used when the skin defined by $wgDefaultSkin can't be found.
  2996. *
  2997. * @since 1.24
  2998. */
  2999. $wgFallbackSkin = 'fallback';
  3000. /**
  3001. * Specify the names of skins that should not be presented in the list of
  3002. * available skins in user preferences. If you want to remove a skin entirely,
  3003. * remove it from the skins/ directory and its entry from LocalSettings.php.
  3004. */
  3005. $wgSkipSkins = [];
  3006. /**
  3007. * @deprecated since 1.23; use $wgSkipSkins instead
  3008. */
  3009. $wgSkipSkin = '';
  3010. /**
  3011. * Allow user Javascript page?
  3012. * This enables a lot of neat customizations, but may
  3013. * increase security risk to users and server load.
  3014. */
  3015. $wgAllowUserJs = false;
  3016. /**
  3017. * Allow user Cascading Style Sheets (CSS)?
  3018. * This enables a lot of neat customizations, but may
  3019. * increase security risk to users and server load.
  3020. */
  3021. $wgAllowUserCss = false;
  3022. /**
  3023. * Allow style-related user-preferences?
  3024. *
  3025. * This controls whether the `editfont` and `underline` preferences
  3026. * are available to users.
  3027. */
  3028. $wgAllowUserCssPrefs = true;
  3029. /**
  3030. * Use the site's Javascript page?
  3031. */
  3032. $wgUseSiteJs = true;
  3033. /**
  3034. * Use the site's Cascading Style Sheets (CSS)?
  3035. */
  3036. $wgUseSiteCss = true;
  3037. /**
  3038. * Break out of framesets. This can be used to prevent clickjacking attacks,
  3039. * or to prevent external sites from framing your site with ads.
  3040. */
  3041. $wgBreakFrames = false;
  3042. /**
  3043. * The X-Frame-Options header to send on pages sensitive to clickjacking
  3044. * attacks, such as edit pages. This prevents those pages from being displayed
  3045. * in a frame or iframe. The options are:
  3046. *
  3047. * - 'DENY': Do not allow framing. This is recommended for most wikis.
  3048. *
  3049. * - 'SAMEORIGIN': Allow framing by pages on the same domain. This can be used
  3050. * to allow framing within a trusted domain. This is insecure if there
  3051. * is a page on the same domain which allows framing of arbitrary URLs.
  3052. *
  3053. * - false: Allow all framing. This opens up the wiki to XSS attacks and thus
  3054. * full compromise of local user accounts. Private wikis behind a
  3055. * corporate firewall are especially vulnerable. This is not
  3056. * recommended.
  3057. *
  3058. * For extra safety, set $wgBreakFrames = true, to prevent framing on all pages,
  3059. * not just edit pages.
  3060. */
  3061. $wgEditPageFrameOptions = 'DENY';
  3062. /**
  3063. * Disallow framing of API pages directly, by setting the X-Frame-Options
  3064. * header. Since the API returns CSRF tokens, allowing the results to be
  3065. * framed can compromise your user's account security.
  3066. * Options are:
  3067. * - 'DENY': Do not allow framing. This is recommended for most wikis.
  3068. * - 'SAMEORIGIN': Allow framing by pages on the same domain.
  3069. * - false: Allow all framing.
  3070. * Note: $wgBreakFrames will override this for human formatted API output.
  3071. */
  3072. $wgApiFrameOptions = 'DENY';
  3073. /**
  3074. * Disable output compression (enabled by default if zlib is available)
  3075. */
  3076. $wgDisableOutputCompression = false;
  3077. /**
  3078. * How should section IDs be encoded?
  3079. * This array can contain 1 or 2 elements, each of them can be one of:
  3080. * - 'html5' is modern HTML5 style encoding with minimal escaping. Displays Unicode
  3081. * characters in most browsers' address bars.
  3082. * - 'legacy' is old MediaWiki-style encoding, e.g. 啤酒 turns into .E5.95.A4.E9.85.92
  3083. *
  3084. * The first element of this array specifies the primary mode of escaping IDs. This
  3085. * is what users will see when they e.g. follow an [[#internal link]] to a section of
  3086. * a page.
  3087. *
  3088. * The optional second element defines a fallback mode, useful for migrations.
  3089. * If present, it will direct MediaWiki to add empty <span>s to every section with its
  3090. * id attribute set to fallback encoded title so that links using the previous encoding
  3091. * would still work.
  3092. *
  3093. * Example: you want to migrate your wiki from 'legacy' to 'html5'
  3094. *
  3095. * On the first step, set this variable to [ 'legacy', 'html5' ]. After a while, when
  3096. * all caches (parser, HTTP, etc.) contain only pages generated with this setting,
  3097. * flip the value to [ 'html5', 'legacy' ]. This will result in all internal links being
  3098. * generated in the new encoding while old links (both external and cached internal) will
  3099. * still work. After a long time, you might want to ditch backwards compatibility and
  3100. * set it to [ 'html5' ]. After all, pages get edited, breaking incoming links no matter which
  3101. * fragment mode is used.
  3102. *
  3103. * @since 1.30
  3104. */
  3105. $wgFragmentMode = [ 'legacy', 'html5' ];
  3106. /**
  3107. * Which ID escaping mode should be used for external interwiki links? See documentation
  3108. * for $wgFragmentMode above for details of each mode. Because you can't control external sites,
  3109. * this setting should probably always be 'legacy', unless every wiki you link to has converted
  3110. * to 'html5'.
  3111. *
  3112. * @since 1.30
  3113. */
  3114. $wgExternalInterwikiFragmentMode = 'legacy';
  3115. /**
  3116. * Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code
  3117. * You can add new icons to the built in copyright or poweredby, or you can create
  3118. * a new block. Though note that you may need to add some custom css to get good styling
  3119. * of new blocks in monobook. vector and modern should work without any special css.
  3120. *
  3121. * $wgFooterIcons itself is a key/value array.
  3122. * The key is the name of a block that the icons will be wrapped in. The final id varies
  3123. * by skin; Monobook and Vector will turn poweredby into f-poweredbyico while Modern
  3124. * turns it into mw_poweredby.
  3125. * The value is either key/value array of icons or a string.
  3126. * In the key/value array the key may or may not be used by the skin but it can
  3127. * be used to find the icon and unset it or change the icon if needed.
  3128. * This is useful for disabling icons that are set by extensions.
  3129. * The value should be either a string or an array. If it is a string it will be output
  3130. * directly as html, however some skins may choose to ignore it. An array is the preferred format
  3131. * for the icon, the following keys are used:
  3132. * - src: An absolute url to the image to use for the icon, this is recommended
  3133. * but not required, however some skins will ignore icons without an image
  3134. * - srcset: optional additional-resolution images; see HTML5 specs
  3135. * - url: The url to use in the a element around the text or icon, if not set an a element will
  3136. * not be outputted
  3137. * - alt: This is the text form of the icon, it will be displayed without an image in
  3138. * skins like Modern or if src is not set, and will otherwise be used as
  3139. * the alt="" for the image. This key is required.
  3140. * - width and height: If the icon specified by src is not of the standard size
  3141. * you can specify the size of image to use with these keys.
  3142. * Otherwise they will default to the standard 88x31.
  3143. * @todo Reformat documentation.
  3144. */
  3145. $wgFooterIcons = [
  3146. "copyright" => [
  3147. "copyright" => [], // placeholder for the built in copyright icon
  3148. ],
  3149. "poweredby" => [
  3150. "mediawiki" => [
  3151. // Defaults to point at
  3152. // "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png"
  3153. // plus srcset for 1.5x, 2x resolution variants.
  3154. "src" => null,
  3155. "url" => "https://www.mediawiki.org/",
  3156. "alt" => "Powered by MediaWiki",
  3157. ]
  3158. ],
  3159. ];
  3160. /**
  3161. * Login / create account link behavior when it's possible for anonymous users
  3162. * to create an account.
  3163. * - true = use a combined login / create account link
  3164. * - false = split login and create account into two separate links
  3165. */
  3166. $wgUseCombinedLoginLink = false;
  3167. /**
  3168. * Display user edit counts in various prominent places.
  3169. */
  3170. $wgEdititis = false;
  3171. /**
  3172. * Some web hosts attempt to rewrite all responses with a 404 (not found)
  3173. * status code, mangling or hiding MediaWiki's output. If you are using such a
  3174. * host, you should start looking for a better one. While you're doing that,
  3175. * set this to false to convert some of MediaWiki's 404 responses to 200 so
  3176. * that the generated error pages can be seen.
  3177. *
  3178. * In cases where for technical reasons it is more important for MediaWiki to
  3179. * send the correct status code than for the body to be transmitted intact,
  3180. * this configuration variable is ignored.
  3181. */
  3182. $wgSend404Code = true;
  3183. /**
  3184. * The $wgShowRollbackEditCount variable is used to show how many edits can be rolled back.
  3185. * The numeric value of the variable controls how many edits MediaWiki will look back to
  3186. * determine whether a rollback is allowed (by checking that they are all from the same author).
  3187. * If the value is false or 0, the edits are not counted. Disabling this will prevent MediaWiki
  3188. * from hiding some useless rollback links.
  3189. *
  3190. * @since 1.20
  3191. */
  3192. $wgShowRollbackEditCount = 10;
  3193. /**
  3194. * Output a <link rel="canonical"> tag on every page indicating the canonical
  3195. * server which should be used, i.e. $wgServer or $wgCanonicalServer. Since
  3196. * detection of the current server is unreliable, the link is sent
  3197. * unconditionally.
  3198. */
  3199. $wgEnableCanonicalServerLink = false;
  3200. /**
  3201. * When OutputHandler is used, mangle any output that contains
  3202. * <cross-domain-policy>. Without this, an attacker can send their own
  3203. * cross-domain policy unless it is prevented by the crossdomain.xml file at
  3204. * the domain root.
  3205. *
  3206. * @since 1.25
  3207. */
  3208. $wgMangleFlashPolicy = true;
  3209. /** @} */ # End of output format settings }
  3210. /*************************************************************************//**
  3211. * @name ResourceLoader settings
  3212. * @{
  3213. */
  3214. /**
  3215. * Client-side resource modules.
  3216. *
  3217. * Extensions should add their ResourceLoader module definitions
  3218. * to the $wgResourceModules variable.
  3219. *
  3220. * @par Example:
  3221. * @code
  3222. * $wgResourceModules['ext.myExtension'] = [
  3223. * 'scripts' => 'myExtension.js',
  3224. * 'styles' => 'myExtension.css',
  3225. * 'dependencies' => [ 'jquery.cookie', 'jquery.tabIndex' ],
  3226. * 'localBasePath' => __DIR__,
  3227. * 'remoteExtPath' => 'MyExtension',
  3228. * ];
  3229. * @endcode
  3230. */
  3231. $wgResourceModules = [];
  3232. /**
  3233. * Skin-specific styles for resource modules.
  3234. *
  3235. * These are later added to the 'skinStyles' list of the existing module. The 'styles' list can
  3236. * not be modified or disabled.
  3237. *
  3238. * For example, here is a module "bar" and how skin Foo would provide additional styles for it.
  3239. *
  3240. * @par Example:
  3241. * @code
  3242. * $wgResourceModules['bar'] = [
  3243. * 'scripts' => 'resources/bar/bar.js',
  3244. * 'styles' => 'resources/bar/main.css',
  3245. * ];
  3246. *
  3247. * $wgResourceModuleSkinStyles['foo'] = [
  3248. * 'bar' => 'skins/Foo/bar.css',
  3249. * ];
  3250. * @endcode
  3251. *
  3252. * This is mostly equivalent to:
  3253. *
  3254. * @par Equivalent:
  3255. * @code
  3256. * $wgResourceModules['bar'] = [
  3257. * 'scripts' => 'resources/bar/bar.js',
  3258. * 'styles' => 'resources/bar/main.css',
  3259. * 'skinStyles' => [
  3260. * 'foo' => skins/Foo/bar.css',
  3261. * ],
  3262. * ];
  3263. * @endcode
  3264. *
  3265. * If the module already defines its own entry in `skinStyles` for a given skin, then
  3266. * $wgResourceModuleSkinStyles is ignored.
  3267. *
  3268. * If a module defines a `skinStyles['default']` the skin may want to extend that instead
  3269. * of replacing them. This can be done using the `+` prefix.
  3270. *
  3271. * @par Example:
  3272. * @code
  3273. * $wgResourceModules['bar'] = [
  3274. * 'scripts' => 'resources/bar/bar.js',
  3275. * 'styles' => 'resources/bar/basic.css',
  3276. * 'skinStyles' => [
  3277. * 'default' => 'resources/bar/additional.css',
  3278. * ],
  3279. * ];
  3280. * // Note the '+' character:
  3281. * $wgResourceModuleSkinStyles['foo'] = [
  3282. * '+bar' => 'skins/Foo/bar.css',
  3283. * ];
  3284. * @endcode
  3285. *
  3286. * This is mostly equivalent to:
  3287. *
  3288. * @par Equivalent:
  3289. * @code
  3290. * $wgResourceModules['bar'] = [
  3291. * 'scripts' => 'resources/bar/bar.js',
  3292. * 'styles' => 'resources/bar/basic.css',
  3293. * 'skinStyles' => [
  3294. * 'default' => 'resources/bar/additional.css',
  3295. * 'foo' => [
  3296. * 'resources/bar/additional.css',
  3297. * 'skins/Foo/bar.css',
  3298. * ],
  3299. * ],
  3300. * ];
  3301. * @endcode
  3302. *
  3303. * In other words, as a module author, use the `styles` list for stylesheets that may not be
  3304. * disabled by a skin. To provide default styles that may be extended or replaced,
  3305. * use `skinStyles['default']`.
  3306. *
  3307. * As with $wgResourceModules, paths default to being relative to the MediaWiki root.
  3308. * You should always provide a localBasePath and remoteBasePath (or remoteExtPath/remoteSkinPath).
  3309. *
  3310. * @par Example:
  3311. * @code
  3312. * $wgResourceModuleSkinStyles['foo'] = [
  3313. * 'bar' => 'bar.css',
  3314. * 'quux' => 'quux.css',
  3315. * 'remoteSkinPath' => 'Foo',
  3316. * 'localBasePath' => __DIR__,
  3317. * ];
  3318. * @endcode
  3319. */
  3320. $wgResourceModuleSkinStyles = [];
  3321. /**
  3322. * Extensions should register foreign module sources here. 'local' is a
  3323. * built-in source that is not in this array, but defined by
  3324. * ResourceLoader::__construct() so that it cannot be unset.
  3325. *
  3326. * @par Example:
  3327. * @code
  3328. * $wgResourceLoaderSources['foo'] = 'http://example.org/w/load.php';
  3329. * @endcode
  3330. */
  3331. $wgResourceLoaderSources = [];
  3332. /**
  3333. * The default 'remoteBasePath' value for instances of ResourceLoaderFileModule.
  3334. * Defaults to $wgScriptPath.
  3335. */
  3336. $wgResourceBasePath = null;
  3337. /**
  3338. * Maximum time in seconds to cache resources served by ResourceLoader.
  3339. * Used to set last modified headers (max-age/s-maxage).
  3340. *
  3341. * Following options to distinguish:
  3342. * - versioned: Used for modules with a version, because changing version
  3343. * numbers causes cache misses. This normally has a long expiry time.
  3344. * - unversioned: Used for modules without a version to propagate changes
  3345. * quickly to clients. Also used for modules with errors to recover quickly.
  3346. * This normally has a short expiry time.
  3347. *
  3348. * Expiry time for the options to distinguish:
  3349. * - server: Squid/Varnish but also any other public proxy cache between the
  3350. * client and MediaWiki.
  3351. * - client: On the client side (e.g. in the browser cache).
  3352. */
  3353. $wgResourceLoaderMaxage = [
  3354. 'versioned' => [
  3355. 'server' => 30 * 24 * 60 * 60, // 30 days
  3356. 'client' => 30 * 24 * 60 * 60, // 30 days
  3357. ],
  3358. 'unversioned' => [
  3359. 'server' => 5 * 60, // 5 minutes
  3360. 'client' => 5 * 60, // 5 minutes
  3361. ],
  3362. ];
  3363. /**
  3364. * The default debug mode (on/off) for of ResourceLoader requests.
  3365. *
  3366. * This will still be overridden when the debug URL parameter is used.
  3367. */
  3368. $wgResourceLoaderDebug = false;
  3369. /**
  3370. * Whether to ensure the mediawiki.legacy library is loaded before other modules.
  3371. *
  3372. * @deprecated since 1.26: Always declare dependencies.
  3373. */
  3374. $wgIncludeLegacyJavaScript = false;
  3375. /**
  3376. * Whether or not to assign configuration variables to the global window object.
  3377. *
  3378. * If this is set to false, old code using deprecated variables will no longer
  3379. * work.
  3380. *
  3381. * @par Example of legacy code:
  3382. * @code{,js}
  3383. * if ( window.wgRestrictionEdit ) { ... }
  3384. * @endcode
  3385. * or:
  3386. * @code{,js}
  3387. * if ( wgIsArticle ) { ... }
  3388. * @endcode
  3389. *
  3390. * Instead, one needs to use mw.config.
  3391. * @par Example using mw.config global configuration:
  3392. * @code{,js}
  3393. * if ( mw.config.exists('wgRestrictionEdit') ) { ... }
  3394. * @endcode
  3395. * or:
  3396. * @code{,js}
  3397. * if ( mw.config.get('wgIsArticle') ) { ... }
  3398. * @endcode
  3399. */
  3400. $wgLegacyJavaScriptGlobals = true;
  3401. /**
  3402. * ResourceLoader will not generate URLs whose query string is more than
  3403. * this many characters long, and will instead use multiple requests with
  3404. * shorter query strings. This degrades performance, but may be needed based
  3405. * on the query string limit supported by your web server and/or your user's
  3406. * web browsers.
  3407. *
  3408. * @since 1.17
  3409. * @var int
  3410. */
  3411. $wgResourceLoaderMaxQueryLength = 2000;
  3412. /**
  3413. * If set to true, JavaScript modules loaded from wiki pages will be parsed
  3414. * prior to minification to validate it.
  3415. *
  3416. * Parse errors will result in a JS exception being thrown during module load,
  3417. * which avoids breaking other modules loaded in the same request.
  3418. */
  3419. $wgResourceLoaderValidateJS = true;
  3420. /**
  3421. * When enabled, execution of JavaScript modules is profiled client-side.
  3422. *
  3423. * Instrumentation happens in mw.loader.profiler.
  3424. * Use `mw.inspect('time')` from the browser console to display the data.
  3425. *
  3426. * @since 1.32
  3427. */
  3428. $wgResourceLoaderEnableJSProfiler = false;
  3429. /**
  3430. * Whether ResourceLoader should attempt to persist modules in localStorage on
  3431. * browsers that support the Web Storage API.
  3432. */
  3433. $wgResourceLoaderStorageEnabled = true;
  3434. /**
  3435. * Cache version for client-side ResourceLoader module storage. You can trigger
  3436. * invalidation of the contents of the module store by incrementing this value.
  3437. *
  3438. * @since 1.23
  3439. */
  3440. $wgResourceLoaderStorageVersion = 1;
  3441. /**
  3442. * Whether to allow site-wide CSS (MediaWiki:Common.css and friends) on
  3443. * restricted pages like Special:UserLogin or Special:Preferences where
  3444. * JavaScript is disabled for security reasons. As it is possible to
  3445. * execute JavaScript through CSS, setting this to true opens up a
  3446. * potential security hole. Some sites may "skin" their wiki by using
  3447. * site-wide CSS, causing restricted pages to look unstyled and different
  3448. * from the rest of the site.
  3449. *
  3450. * @since 1.25
  3451. */
  3452. $wgAllowSiteCSSOnRestrictedPages = false;
  3453. /** @} */ # End of ResourceLoader settings }
  3454. /*************************************************************************//**
  3455. * @name Page title and interwiki link settings
  3456. * @{
  3457. */
  3458. /**
  3459. * Name of the project namespace. If left set to false, $wgSitename will be
  3460. * used instead.
  3461. */
  3462. $wgMetaNamespace = false;
  3463. /**
  3464. * Name of the project talk namespace.
  3465. *
  3466. * Normally you can ignore this and it will be something like
  3467. * $wgMetaNamespace . "_talk". In some languages, you may want to set this
  3468. * manually for grammatical reasons.
  3469. */
  3470. $wgMetaNamespaceTalk = false;
  3471. /**
  3472. * Additional namespaces. If the namespaces defined in Language.php and
  3473. * Namespace.php are insufficient, you can create new ones here, for example,
  3474. * to import Help files in other languages. You can also override the namespace
  3475. * names of existing namespaces. Extensions should use the CanonicalNamespaces
  3476. * hook or extension.json.
  3477. *
  3478. * @warning Once you delete a namespace, the pages in that namespace will
  3479. * no longer be accessible. If you rename it, then you can access them through
  3480. * the new namespace name.
  3481. *
  3482. * Custom namespaces should start at 100 to avoid conflicting with standard
  3483. * namespaces, and should always follow the even/odd main/talk pattern.
  3484. *
  3485. * @par Example:
  3486. * @code
  3487. * $wgExtraNamespaces = [
  3488. * 100 => "Hilfe",
  3489. * 101 => "Hilfe_Diskussion",
  3490. * 102 => "Aide",
  3491. * 103 => "Discussion_Aide"
  3492. * ];
  3493. * @endcode
  3494. *
  3495. * @todo Add a note about maintenance/namespaceDupes.php
  3496. */
  3497. $wgExtraNamespaces = [];
  3498. /**
  3499. * Same as above, but for namespaces with gender distinction.
  3500. * Note: the default form for the namespace should also be set
  3501. * using $wgExtraNamespaces for the same index.
  3502. * @since 1.18
  3503. */
  3504. $wgExtraGenderNamespaces = [];
  3505. /**
  3506. * Namespace aliases.
  3507. *
  3508. * These are alternate names for the primary localised namespace names, which
  3509. * are defined by $wgExtraNamespaces and the language file. If a page is
  3510. * requested with such a prefix, the request will be redirected to the primary
  3511. * name.
  3512. *
  3513. * Set this to a map from namespace names to IDs.
  3514. *
  3515. * @par Example:
  3516. * @code
  3517. * $wgNamespaceAliases = [
  3518. * 'Wikipedian' => NS_USER,
  3519. * 'Help' => 100,
  3520. * ];
  3521. * @endcode
  3522. */
  3523. $wgNamespaceAliases = [];
  3524. /**
  3525. * Allowed title characters -- regex character class
  3526. * Don't change this unless you know what you're doing
  3527. *
  3528. * Problematic punctuation:
  3529. * - []{}|# Are needed for link syntax, never enable these
  3530. * - <> Causes problems with HTML escaping, don't use
  3531. * - % Enabled by default, minor problems with path to query rewrite rules, see below
  3532. * - + Enabled by default, but doesn't work with path to query rewrite rules,
  3533. * corrupted by apache
  3534. * - ? Enabled by default, but doesn't work with path to PATH_INFO rewrites
  3535. *
  3536. * All three of these punctuation problems can be avoided by using an alias,
  3537. * instead of a rewrite rule of either variety.
  3538. *
  3539. * The problem with % is that when using a path to query rewrite rule, URLs are
  3540. * double-unescaped: once by Apache's path conversion code, and again by PHP. So
  3541. * %253F, for example, becomes "?". Our code does not double-escape to compensate
  3542. * for this, indeed double escaping would break if the double-escaped title was
  3543. * passed in the query string rather than the path. This is a minor security issue
  3544. * because articles can be created such that they are hard to view or edit.
  3545. *
  3546. * In some rare cases you may wish to remove + for compatibility with old links.
  3547. */
  3548. $wgLegalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+";
  3549. /**
  3550. * The interwiki prefix of the current wiki, or false if it doesn't have one.
  3551. *
  3552. * @deprecated since 1.23; use $wgLocalInterwikis instead
  3553. */
  3554. $wgLocalInterwiki = false;
  3555. /**
  3556. * Array for multiple $wgLocalInterwiki values, in case there are several
  3557. * interwiki prefixes that point to the current wiki. If $wgLocalInterwiki is
  3558. * set, its value is prepended to this array, for backwards compatibility.
  3559. *
  3560. * Note, recent changes feeds use only the first entry in this array (or
  3561. * $wgLocalInterwiki, if it is set). See $wgRCFeeds
  3562. */
  3563. $wgLocalInterwikis = [];
  3564. /**
  3565. * Expiry time for cache of interwiki table
  3566. */
  3567. $wgInterwikiExpiry = 10800;
  3568. /**
  3569. * @name Interwiki caching settings.
  3570. * @{
  3571. */
  3572. /**
  3573. * Interwiki cache, either as an associative array or a path to a constant
  3574. * database (.cdb) file.
  3575. *
  3576. * This data structure database is generated by the `dumpInterwiki` maintenance
  3577. * script (which lives in the WikimediaMaintenance repository) and has key
  3578. * formats such as the following:
  3579. *
  3580. * - dbname:key - a simple key (e.g. enwiki:meta)
  3581. * - _sitename:key - site-scope key (e.g. wiktionary:meta)
  3582. * - __global:key - global-scope key (e.g. __global:meta)
  3583. * - __sites:dbname - site mapping (e.g. __sites:enwiki)
  3584. *
  3585. * Sites mapping just specifies site name, other keys provide "local url"
  3586. * data layout.
  3587. *
  3588. * @var bool|array|string
  3589. */
  3590. $wgInterwikiCache = false;
  3591. /**
  3592. * Specify number of domains to check for messages.
  3593. * - 1: Just wiki(db)-level
  3594. * - 2: wiki and global levels
  3595. * - 3: site levels
  3596. */
  3597. $wgInterwikiScopes = 3;
  3598. /**
  3599. * Fallback site, if unable to resolve from cache
  3600. */
  3601. $wgInterwikiFallbackSite = 'wiki';
  3602. /** @} */ # end of Interwiki caching settings.
  3603. /**
  3604. * If local interwikis are set up which allow redirects,
  3605. * set this regexp to restrict URLs which will be displayed
  3606. * as 'redirected from' links.
  3607. *
  3608. * @par Example:
  3609. * It might look something like this:
  3610. * @code
  3611. * $wgRedirectSources = '!^https?://[a-z-]+\.wikipedia\.org/!';
  3612. * @endcode
  3613. *
  3614. * Leave at false to avoid displaying any incoming redirect markers.
  3615. * This does not affect intra-wiki redirects, which don't change
  3616. * the URL.
  3617. */
  3618. $wgRedirectSources = false;
  3619. /**
  3620. * Set this to false to avoid forcing the first letter of links to capitals.
  3621. *
  3622. * @warning may break links! This makes links COMPLETELY case-sensitive. Links
  3623. * appearing with a capital at the beginning of a sentence will *not* go to the
  3624. * same place as links in the middle of a sentence using a lowercase initial.
  3625. */
  3626. $wgCapitalLinks = true;
  3627. /**
  3628. * @since 1.16 - This can now be set per-namespace. Some special namespaces (such as Special, see
  3629. * NamespaceInfo::$alwaysCapitalizedNamespaces for the full list) must be true by default (and
  3630. * setting them has no effect), due to various things that require them to be so. Also, since Talk
  3631. * namespaces need to directly mirror their associated content namespaces, the values for those are
  3632. * ignored in favor of the subject namespace's setting. Setting for NS_MEDIA is taken automatically
  3633. * from NS_FILE.
  3634. *
  3635. * @par Example:
  3636. * @code
  3637. * $wgCapitalLinkOverrides[ NS_FILE ] = false;
  3638. * @endcode
  3639. */
  3640. $wgCapitalLinkOverrides = [];
  3641. /**
  3642. * Which namespaces should support subpages?
  3643. * See Language.php for a list of namespaces.
  3644. */
  3645. $wgNamespacesWithSubpages = [
  3646. NS_TALK => true,
  3647. NS_USER => true,
  3648. NS_USER_TALK => true,
  3649. NS_PROJECT => true,
  3650. NS_PROJECT_TALK => true,
  3651. NS_FILE_TALK => true,
  3652. NS_MEDIAWIKI => true,
  3653. NS_MEDIAWIKI_TALK => true,
  3654. NS_TEMPLATE => true,
  3655. NS_TEMPLATE_TALK => true,
  3656. NS_HELP => true,
  3657. NS_HELP_TALK => true,
  3658. NS_CATEGORY_TALK => true
  3659. ];
  3660. /**
  3661. * Array holding default tracking category names.
  3662. *
  3663. * Array contains the system messages for each tracking category.
  3664. * Tracking categories allow pages with certain characteristics to be tracked.
  3665. * It works by adding any such page to a category automatically.
  3666. *
  3667. * A message with the suffix '-desc' should be added as a description message
  3668. * to have extra information on Special:TrackingCategories.
  3669. *
  3670. * @deprecated since 1.25 Extensions should now register tracking categories using
  3671. * the new extension registration system.
  3672. *
  3673. * @since 1.23
  3674. */
  3675. $wgTrackingCategories = [];
  3676. /**
  3677. * Array of namespaces which can be deemed to contain valid "content", as far
  3678. * as the site statistics are concerned. Useful if additional namespaces also
  3679. * contain "content" which should be considered when generating a count of the
  3680. * number of articles in the wiki.
  3681. */
  3682. $wgContentNamespaces = [ NS_MAIN ];
  3683. /**
  3684. * Optional array of namespaces which should be blacklisted from Special:ShortPages
  3685. * Only pages inside $wgContentNamespaces but not $wgShortPagesNamespaceBlacklist will
  3686. * be shown on that page.
  3687. * @since 1.30
  3688. */
  3689. $wgShortPagesNamespaceBlacklist = [];
  3690. /**
  3691. * Array of namespaces, in addition to the talk namespaces, where signatures
  3692. * (~~~~) are likely to be used. This determines whether to display the
  3693. * Signature button on the edit toolbar, and may also be used by extensions.
  3694. * For example, "traditional" style wikis, where content and discussion are
  3695. * intermixed, could place NS_MAIN and NS_PROJECT namespaces in this array.
  3696. */
  3697. $wgExtraSignatureNamespaces = [];
  3698. /**
  3699. * Max number of redirects to follow when resolving redirects.
  3700. * 1 means only the first redirect is followed (default behavior).
  3701. * 0 or less means no redirects are followed.
  3702. */
  3703. $wgMaxRedirects = 1;
  3704. /**
  3705. * Array of invalid page redirect targets.
  3706. * Attempting to create a redirect to any of the pages in this array
  3707. * will make the redirect fail.
  3708. * Userlogout is hard-coded, so it does not need to be listed here.
  3709. * (T12569) Disallow Mypage and Mytalk as well.
  3710. *
  3711. * As of now, this only checks special pages. Redirects to pages in
  3712. * other namespaces cannot be invalidated by this variable.
  3713. */
  3714. $wgInvalidRedirectTargets = [ 'Filepath', 'Mypage', 'Mytalk', 'Redirect' ];
  3715. /** @} */ # End of title and interwiki settings }
  3716. /************************************************************************//**
  3717. * @name Parser settings
  3718. * These settings configure the transformation from wikitext to HTML.
  3719. * @{
  3720. */
  3721. /**
  3722. * Parser configuration. Associative array with the following members:
  3723. *
  3724. * class The class name
  3725. *
  3726. * preprocessorClass The preprocessor class. Two classes are currently available:
  3727. * Preprocessor_Hash, which uses plain PHP arrays for temporary
  3728. * storage, and Preprocessor_DOM, which uses the DOM module for
  3729. * temporary storage. Preprocessor_DOM generally uses less memory;
  3730. * the speed of the two is roughly the same.
  3731. *
  3732. * If this parameter is not given, it uses Preprocessor_Hash.
  3733. *
  3734. * The Preprocessor_DOM class is deprecated, and will be removed in a future
  3735. * release.
  3736. *
  3737. * The entire associative array will be passed through to the constructor as
  3738. * the first parameter. Note that only Setup.php can use this variable --
  3739. * the configuration will change at runtime via Parser member functions, so
  3740. * the contents of this variable will be out-of-date. The variable can only be
  3741. * changed during LocalSettings.php, in particular, it can't be changed during
  3742. * an extension setup function.
  3743. */
  3744. $wgParserConf = [
  3745. 'class' => Parser::class,
  3746. # 'preprocessorClass' => Preprocessor_Hash::class,
  3747. ];
  3748. /**
  3749. * Maximum indent level of toc.
  3750. */
  3751. $wgMaxTocLevel = 999;
  3752. /**
  3753. * A complexity limit on template expansion: the maximum number of nodes visited
  3754. * by PPFrame::expand()
  3755. */
  3756. $wgMaxPPNodeCount = 1000000;
  3757. /**
  3758. * A complexity limit on template expansion: the maximum number of elements
  3759. * generated by Preprocessor::preprocessToObj(). This allows you to limit the
  3760. * amount of memory used by the Preprocessor_DOM node cache: testing indicates
  3761. * that each element uses about 160 bytes of memory on a 64-bit processor, so
  3762. * this default corresponds to about 155 MB.
  3763. *
  3764. * When the limit is exceeded, an exception is thrown.
  3765. */
  3766. $wgMaxGeneratedPPNodeCount = 1000000;
  3767. /**
  3768. * Maximum recursion depth for templates within templates.
  3769. * The current parser adds two levels to the PHP call stack for each template,
  3770. * and xdebug limits the call stack to 100 by default. So this should hopefully
  3771. * stop the parser before it hits the xdebug limit.
  3772. */
  3773. $wgMaxTemplateDepth = 40;
  3774. /**
  3775. * @see $wgMaxTemplateDepth
  3776. */
  3777. $wgMaxPPExpandDepth = 40;
  3778. /**
  3779. * URL schemes that should be recognized as valid by wfParseUrl().
  3780. *
  3781. * WARNING: Do not add 'file:' to this or internal file links will be broken.
  3782. * Instead, if you want to support file links, add 'file://'. The same applies
  3783. * to any other protocols with the same name as a namespace. See task T46011 for
  3784. * more information.
  3785. *
  3786. * @see wfParseUrl
  3787. */
  3788. $wgUrlProtocols = [
  3789. 'bitcoin:', 'ftp://', 'ftps://', 'geo:', 'git://', 'gopher://', 'http://',
  3790. 'https://', 'irc://', 'ircs://', 'magnet:', 'mailto:', 'mms://', 'news:',
  3791. 'nntp://', 'redis://', 'sftp://', 'sip:', 'sips:', 'sms:', 'ssh://',
  3792. 'svn://', 'tel:', 'telnet://', 'urn:', 'worldwind://', 'xmpp:', '//'
  3793. ];
  3794. /**
  3795. * If true, removes (by substituting) templates in signatures.
  3796. */
  3797. $wgCleanSignatures = true;
  3798. /**
  3799. * Whether to allow inline image pointing to other websites
  3800. */
  3801. $wgAllowExternalImages = false;
  3802. /**
  3803. * If the above is false, you can specify an exception here. Image URLs
  3804. * that start with this string are then rendered, while all others are not.
  3805. * You can use this to set up a trusted, simple repository of images.
  3806. * You may also specify an array of strings to allow multiple sites
  3807. *
  3808. * @par Examples:
  3809. * @code
  3810. * $wgAllowExternalImagesFrom = 'http://127.0.0.1/';
  3811. * $wgAllowExternalImagesFrom = [ 'http://127.0.0.1/', 'http://example.com' ];
  3812. * @endcode
  3813. */
  3814. $wgAllowExternalImagesFrom = '';
  3815. /**
  3816. * If $wgAllowExternalImages is false, you can allow an on-wiki
  3817. * whitelist of regular expression fragments to match the image URL
  3818. * against. If the image matches one of the regular expression fragments,
  3819. * The image will be displayed.
  3820. *
  3821. * Set this to true to enable the on-wiki whitelist (MediaWiki:External image whitelist)
  3822. * Or false to disable it
  3823. *
  3824. * @since 1.14
  3825. */
  3826. $wgEnableImageWhitelist = false;
  3827. /**
  3828. * A different approach to the above: simply allow the "<img>" tag to be used.
  3829. * This allows you to specify alt text and other attributes, copy-paste HTML to
  3830. * your wiki more easily, etc. However, allowing external images in any manner
  3831. * will allow anyone with editing rights to snoop on your visitors' IP
  3832. * addresses and so forth, if they wanted to, by inserting links to images on
  3833. * sites they control.
  3834. */
  3835. $wgAllowImageTag = false;
  3836. /**
  3837. * Configuration for HTML postprocessing tool. Set this to a configuration
  3838. * array to enable an external tool. By default, we now use the RemexHtml
  3839. * library; historically, other postprocessors were used.
  3840. *
  3841. * Setting this to null will use default settings.
  3842. *
  3843. * Keys include:
  3844. * - driver: formerly used to select a postprocessor; now ignored.
  3845. * - treeMutationTrace: a boolean to turn on Remex tracing
  3846. * - serializerTrace: a boolean to turn on Remex tracing
  3847. * - mungerTrace: a boolean to turn on Remex tracing
  3848. * - pwrap: whether <p> wrapping should be done (default true)
  3849. *
  3850. * See includes/tidy/RemexDriver.php for detail on configuration.
  3851. *
  3852. * Overriding the default configuration is strongly discouraged in
  3853. * production.
  3854. */
  3855. $wgTidyConfig = [ 'driver' => 'RemexHtml' ];
  3856. /**
  3857. * Allow raw, unchecked HTML in "<html>...</html>" sections.
  3858. * THIS IS VERY DANGEROUS on a publicly editable site, so USE wgGroupPermissions
  3859. * TO RESTRICT EDITING to only those that you trust
  3860. */
  3861. $wgRawHtml = false;
  3862. /**
  3863. * Set a default target for external links, e.g. _blank to pop up a new window.
  3864. *
  3865. * This will also set the "noreferrer" and "noopener" link rel to prevent the
  3866. * attack described at https://mathiasbynens.github.io/rel-noopener/ .
  3867. * Some older browsers may not support these link attributes, hence
  3868. * setting $wgExternalLinkTarget to _blank may represent a security risk
  3869. * to some of your users.
  3870. */
  3871. $wgExternalLinkTarget = false;
  3872. /**
  3873. * If true, external URL links in wiki text will be given the
  3874. * rel="nofollow" attribute as a hint to search engines that
  3875. * they should not be followed for ranking purposes as they
  3876. * are user-supplied and thus subject to spamming.
  3877. */
  3878. $wgNoFollowLinks = true;
  3879. /**
  3880. * Namespaces in which $wgNoFollowLinks doesn't apply.
  3881. * See Language.php for a list of namespaces.
  3882. */
  3883. $wgNoFollowNsExceptions = [];
  3884. /**
  3885. * If this is set to an array of domains, external links to these domain names
  3886. * (or any subdomains) will not be set to rel="nofollow" regardless of the
  3887. * value of $wgNoFollowLinks. For instance:
  3888. *
  3889. * $wgNoFollowDomainExceptions = [ 'en.wikipedia.org', 'wiktionary.org', 'mediawiki.org' ];
  3890. *
  3891. * This would add rel="nofollow" to links to de.wikipedia.org, but not
  3892. * en.wikipedia.org, wiktionary.org, en.wiktionary.org, us.en.wikipedia.org,
  3893. * etc.
  3894. *
  3895. * Defaults to mediawiki.org for the links included in the software by default.
  3896. */
  3897. $wgNoFollowDomainExceptions = [ 'mediawiki.org' ];
  3898. /**
  3899. * Allow DISPLAYTITLE to change title display
  3900. */
  3901. $wgAllowDisplayTitle = true;
  3902. /**
  3903. * For consistency, restrict DISPLAYTITLE to text that normalizes to the same
  3904. * canonical DB key. Also disallow some inline CSS rules like display: none;
  3905. * which can cause the text to be hidden or unselectable.
  3906. */
  3907. $wgRestrictDisplayTitle = true;
  3908. /**
  3909. * Maximum number of calls per parse to expensive parser functions such as
  3910. * PAGESINCATEGORY.
  3911. */
  3912. $wgExpensiveParserFunctionLimit = 100;
  3913. /**
  3914. * Preprocessor caching threshold
  3915. * Setting it to 'false' will disable the preprocessor cache.
  3916. */
  3917. $wgPreprocessorCacheThreshold = 1000;
  3918. /**
  3919. * Enable interwiki transcluding. Only when iw_trans=1 in the interwiki table.
  3920. */
  3921. $wgEnableScaryTranscluding = false;
  3922. /**
  3923. * Expiry time for transcluded templates cached in object cache.
  3924. * Only used $wgEnableInterwikiTranscluding is set to true.
  3925. */
  3926. $wgTranscludeCacheExpiry = 3600;
  3927. /**
  3928. * Enable the magic links feature of automatically turning ISBN xxx,
  3929. * PMID xxx, RFC xxx into links
  3930. *
  3931. * @since 1.28
  3932. */
  3933. $wgEnableMagicLinks = [
  3934. 'ISBN' => false,
  3935. 'PMID' => false,
  3936. 'RFC' => false
  3937. ];
  3938. /** @} */ # end of parser settings }
  3939. /************************************************************************//**
  3940. * @name Statistics
  3941. * @{
  3942. */
  3943. /**
  3944. * Method used to determine if a page in a content namespace should be counted
  3945. * as a valid article.
  3946. *
  3947. * Redirect pages will never be counted as valid articles.
  3948. *
  3949. * This variable can have the following values:
  3950. * - 'any': all pages as considered as valid articles
  3951. * - 'link': the page must contain a [[wiki link]] to be considered valid
  3952. *
  3953. * See also See https://www.mediawiki.org/wiki/Manual:Article_count
  3954. *
  3955. * Retroactively changing this variable will not affect the existing count,
  3956. * to update it, you will need to run the maintenance/updateArticleCount.php
  3957. * script.
  3958. */
  3959. $wgArticleCountMethod = 'link';
  3960. /**
  3961. * How many days user must be idle before he is considered inactive. Will affect
  3962. * the number shown on Special:Statistics, Special:ActiveUsers, and the
  3963. * {{NUMBEROFACTIVEUSERS}} magic word in wikitext.
  3964. * You might want to leave this as the default value, to provide comparable
  3965. * numbers between different wikis.
  3966. */
  3967. $wgActiveUserDays = 30;
  3968. /** @} */ # End of statistics }
  3969. /************************************************************************//**
  3970. * @name User accounts, authentication
  3971. * @{
  3972. */
  3973. /**
  3974. * Central ID lookup providers
  3975. * Key is the provider ID, value is a specification for ObjectFactory
  3976. * @since 1.27
  3977. */
  3978. $wgCentralIdLookupProviders = [
  3979. 'local' => [ 'class' => LocalIdLookup::class ],
  3980. ];
  3981. /**
  3982. * Central ID lookup provider to use by default
  3983. * @var string
  3984. */
  3985. $wgCentralIdLookupProvider = 'local';
  3986. /**
  3987. * Password policy for the wiki.
  3988. * Structured as
  3989. * [
  3990. * 'policies' => [ <group> => [ <policy> => <settings>, ... ], ... ],
  3991. * 'checks' => [ <policy> => <callback>, ... ],
  3992. * ]
  3993. * where <group> is a user group, <policy> is a password policy name
  3994. * (arbitrary string) defined in the 'checks' part, <callback> is the
  3995. * PHP callable implementing the policy check, <settings> is an array
  3996. * of options with the following keys:
  3997. * - value: (number, boolean or null) the value to pass to the callback
  3998. * - forceChange: (bool, default false) if the password is invalid, do
  3999. * not let the user log in without changing the password
  4000. * - suggestChangeOnLogin: (bool, default false) if true and the password is
  4001. * invalid, suggest a password change if logging in. If all the failing policies
  4002. * that apply to the user have this set to false, the password change
  4003. * screen will not be shown. 'forceChange' takes precedence over
  4004. * 'suggestChangeOnLogin' if they are both present.
  4005. * As a shorthand for [ 'value' => <value> ], simply <value> can be written.
  4006. * When multiple password policies are defined for a user, the settings
  4007. * arrays are merged, and for fields which are set in both arrays, the
  4008. * larger value (as understood by PHP's 'max' method) is taken.
  4009. *
  4010. * A user's effective policy is the superset of all policy statements
  4011. * from the policies for the groups where the user is a member. If more
  4012. * than one group policy include the same policy statement, the value is
  4013. * the max() of the values. Note true > false. The 'default' policy group
  4014. * is required, and serves as the minimum policy for all users.
  4015. *
  4016. * Callbacks receive three arguments: the policy value, the User object
  4017. * and the password; and must return a StatusValue. A non-good status
  4018. * means the password will not be accepted for new accounts, and existing
  4019. * accounts will be prompted for password change or barred from logging in
  4020. * (depending on whether the status is a fatal or merely error/warning).
  4021. *
  4022. * The checks supported by core are:
  4023. * - MinimalPasswordLength - Minimum length a user can set.
  4024. * - MinimumPasswordLengthToLogin - Passwords shorter than this will
  4025. * not be allowed to login, or offered a chance to reset their password
  4026. * as part of the login workflow, regardless if it is correct.
  4027. * - MaximalPasswordLength - maximum length password a user is allowed
  4028. * to attempt. Prevents DoS attacks with pbkdf2.
  4029. * - PasswordCannotMatchUsername - Password cannot match the username.
  4030. * - PasswordCannotMatchBlacklist - Username/password combination cannot
  4031. * match a blacklist of default passwords used by MediaWiki in the past.
  4032. * - PasswordCannotBePopular - Blacklist passwords which are known to be
  4033. * commonly chosen. Set to integer n to ban the top n passwords.
  4034. * If you want to ban all common passwords on file, use the
  4035. * PHP_INT_MAX constant.
  4036. * Deprecated since 1.33. Use PasswordNotInLargeBlacklist instead.
  4037. * - PasswordNotInLargeBlacklist - Password not in best practices list of
  4038. * 100,000 commonly used passwords. Due to the size of the list this
  4039. * is a probabilistic test.
  4040. *
  4041. * If you add custom checks, for Special:PasswordPolicies to display them correctly,
  4042. * every check should have a corresponding passwordpolicies-policy-<check> message,
  4043. * and every settings field other than 'value' should have a corresponding
  4044. * passwordpolicies-policyflag-<flag> message (<check> and <flag> are in lowercase).
  4045. * The check message receives the policy value as a parameter, the flag message
  4046. * receives the flag value (or values if it's an array).
  4047. *
  4048. * @since 1.26
  4049. * @see PasswordPolicyChecks
  4050. * @see User::checkPasswordValidity()
  4051. */
  4052. $wgPasswordPolicy = [
  4053. 'policies' => [
  4054. 'bureaucrat' => [
  4055. 'MinimalPasswordLength' => 10,
  4056. 'MinimumPasswordLengthToLogin' => 1,
  4057. ],
  4058. 'sysop' => [
  4059. 'MinimalPasswordLength' => 10,
  4060. 'MinimumPasswordLengthToLogin' => 1,
  4061. ],
  4062. 'interface-admin' => [
  4063. 'MinimalPasswordLength' => 10,
  4064. 'MinimumPasswordLengthToLogin' => 1,
  4065. ],
  4066. 'bot' => [
  4067. 'MinimalPasswordLength' => 10,
  4068. 'MinimumPasswordLengthToLogin' => 1,
  4069. ],
  4070. 'default' => [
  4071. 'MinimalPasswordLength' => [ 'value' => 1, 'suggestChangeOnLogin' => true ],
  4072. 'PasswordCannotMatchUsername' => [ 'value' => true, 'suggestChangeOnLogin' => true ],
  4073. 'PasswordCannotMatchBlacklist' => [ 'value' => true, 'suggestChangeOnLogin' => true ],
  4074. 'MaximalPasswordLength' => [ 'value' => 4096, 'suggestChangeOnLogin' => true ],
  4075. 'PasswordNotInLargeBlacklist' => [ 'value' => true, 'suggestChangeOnLogin' => true ],
  4076. ],
  4077. ],
  4078. 'checks' => [
  4079. 'MinimalPasswordLength' => 'PasswordPolicyChecks::checkMinimalPasswordLength',
  4080. 'MinimumPasswordLengthToLogin' => 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin',
  4081. 'PasswordCannotMatchUsername' => 'PasswordPolicyChecks::checkPasswordCannotMatchUsername',
  4082. 'PasswordCannotMatchBlacklist' => 'PasswordPolicyChecks::checkPasswordCannotMatchBlacklist',
  4083. 'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength',
  4084. 'PasswordCannotBePopular' => 'PasswordPolicyChecks::checkPopularPasswordBlacklist',
  4085. 'PasswordNotInLargeBlacklist' => 'PasswordPolicyChecks::checkPasswordNotInLargeBlacklist',
  4086. ],
  4087. ];
  4088. /**
  4089. * Configure AuthManager
  4090. *
  4091. * All providers are constructed using ObjectFactory, see that for the general
  4092. * structure. The array may also contain a key "sort" used to order providers:
  4093. * providers are stably sorted by this value, which should be an integer
  4094. * (default is 0).
  4095. *
  4096. * Elements are:
  4097. * - preauth: Array (keys ignored) of specifications for PreAuthenticationProviders
  4098. * - primaryauth: Array (keys ignored) of specifications for PrimaryAuthenticationProviders
  4099. * - secondaryauth: Array (keys ignored) of specifications for SecondaryAuthenticationProviders
  4100. *
  4101. * @since 1.27
  4102. * @note If this is null or empty, the value from $wgAuthManagerAutoConfig is
  4103. * used instead. Local customization should generally set this variable from
  4104. * scratch to the desired configuration. Extensions that want to
  4105. * auto-configure themselves should use $wgAuthManagerAutoConfig instead.
  4106. */
  4107. $wgAuthManagerConfig = null;
  4108. /**
  4109. * @see $wgAuthManagerConfig
  4110. * @since 1.27
  4111. */
  4112. $wgAuthManagerAutoConfig = [
  4113. 'preauth' => [
  4114. MediaWiki\Auth\ThrottlePreAuthenticationProvider::class => [
  4115. 'class' => MediaWiki\Auth\ThrottlePreAuthenticationProvider::class,
  4116. 'sort' => 0,
  4117. ],
  4118. ],
  4119. 'primaryauth' => [
  4120. // TemporaryPasswordPrimaryAuthenticationProvider should come before
  4121. // any other PasswordAuthenticationRequest-based
  4122. // PrimaryAuthenticationProvider (or at least any that might return
  4123. // FAIL rather than ABSTAIN for a wrong password), or password reset
  4124. // won't work right. Do not remove this (or change the key) or
  4125. // auto-configuration of other such providers in extensions will
  4126. // probably auto-insert themselves in the wrong place.
  4127. MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider::class => [
  4128. 'class' => MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider::class,
  4129. 'args' => [ [
  4130. // Fall through to LocalPasswordPrimaryAuthenticationProvider
  4131. 'authoritative' => false,
  4132. ] ],
  4133. 'sort' => 0,
  4134. ],
  4135. MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider::class => [
  4136. 'class' => MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider::class,
  4137. 'args' => [ [
  4138. // Last one should be authoritative, or else the user will get
  4139. // a less-than-helpful error message (something like "supplied
  4140. // authentication info not supported" rather than "wrong
  4141. // password") if it too fails.
  4142. 'authoritative' => true,
  4143. ] ],
  4144. 'sort' => 100,
  4145. ],
  4146. ],
  4147. 'secondaryauth' => [
  4148. MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider::class => [
  4149. 'class' => MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider::class,
  4150. 'sort' => 0,
  4151. ],
  4152. MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProvider::class => [
  4153. 'class' => MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProvider::class,
  4154. 'sort' => 100,
  4155. ],
  4156. // Linking during login is experimental, enable at your own risk - T134952
  4157. // MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider::class => [
  4158. // 'class' => MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider::class,
  4159. // 'sort' => 100,
  4160. // ],
  4161. MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProvider::class => [
  4162. 'class' => MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProvider::class,
  4163. 'sort' => 200,
  4164. ],
  4165. ],
  4166. ];
  4167. /**
  4168. * Time frame for re-authentication.
  4169. *
  4170. * With only password-based authentication, you'd just ask the user to re-enter
  4171. * their password to verify certain operations like changing the password or
  4172. * changing the account's email address. But under AuthManager, the user might
  4173. * not have a password (you might even have to redirect the browser to a
  4174. * third-party service or something complex like that), you might want to have
  4175. * both factors of a two-factor authentication, and so on. So, the options are:
  4176. * - Incorporate the whole multi-step authentication flow within everything
  4177. * that needs to do this.
  4178. * - Consider it good if they used Special:UserLogin during this session within
  4179. * the last X seconds.
  4180. * - Come up with a third option.
  4181. *
  4182. * MediaWiki currently takes the second option. This setting configures the
  4183. * "X seconds".
  4184. *
  4185. * This allows for configuring different time frames for different
  4186. * "operations". The operations used in MediaWiki core include:
  4187. * - LinkAccounts
  4188. * - UnlinkAccount
  4189. * - ChangeCredentials
  4190. * - RemoveCredentials
  4191. * - ChangeEmail
  4192. *
  4193. * Additional operations may be used by extensions, either explicitly by
  4194. * calling AuthManager::securitySensitiveOperationStatus(),
  4195. * ApiAuthManagerHelper::securitySensitiveOperation() or
  4196. * SpecialPage::checkLoginSecurityLevel(), or implicitly by overriding
  4197. * SpecialPage::getLoginSecurityLevel() or by subclassing
  4198. * AuthManagerSpecialPage.
  4199. *
  4200. * The key 'default' is used if a requested operation isn't defined in the array.
  4201. *
  4202. * @since 1.27
  4203. * @var int[] operation => time in seconds. A 'default' key must always be provided.
  4204. */
  4205. $wgReauthenticateTime = [
  4206. 'default' => 300,
  4207. ];
  4208. /**
  4209. * Whether to allow security-sensitive operations when re-authentication is not possible.
  4210. *
  4211. * If AuthManager::canAuthenticateNow() is false (e.g. the current
  4212. * SessionProvider is not able to change users, such as when OAuth is in use),
  4213. * AuthManager::securitySensitiveOperationStatus() cannot sensibly return
  4214. * SEC_REAUTH. Setting an operation true here will have it return SEC_OK in
  4215. * that case, while setting it false will have it return SEC_FAIL.
  4216. *
  4217. * The key 'default' is used if a requested operation isn't defined in the array.
  4218. *
  4219. * @since 1.27
  4220. * @see $wgReauthenticateTime
  4221. * @var bool[] operation => boolean. A 'default' key must always be provided.
  4222. */
  4223. $wgAllowSecuritySensitiveOperationIfCannotReauthenticate = [
  4224. 'default' => true,
  4225. ];
  4226. /**
  4227. * List of AuthenticationRequest class names which are not changeable through
  4228. * Special:ChangeCredentials and the changeauthenticationdata API.
  4229. * This is only enforced on the client level; AuthManager itself (e.g.
  4230. * AuthManager::allowsAuthenticationDataChange calls) is not affected.
  4231. * Class names are checked for exact match (not for subclasses).
  4232. * @since 1.27
  4233. * @var string[]
  4234. */
  4235. $wgChangeCredentialsBlacklist = [
  4236. \MediaWiki\Auth\TemporaryPasswordAuthenticationRequest::class
  4237. ];
  4238. /**
  4239. * List of AuthenticationRequest class names which are not removable through
  4240. * Special:RemoveCredentials and the removeauthenticationdata API.
  4241. * This is only enforced on the client level; AuthManager itself (e.g.
  4242. * AuthManager::allowsAuthenticationDataChange calls) is not affected.
  4243. * Class names are checked for exact match (not for subclasses).
  4244. * @since 1.27
  4245. * @var string[]
  4246. */
  4247. $wgRemoveCredentialsBlacklist = [
  4248. \MediaWiki\Auth\PasswordAuthenticationRequest::class,
  4249. ];
  4250. /**
  4251. * Specifies the minimal length of a user password. If set to 0, empty pass-
  4252. * words are allowed.
  4253. * @deprecated since 1.26, use $wgPasswordPolicy's MinimalPasswordLength.
  4254. */
  4255. $wgMinimalPasswordLength = false;
  4256. /**
  4257. * Specifies the maximal length of a user password (T64685).
  4258. *
  4259. * It is not recommended to make this greater than the default, as it can
  4260. * allow DoS attacks by users setting really long passwords. In addition,
  4261. * this should not be lowered too much, as it enforces weak passwords.
  4262. *
  4263. * @warning Unlike other password settings, user with passwords greater than
  4264. * the maximum will not be able to log in.
  4265. * @deprecated since 1.26, use $wgPasswordPolicy's MaximalPasswordLength.
  4266. */
  4267. $wgMaximalPasswordLength = false;
  4268. /**
  4269. * Specifies if users should be sent to a password-reset form on login, if their
  4270. * password doesn't meet the requirements of User::isValidPassword().
  4271. * @since 1.23
  4272. */
  4273. $wgInvalidPasswordReset = true;
  4274. /**
  4275. * Default password type to use when hashing user passwords
  4276. *
  4277. * @since 1.24
  4278. */
  4279. $wgPasswordDefault = 'pbkdf2';
  4280. /**
  4281. * Configuration for built-in password types. Maps the password type
  4282. * to an array of options. The 'class' option is the Password class to
  4283. * use. All other options are class-dependent.
  4284. *
  4285. * An advanced example:
  4286. * @code
  4287. * $wgPasswordConfig['bcrypt-peppered'] = [
  4288. * 'class' => EncryptedPassword::class,
  4289. * 'underlying' => 'bcrypt',
  4290. * 'secrets' => [
  4291. * hash( 'sha256', 'secret', true ),
  4292. * ],
  4293. * 'cipher' => 'aes-256-cbc',
  4294. * ];
  4295. * @endcode
  4296. *
  4297. * @since 1.24
  4298. */
  4299. $wgPasswordConfig = [
  4300. 'A' => [
  4301. 'class' => MWOldPassword::class,
  4302. ],
  4303. 'B' => [
  4304. 'class' => MWSaltedPassword::class,
  4305. ],
  4306. 'pbkdf2-legacyA' => [
  4307. 'class' => LayeredParameterizedPassword::class,
  4308. 'types' => [
  4309. 'A',
  4310. 'pbkdf2',
  4311. ],
  4312. ],
  4313. 'pbkdf2-legacyB' => [
  4314. 'class' => LayeredParameterizedPassword::class,
  4315. 'types' => [
  4316. 'B',
  4317. 'pbkdf2',
  4318. ],
  4319. ],
  4320. 'bcrypt' => [
  4321. 'class' => BcryptPassword::class,
  4322. 'cost' => 9,
  4323. ],
  4324. 'pbkdf2' => [
  4325. 'class' => Pbkdf2Password::class,
  4326. 'algo' => 'sha512',
  4327. 'cost' => '30000',
  4328. 'length' => '64',
  4329. ],
  4330. 'argon2' => [
  4331. 'class' => Argon2Password::class,
  4332. // Algorithm used:
  4333. // * 'argon2i' is optimized against side-channel attacks (PHP 7.2+)
  4334. // * 'argon2id' is optimized against both side-channel and GPU cracking (PHP 7.3+)
  4335. // * 'auto' to use best available algorithm. If you're using more than one server, be
  4336. // careful when you're mixing PHP versions because newer PHP might generate hashes that
  4337. // older versions might would not understand.
  4338. 'algo' => 'auto',
  4339. // The parameters below are the same as options accepted by password_hash().
  4340. // Set them to override that function's defaults.
  4341. //
  4342. // 'memory_cost' => PASSWORD_ARGON2_DEFAULT_MEMORY_COST,
  4343. // 'time_cost' => PASSWORD_ARGON2_DEFAULT_TIME_COST,
  4344. // 'threads' => PASSWORD_ARGON2_DEFAULT_THREADS,
  4345. ],
  4346. ];
  4347. /**
  4348. * Whether to allow password resets ("enter some identifying data, and we'll send an email
  4349. * with a temporary password you can use to get back into the account") identified by
  4350. * various bits of data. Setting all of these to false (or the whole variable to false)
  4351. * has the effect of disabling password resets entirely
  4352. */
  4353. $wgPasswordResetRoutes = [
  4354. 'username' => true,
  4355. 'email' => true,
  4356. ];
  4357. /**
  4358. * Maximum number of Unicode characters in signature
  4359. */
  4360. $wgMaxSigChars = 255;
  4361. /**
  4362. * Maximum number of bytes in username. You want to run the maintenance
  4363. * script ./maintenance/checkUsernames.php once you have changed this value.
  4364. */
  4365. $wgMaxNameChars = 255;
  4366. /**
  4367. * Array of usernames which may not be registered or logged in from
  4368. * Maintenance scripts can still use these
  4369. */
  4370. $wgReservedUsernames = [
  4371. 'MediaWiki default', // Default 'Main Page' and MediaWiki: message pages
  4372. 'Conversion script', // Used for the old Wikipedia software upgrade
  4373. 'Maintenance script', // Maintenance scripts which perform editing, image import script
  4374. 'Template namespace initialisation script', // Used in 1.2->1.3 upgrade
  4375. 'ScriptImporter', // Default user name used by maintenance/importSiteScripts.php
  4376. 'Unknown user', // Used in WikiImporter and RevisionStore for revisions with no author
  4377. 'msg:double-redirect-fixer', // Automatic double redirect fix
  4378. 'msg:usermessage-editor', // Default user for leaving user messages
  4379. 'msg:proxyblocker', // For $wgProxyList and Special:Blockme (removed in 1.22)
  4380. 'msg:sorbs', // For $wgEnableDnsBlacklist etc.
  4381. 'msg:spambot_username', // Used by cleanupSpam.php
  4382. 'msg:autochange-username', // Used by anon category RC entries (parser functions, Lua & purges)
  4383. ];
  4384. /**
  4385. * Settings added to this array will override the default globals for the user
  4386. * preferences used by anonymous visitors and newly created accounts.
  4387. * For instance, to disable editing on double clicks:
  4388. * $wgDefaultUserOptions ['editondblclick'] = 0;
  4389. */
  4390. $wgDefaultUserOptions = [
  4391. 'ccmeonemails' => 0,
  4392. 'cols' => 80, // @deprecated since 1.29 No longer used in core
  4393. 'date' => 'default',
  4394. 'diffonly' => 0,
  4395. 'disablemail' => 0,
  4396. 'editfont' => 'monospace',
  4397. 'editondblclick' => 0,
  4398. 'editsectiononrightclick' => 0,
  4399. 'email-allow-new-users' => 1,
  4400. 'enotifminoredits' => 0,
  4401. 'enotifrevealaddr' => 0,
  4402. 'enotifusertalkpages' => 1,
  4403. 'enotifwatchlistpages' => 1,
  4404. 'extendwatchlist' => 1,
  4405. 'fancysig' => 0,
  4406. 'forceeditsummary' => 0,
  4407. 'gender' => 'unknown',
  4408. 'hideminor' => 0,
  4409. 'hidepatrolled' => 0,
  4410. 'hidecategorization' => 1,
  4411. 'imagesize' => 2,
  4412. 'minordefault' => 0,
  4413. 'newpageshidepatrolled' => 0,
  4414. 'nickname' => '',
  4415. 'norollbackdiff' => 0,
  4416. 'numberheadings' => 0,
  4417. 'previewonfirst' => 0,
  4418. 'previewontop' => 1,
  4419. 'rcdays' => 7,
  4420. 'rcenhancedfilters-disable' => 0,
  4421. 'rclimit' => 50,
  4422. 'rows' => 25, // @deprecated since 1.29 No longer used in core
  4423. 'showhiddencats' => 0,
  4424. 'shownumberswatching' => 1,
  4425. 'showrollbackconfirmation' => 0,
  4426. 'skin' => false,
  4427. 'stubthreshold' => 0,
  4428. 'thumbsize' => 5,
  4429. 'underline' => 2,
  4430. 'uselivepreview' => 0,
  4431. 'usenewrc' => 1,
  4432. 'watchcreations' => 1,
  4433. 'watchdefault' => 1,
  4434. 'watchdeletion' => 0,
  4435. 'watchuploads' => 1,
  4436. 'watchlistdays' => 7.0,
  4437. 'watchlisthideanons' => 0,
  4438. 'watchlisthidebots' => 0,
  4439. 'watchlisthideliu' => 0,
  4440. 'watchlisthideminor' => 0,
  4441. 'watchlisthideown' => 0,
  4442. 'watchlisthidepatrolled' => 0,
  4443. 'watchlisthidecategorization' => 1,
  4444. 'watchlistreloadautomatically' => 0,
  4445. 'watchlistunwatchlinks' => 0,
  4446. 'watchmoves' => 0,
  4447. 'watchrollback' => 0,
  4448. 'wlenhancedfilters-disable' => 0,
  4449. 'wllimit' => 250,
  4450. 'useeditwarning' => 1,
  4451. 'prefershttps' => 1,
  4452. 'requireemail' => 0,
  4453. ];
  4454. /**
  4455. * An array of preferences to not show for the user
  4456. */
  4457. $wgHiddenPrefs = [];
  4458. /**
  4459. * Characters to prevent during new account creations.
  4460. * This is used in a regular expression character class during
  4461. * registration (regex metacharacters like / are escaped).
  4462. */
  4463. $wgInvalidUsernameCharacters = '@:';
  4464. /**
  4465. * Character used as a delimiter when testing for interwiki userrights
  4466. * (In Special:UserRights, it is possible to modify users on different
  4467. * databases if the delimiter is used, e.g. "Someuser@enwiki").
  4468. *
  4469. * It is recommended that you have this delimiter in
  4470. * $wgInvalidUsernameCharacters above, or you will not be able to
  4471. * modify the user rights of those users via Special:UserRights
  4472. */
  4473. $wgUserrightsInterwikiDelimiter = '@';
  4474. /**
  4475. * This is to let user authenticate using https when they come from http.
  4476. * Based on an idea by George Herbert on wikitech-l:
  4477. * https://lists.wikimedia.org/pipermail/wikitech-l/2010-October/050039.html
  4478. * @since 1.17
  4479. */
  4480. $wgSecureLogin = false;
  4481. /**
  4482. * Versioning for authentication tokens.
  4483. *
  4484. * If non-null, this is combined with the user's secret (the user_token field
  4485. * in the DB) to generate the token cookie. Changing this will invalidate all
  4486. * active sessions (i.e. it will log everyone out).
  4487. *
  4488. * @since 1.27
  4489. * @var string|null
  4490. */
  4491. $wgAuthenticationTokenVersion = null;
  4492. /**
  4493. * MediaWiki\Session\SessionProvider configuration.
  4494. *
  4495. * Value is an array of ObjectFactory specifications for the SessionProviders
  4496. * to be used. Keys in the array are ignored. Order is not significant.
  4497. *
  4498. * @since 1.27
  4499. */
  4500. $wgSessionProviders = [
  4501. MediaWiki\Session\CookieSessionProvider::class => [
  4502. 'class' => MediaWiki\Session\CookieSessionProvider::class,
  4503. 'args' => [ [
  4504. 'priority' => 30,
  4505. 'callUserSetCookiesHook' => true,
  4506. ] ],
  4507. ],
  4508. MediaWiki\Session\BotPasswordSessionProvider::class => [
  4509. 'class' => MediaWiki\Session\BotPasswordSessionProvider::class,
  4510. 'args' => [ [
  4511. 'priority' => 75,
  4512. ] ],
  4513. ],
  4514. ];
  4515. /**
  4516. * Temporary feature flag that controls whether users will see a checkbox allowing them to
  4517. * require providing email during password resets.
  4518. *
  4519. * @deprecated This feature is under development, don't assume this flag's existence or function
  4520. * outside of MediaWiki.
  4521. */
  4522. $wgAllowRequiringEmailForResets = false;
  4523. /** @} */ # end user accounts }
  4524. /************************************************************************//**
  4525. * @name User rights, access control and monitoring
  4526. * @{
  4527. */
  4528. /**
  4529. * Number of seconds before autoblock entries expire. Default 86400 = 1 day.
  4530. */
  4531. $wgAutoblockExpiry = 86400;
  4532. /**
  4533. * Set this to true to allow blocked users to edit their own user talk page.
  4534. *
  4535. * This only applies to sitewide blocks. Partial blocks always allow users to
  4536. * edit their own user talk page unless otherwise specified in the block
  4537. * restrictions.
  4538. */
  4539. $wgBlockAllowsUTEdit = true;
  4540. /**
  4541. * Allow sysops to ban users from accessing Emailuser
  4542. * @deprecated since 1.34; `$wgGroupPermissions['sysop']['blockemail'] = true;`
  4543. * should be used instead
  4544. */
  4545. $wgSysopEmailBans = true;
  4546. /**
  4547. * Limits on the possible sizes of range blocks.
  4548. *
  4549. * CIDR notation is hard to understand, it's easy to mistakenly assume that a
  4550. * /1 is a small range and a /31 is a large range. For IPv4, setting a limit of
  4551. * half the number of bits avoids such errors, and allows entire ISPs to be
  4552. * blocked using a small number of range blocks.
  4553. *
  4554. * For IPv6, RFC 3177 recommends that a /48 be allocated to every residential
  4555. * customer, so range blocks larger than /64 (half the number of bits) will
  4556. * plainly be required. RFC 4692 implies that a very large ISP may be
  4557. * allocated a /19 if a generous HD-Ratio of 0.8 is used, so we will use that
  4558. * as our limit. As of 2012, blocking the whole world would require a /4 range.
  4559. */
  4560. $wgBlockCIDRLimit = [
  4561. 'IPv4' => 16, # Blocks larger than a /16 (64k addresses) will not be allowed
  4562. 'IPv6' => 19,
  4563. ];
  4564. /**
  4565. * If true, blocked users will not be allowed to login. When using this with
  4566. * a public wiki, the effect of logging out blocked users may actually be
  4567. * avers: unless the user's address is also blocked (e.g. auto-block),
  4568. * logging the user out will again allow reading and editing, just as for
  4569. * anonymous visitors.
  4570. */
  4571. $wgBlockDisablesLogin = false;
  4572. /**
  4573. * Pages anonymous user may see, set as an array of pages titles.
  4574. *
  4575. * @par Example:
  4576. * @code
  4577. * $wgWhitelistRead = array ( "Main Page", "Wikipedia:Help");
  4578. * @endcode
  4579. *
  4580. * Special:Userlogin and Special:ChangePassword are always whitelisted.
  4581. *
  4582. * @note This will only work if $wgGroupPermissions['*']['read'] is false --
  4583. * see below. Otherwise, ALL pages are accessible, regardless of this setting.
  4584. *
  4585. * @note Also that this will only protect _pages in the wiki_. Uploaded files
  4586. * will remain readable. You can use img_auth.php to protect uploaded files,
  4587. * see https://www.mediawiki.org/wiki/Manual:Image_Authorization
  4588. *
  4589. * @note Extensions should not modify this, but use the TitleReadWhitelist
  4590. * hook instead.
  4591. */
  4592. $wgWhitelistRead = false;
  4593. /**
  4594. * Pages anonymous user may see, set as an array of regular expressions.
  4595. *
  4596. * This function will match the regexp against the title name, which
  4597. * is without underscore.
  4598. *
  4599. * @par Example:
  4600. * To whitelist [[Main Page]]:
  4601. * @code
  4602. * $wgWhitelistReadRegexp = [ "/Main Page/" ];
  4603. * @endcode
  4604. *
  4605. * @note Unless ^ and/or $ is specified, a regular expression might match
  4606. * pages not intended to be whitelisted. The above example will also
  4607. * whitelist a page named 'Security Main Page'.
  4608. *
  4609. * @par Example:
  4610. * To allow reading any page starting with 'User' regardless of the case:
  4611. * @code
  4612. * $wgWhitelistReadRegexp = [ "@^UsEr.*@i" ];
  4613. * @endcode
  4614. * Will allow both [[User is banned]] and [[User:JohnDoe]]
  4615. *
  4616. * @note This will only work if $wgGroupPermissions['*']['read'] is false --
  4617. * see below. Otherwise, ALL pages are accessible, regardless of this setting.
  4618. */
  4619. $wgWhitelistReadRegexp = false;
  4620. /**
  4621. * Should editors be required to have a validated e-mail
  4622. * address before being allowed to edit?
  4623. */
  4624. $wgEmailConfirmToEdit = false;
  4625. /**
  4626. * Should MediaWiki attempt to protect user's privacy when doing redirects?
  4627. * Keep this true if access counts to articles are made public.
  4628. */
  4629. $wgHideIdentifiableRedirects = true;
  4630. /**
  4631. * Permission keys given to users in each group.
  4632. *
  4633. * This is an array where the keys are all groups and each value is an
  4634. * array of the format (right => boolean).
  4635. *
  4636. * The second format is used to support per-namespace permissions.
  4637. * Note that this feature does not fully work for all permission types.
  4638. *
  4639. * All users are implicitly in the '*' group including anonymous visitors;
  4640. * logged-in users are all implicitly in the 'user' group. These will be
  4641. * combined with the permissions of all groups that a given user is listed
  4642. * in in the user_groups table.
  4643. *
  4644. * Note: Don't set $wgGroupPermissions = []; unless you know what you're
  4645. * doing! This will wipe all permissions, and may mean that your users are
  4646. * unable to perform certain essential tasks or access new functionality
  4647. * when new permissions are introduced and default grants established.
  4648. *
  4649. * Functionality to make pages inaccessible has not been extensively tested
  4650. * for security. Use at your own risk!
  4651. *
  4652. * This replaces $wgWhitelistAccount and $wgWhitelistEdit
  4653. */
  4654. $wgGroupPermissions = [];
  4655. /** @cond file_level_code */
  4656. // Implicit group for all visitors
  4657. $wgGroupPermissions['*']['createaccount'] = true;
  4658. $wgGroupPermissions['*']['read'] = true;
  4659. $wgGroupPermissions['*']['edit'] = true;
  4660. $wgGroupPermissions['*']['createpage'] = true;
  4661. $wgGroupPermissions['*']['createtalk'] = true;
  4662. $wgGroupPermissions['*']['writeapi'] = true;
  4663. $wgGroupPermissions['*']['viewmywatchlist'] = true;
  4664. $wgGroupPermissions['*']['editmywatchlist'] = true;
  4665. $wgGroupPermissions['*']['viewmyprivateinfo'] = true;
  4666. $wgGroupPermissions['*']['editmyprivateinfo'] = true;
  4667. $wgGroupPermissions['*']['editmyoptions'] = true;
  4668. # $wgGroupPermissions['*']['patrolmarks'] = false; // let anons see what was patrolled
  4669. // Implicit group for all logged-in accounts
  4670. $wgGroupPermissions['user']['move'] = true;
  4671. $wgGroupPermissions['user']['move-subpages'] = true;
  4672. $wgGroupPermissions['user']['move-rootuserpages'] = true; // can move root userpages
  4673. $wgGroupPermissions['user']['move-categorypages'] = true;
  4674. $wgGroupPermissions['user']['movefile'] = true;
  4675. $wgGroupPermissions['user']['read'] = true;
  4676. $wgGroupPermissions['user']['edit'] = true;
  4677. $wgGroupPermissions['user']['createpage'] = true;
  4678. $wgGroupPermissions['user']['createtalk'] = true;
  4679. $wgGroupPermissions['user']['writeapi'] = true;
  4680. $wgGroupPermissions['user']['upload'] = true;
  4681. $wgGroupPermissions['user']['reupload'] = true;
  4682. $wgGroupPermissions['user']['reupload-shared'] = true;
  4683. $wgGroupPermissions['user']['minoredit'] = true;
  4684. $wgGroupPermissions['user']['editmyusercss'] = true;
  4685. $wgGroupPermissions['user']['editmyuserjson'] = true;
  4686. $wgGroupPermissions['user']['editmyuserjs'] = true;
  4687. $wgGroupPermissions['user']['editmyuserjsredirect'] = true;
  4688. $wgGroupPermissions['user']['purge'] = true;
  4689. $wgGroupPermissions['user']['sendemail'] = true;
  4690. $wgGroupPermissions['user']['applychangetags'] = true;
  4691. $wgGroupPermissions['user']['changetags'] = true;
  4692. $wgGroupPermissions['user']['editcontentmodel'] = true;
  4693. // Implicit group for accounts that pass $wgAutoConfirmAge
  4694. $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
  4695. $wgGroupPermissions['autoconfirmed']['editsemiprotected'] = true;
  4696. // Users with bot privilege can have their edits hidden
  4697. // from various log pages by default
  4698. $wgGroupPermissions['bot']['bot'] = true;
  4699. $wgGroupPermissions['bot']['autoconfirmed'] = true;
  4700. $wgGroupPermissions['bot']['editsemiprotected'] = true;
  4701. $wgGroupPermissions['bot']['nominornewtalk'] = true;
  4702. $wgGroupPermissions['bot']['autopatrol'] = true;
  4703. $wgGroupPermissions['bot']['suppressredirect'] = true;
  4704. $wgGroupPermissions['bot']['apihighlimits'] = true;
  4705. $wgGroupPermissions['bot']['writeapi'] = true;
  4706. // Most extra permission abilities go to this group
  4707. $wgGroupPermissions['sysop']['block'] = true;
  4708. $wgGroupPermissions['sysop']['createaccount'] = true;
  4709. $wgGroupPermissions['sysop']['delete'] = true;
  4710. // can be separately configured for pages with > $wgDeleteRevisionsLimit revs
  4711. $wgGroupPermissions['sysop']['bigdelete'] = true;
  4712. // can view deleted history entries, but not see or restore the text
  4713. $wgGroupPermissions['sysop']['deletedhistory'] = true;
  4714. // can view deleted revision text
  4715. $wgGroupPermissions['sysop']['deletedtext'] = true;
  4716. $wgGroupPermissions['sysop']['undelete'] = true;
  4717. $wgGroupPermissions['sysop']['editinterface'] = true;
  4718. $wgGroupPermissions['sysop']['editsitejson'] = true;
  4719. $wgGroupPermissions['sysop']['edituserjson'] = true;
  4720. $wgGroupPermissions['sysop']['import'] = true;
  4721. $wgGroupPermissions['sysop']['importupload'] = true;
  4722. $wgGroupPermissions['sysop']['move'] = true;
  4723. $wgGroupPermissions['sysop']['move-subpages'] = true;
  4724. $wgGroupPermissions['sysop']['move-rootuserpages'] = true;
  4725. $wgGroupPermissions['sysop']['move-categorypages'] = true;
  4726. $wgGroupPermissions['sysop']['patrol'] = true;
  4727. $wgGroupPermissions['sysop']['autopatrol'] = true;
  4728. $wgGroupPermissions['sysop']['protect'] = true;
  4729. $wgGroupPermissions['sysop']['editprotected'] = true;
  4730. $wgGroupPermissions['sysop']['rollback'] = true;
  4731. $wgGroupPermissions['sysop']['upload'] = true;
  4732. $wgGroupPermissions['sysop']['reupload'] = true;
  4733. $wgGroupPermissions['sysop']['reupload-shared'] = true;
  4734. $wgGroupPermissions['sysop']['unwatchedpages'] = true;
  4735. $wgGroupPermissions['sysop']['autoconfirmed'] = true;
  4736. $wgGroupPermissions['sysop']['editsemiprotected'] = true;
  4737. $wgGroupPermissions['sysop']['ipblock-exempt'] = true;
  4738. $wgGroupPermissions['sysop']['blockemail'] = true;
  4739. $wgGroupPermissions['sysop']['markbotedits'] = true;
  4740. $wgGroupPermissions['sysop']['apihighlimits'] = true;
  4741. $wgGroupPermissions['sysop']['browsearchive'] = true;
  4742. $wgGroupPermissions['sysop']['noratelimit'] = true;
  4743. $wgGroupPermissions['sysop']['movefile'] = true;
  4744. $wgGroupPermissions['sysop']['unblockself'] = true;
  4745. $wgGroupPermissions['sysop']['suppressredirect'] = true;
  4746. # $wgGroupPermissions['sysop']['pagelang'] = true;
  4747. # $wgGroupPermissions['sysop']['upload_by_url'] = true;
  4748. $wgGroupPermissions['sysop']['mergehistory'] = true;
  4749. $wgGroupPermissions['sysop']['managechangetags'] = true;
  4750. $wgGroupPermissions['sysop']['deletechangetags'] = true;
  4751. $wgGroupPermissions['interface-admin']['editinterface'] = true;
  4752. $wgGroupPermissions['interface-admin']['editsitecss'] = true;
  4753. $wgGroupPermissions['interface-admin']['editsitejson'] = true;
  4754. $wgGroupPermissions['interface-admin']['editsitejs'] = true;
  4755. $wgGroupPermissions['interface-admin']['editusercss'] = true;
  4756. $wgGroupPermissions['interface-admin']['edituserjson'] = true;
  4757. $wgGroupPermissions['interface-admin']['edituserjs'] = true;
  4758. // Permission to change users' group assignments
  4759. $wgGroupPermissions['bureaucrat']['userrights'] = true;
  4760. $wgGroupPermissions['bureaucrat']['noratelimit'] = true;
  4761. // Permission to change users' groups assignments across wikis
  4762. # $wgGroupPermissions['bureaucrat']['userrights-interwiki'] = true;
  4763. // Permission to export pages including linked pages regardless of $wgExportMaxLinkDepth
  4764. # $wgGroupPermissions['bureaucrat']['override-export-depth'] = true;
  4765. # $wgGroupPermissions['sysop']['deletelogentry'] = true;
  4766. # $wgGroupPermissions['sysop']['deleterevision'] = true;
  4767. // To hide usernames from users and Sysops
  4768. $wgGroupPermissions['suppress']['hideuser'] = true;
  4769. // To hide revisions/log items from users and Sysops
  4770. $wgGroupPermissions['suppress']['suppressrevision'] = true;
  4771. // To view revisions/log items hidden from users and Sysops
  4772. $wgGroupPermissions['suppress']['viewsuppressed'] = true;
  4773. // For private suppression log access
  4774. $wgGroupPermissions['suppress']['suppressionlog'] = true;
  4775. // Basic rights for revision delete
  4776. $wgGroupPermissions['suppress']['deleterevision'] = true;
  4777. $wgGroupPermissions['suppress']['deletelogentry'] = true;
  4778. /**
  4779. * The developer group is deprecated, but can be activated if need be
  4780. * to use the 'lockdb' and 'unlockdb' special pages. Those require
  4781. * that a lock file be defined and creatable/removable by the web
  4782. * server.
  4783. */
  4784. # $wgGroupPermissions['developer']['siteadmin'] = true;
  4785. /** @endcond */
  4786. /**
  4787. * Permission keys revoked from users in each group.
  4788. *
  4789. * This acts the same way as wgGroupPermissions above, except that
  4790. * if the user is in a group here, the permission will be removed from them.
  4791. *
  4792. * Improperly setting this could mean that your users will be unable to perform
  4793. * certain essential tasks, so use at your own risk!
  4794. */
  4795. $wgRevokePermissions = [];
  4796. /**
  4797. * Implicit groups, aren't shown on Special:Listusers or somewhere else
  4798. */
  4799. $wgImplicitGroups = [ '*', 'user', 'autoconfirmed' ];
  4800. /**
  4801. * A map of group names that the user is in, to group names that those users
  4802. * are allowed to add or revoke.
  4803. *
  4804. * Setting the list of groups to add or revoke to true is equivalent to "any
  4805. * group".
  4806. *
  4807. * @par Example:
  4808. * To allow sysops to add themselves to the "bot" group:
  4809. * @code
  4810. * $wgGroupsAddToSelf = [ 'sysop' => [ 'bot' ] ];
  4811. * @endcode
  4812. *
  4813. * @par Example:
  4814. * Implicit groups may be used for the source group, for instance:
  4815. * @code
  4816. * $wgGroupsRemoveFromSelf = [ '*' => true ];
  4817. * @endcode
  4818. * This allows users in the '*' group (i.e. any user) to remove themselves from
  4819. * any group that they happen to be in.
  4820. */
  4821. $wgGroupsAddToSelf = [];
  4822. /**
  4823. * @see $wgGroupsAddToSelf
  4824. */
  4825. $wgGroupsRemoveFromSelf = [];
  4826. /**
  4827. * Set of available actions that can be restricted via action=protect
  4828. * You probably shouldn't change this.
  4829. * Translated through restriction-* messages.
  4830. * Title::getRestrictionTypes() will remove restrictions that are not
  4831. * applicable to a specific title (create and upload)
  4832. */
  4833. $wgRestrictionTypes = [ 'create', 'edit', 'move', 'upload' ];
  4834. /**
  4835. * Rights which can be required for each protection level (via action=protect)
  4836. *
  4837. * You can add a new protection level that requires a specific
  4838. * permission by manipulating this array. The ordering of elements
  4839. * dictates the order on the protection form's lists.
  4840. *
  4841. * - '' will be ignored (i.e. unprotected)
  4842. * - 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility
  4843. * - 'sysop' is quietly rewritten to 'editprotected' for backwards compatibility
  4844. */
  4845. $wgRestrictionLevels = [ '', 'autoconfirmed', 'sysop' ];
  4846. /**
  4847. * Restriction levels that can be used with cascading protection
  4848. *
  4849. * A page can only be protected with cascading protection if the
  4850. * requested restriction level is included in this array.
  4851. *
  4852. * 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility.
  4853. * 'sysop' is quietly rewritten to 'editprotected' for backwards compatibility.
  4854. */
  4855. $wgCascadingRestrictionLevels = [ 'sysop' ];
  4856. /**
  4857. * Restriction levels that should be considered "semiprotected"
  4858. *
  4859. * Certain places in the interface recognize a dichotomy between "protected"
  4860. * and "semiprotected", without further distinguishing the specific levels. In
  4861. * general, if anyone can be eligible to edit a protection level merely by
  4862. * reaching some condition in $wgAutopromote, it should probably be considered
  4863. * "semiprotected".
  4864. *
  4865. * 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility.
  4866. * 'sysop' is not changed, since it really shouldn't be here.
  4867. */
  4868. $wgSemiprotectedRestrictionLevels = [ 'autoconfirmed' ];
  4869. /**
  4870. * Set the minimum permissions required to edit pages in each
  4871. * namespace. If you list more than one permission, a user must
  4872. * have all of them to edit pages in that namespace.
  4873. *
  4874. * @note NS_MEDIAWIKI is implicitly restricted to 'editinterface'.
  4875. */
  4876. $wgNamespaceProtection = [];
  4877. /**
  4878. * Pages in namespaces in this array can not be used as templates.
  4879. *
  4880. * Elements MUST be numeric namespace ids, you can safely use the MediaWiki
  4881. * namespaces constants (NS_USER, NS_MAIN...).
  4882. *
  4883. * Among other things, this may be useful to enforce read-restrictions
  4884. * which may otherwise be bypassed by using the template mechanism.
  4885. */
  4886. $wgNonincludableNamespaces = [];
  4887. /**
  4888. * Number of seconds an account is required to age before it's given the
  4889. * implicit 'autoconfirm' group membership. This can be used to limit
  4890. * privileges of new accounts.
  4891. *
  4892. * Accounts created by earlier versions of the software may not have a
  4893. * recorded creation date, and will always be considered to pass the age test.
  4894. *
  4895. * When left at 0, all registered accounts will pass.
  4896. *
  4897. * @par Example:
  4898. * Set automatic confirmation to 10 minutes (which is 600 seconds):
  4899. * @code
  4900. * $wgAutoConfirmAge = 600; // ten minutes
  4901. * @endcode
  4902. * Set age to one day:
  4903. * @code
  4904. * $wgAutoConfirmAge = 3600*24; // one day
  4905. * @endcode
  4906. */
  4907. $wgAutoConfirmAge = 0;
  4908. /**
  4909. * Number of edits an account requires before it is autoconfirmed.
  4910. * Passing both this AND the time requirement is needed. Example:
  4911. *
  4912. * @par Example:
  4913. * @code
  4914. * $wgAutoConfirmCount = 50;
  4915. * @endcode
  4916. */
  4917. $wgAutoConfirmCount = 0;
  4918. /**
  4919. * Array containing the conditions of automatic promotion of a user to specific groups.
  4920. *
  4921. * The basic syntax for `$wgAutopromote` is:
  4922. *
  4923. * $wgAutopromote = [
  4924. * 'groupname' => cond,
  4925. * 'group2' => cond2,
  4926. * ];
  4927. *
  4928. * A `cond` may be:
  4929. * - a single condition without arguments:
  4930. * Note that Autopromote wraps a single non-array value into an array
  4931. * e.g. `APCOND_EMAILCONFIRMED` OR
  4932. * [ `APCOND_EMAILCONFIRMED` ]
  4933. * - a single condition with arguments:
  4934. * e.g. `[ APCOND_EDITCOUNT, 100 ]`
  4935. * - a set of conditions:
  4936. * e.g. `[ 'operand', cond1, cond2, ... ]`
  4937. *
  4938. * When constructing a set of conditions, the following conditions are available:
  4939. * - `&` (**AND**):
  4940. * promote if user matches **ALL** conditions
  4941. * - `|` (**OR**):
  4942. * promote if user matches **ANY** condition
  4943. * - `^` (**XOR**):
  4944. * promote if user matches **ONLY ONE OF THE CONDITIONS**
  4945. * - `!` (**NOT**):
  4946. * promote if user matces **NO** condition
  4947. * - [ APCOND_EMAILCONFIRMED ]:
  4948. * true if user has a confirmed e-mail
  4949. * - [ APCOND_EDITCOUNT, number of edits ]:
  4950. * true if user has the at least the number of edits as the passed parameter
  4951. * - [ APCOND_AGE, seconds since registration ]:
  4952. * true if the length of time since the user created his/her account
  4953. * is at least the same length of time as the passed parameter
  4954. * - [ APCOND_AGE_FROM_EDIT, seconds since first edit ]:
  4955. * true if the length of time since the user made his/her first edit
  4956. * is at least the same length of time as the passed parameter
  4957. * - [ APCOND_INGROUPS, group1, group2, ... ]:
  4958. * true if the user is a member of each of the passed groups
  4959. * - [ APCOND_ISIP, ip ]:
  4960. * true if the user has the passed IP address
  4961. * - [ APCOND_IPINRANGE, range ]:
  4962. * true if the user has an IP address in the range of the passed parameter
  4963. * - [ APCOND_BLOCKED ]:
  4964. * true if the user is sitewide blocked
  4965. * - [ APCOND_ISBOT ]:
  4966. * true if the user is a bot
  4967. * - similar constructs can be defined by extensions
  4968. *
  4969. * The sets of conditions are evaluated recursively, so you can use nested sets of conditions
  4970. * linked by operands.
  4971. *
  4972. * Note that if $wgEmailAuthentication is disabled, APCOND_EMAILCONFIRMED will be true for any
  4973. * user who has provided an e-mail address.
  4974. */
  4975. $wgAutopromote = [
  4976. 'autoconfirmed' => [ '&',
  4977. [ APCOND_EDITCOUNT, &$wgAutoConfirmCount ],
  4978. [ APCOND_AGE, &$wgAutoConfirmAge ],
  4979. ],
  4980. ];
  4981. /**
  4982. * Automatically add a usergroup to any user who matches certain conditions.
  4983. *
  4984. * Does not add the user to the group again if it has been removed.
  4985. * Also, does not remove the group if the user no longer meets the criteria.
  4986. *
  4987. * The format is:
  4988. * @code
  4989. * [ event => criteria, ... ]
  4990. * @endcode
  4991. * Where event is either:
  4992. * - 'onEdit' (when user edits)
  4993. *
  4994. * Criteria has the same format as $wgAutopromote
  4995. *
  4996. * @see $wgAutopromote
  4997. * @since 1.18
  4998. */
  4999. $wgAutopromoteOnce = [
  5000. 'onEdit' => [],
  5001. ];
  5002. /**
  5003. * Put user rights log entries for autopromotion in recent changes?
  5004. * @since 1.18
  5005. */
  5006. $wgAutopromoteOnceLogInRC = true;
  5007. /**
  5008. * $wgAddGroups and $wgRemoveGroups can be used to give finer control over who
  5009. * can assign which groups at Special:Userrights.
  5010. *
  5011. * @par Example:
  5012. * Bureaucrats can add any group:
  5013. * @code
  5014. * $wgAddGroups['bureaucrat'] = true;
  5015. * @endcode
  5016. * Bureaucrats can only remove bots and sysops:
  5017. * @code
  5018. * $wgRemoveGroups['bureaucrat'] = [ 'bot', 'sysop' ];
  5019. * @endcode
  5020. * Sysops can make bots:
  5021. * @code
  5022. * $wgAddGroups['sysop'] = [ 'bot' ];
  5023. * @endcode
  5024. * Sysops can disable other sysops in an emergency, and disable bots:
  5025. * @code
  5026. * $wgRemoveGroups['sysop'] = [ 'sysop', 'bot' ];
  5027. * @endcode
  5028. */
  5029. $wgAddGroups = [];
  5030. /**
  5031. * @see $wgAddGroups
  5032. */
  5033. $wgRemoveGroups = [];
  5034. /**
  5035. * A list of available rights, in addition to the ones defined by the core.
  5036. * For extensions only.
  5037. */
  5038. $wgAvailableRights = [];
  5039. /**
  5040. * Optional to restrict deletion of pages with higher revision counts
  5041. * to users with the 'bigdelete' permission. (Default given to sysops.)
  5042. */
  5043. $wgDeleteRevisionsLimit = 0;
  5044. /**
  5045. * Page deletions with > this number of revisions will use the job queue.
  5046. * Revisions will be archived in batches of (at most) this size, one batch per job.
  5047. */
  5048. $wgDeleteRevisionsBatchSize = 1000;
  5049. /**
  5050. * The maximum number of edits a user can have and
  5051. * can still be hidden by users with the hideuser permission.
  5052. * This is limited for performance reason.
  5053. * Set to false to disable the limit.
  5054. * @since 1.23
  5055. */
  5056. $wgHideUserContribLimit = 1000;
  5057. /**
  5058. * Number of accounts each IP address may create per specified period(s).
  5059. *
  5060. * @par Example:
  5061. * @code
  5062. * $wgAccountCreationThrottle = [
  5063. * // no more than 100 per month
  5064. * [
  5065. * 'count' => 100,
  5066. * 'seconds' => 30*86400,
  5067. * ],
  5068. * // no more than 10 per day
  5069. * [
  5070. * 'count' => 10,
  5071. * 'seconds' => 86400,
  5072. * ],
  5073. * ];
  5074. * @endcode
  5075. *
  5076. * @warning Requires $wgMainCacheType to be enabled
  5077. */
  5078. $wgAccountCreationThrottle = [ [
  5079. 'count' => 0,
  5080. 'seconds' => 86400,
  5081. ] ];
  5082. /**
  5083. * Edits matching these regular expressions in body text
  5084. * will be recognised as spam and rejected automatically.
  5085. *
  5086. * There's no administrator override on-wiki, so be careful what you set. :)
  5087. * May be an array of regexes or a single string for backwards compatibility.
  5088. *
  5089. * @see https://en.wikipedia.org/wiki/Regular_expression
  5090. *
  5091. * @note Each regex needs a beginning/end delimiter, eg: # or /
  5092. */
  5093. $wgSpamRegex = [];
  5094. /**
  5095. * Same as the above except for edit summaries
  5096. */
  5097. $wgSummarySpamRegex = [];
  5098. /**
  5099. * Whether to use DNS blacklists in $wgDnsBlacklistUrls to check for open
  5100. * proxies
  5101. * @since 1.16
  5102. */
  5103. $wgEnableDnsBlacklist = false;
  5104. /**
  5105. * List of DNS blacklists to use, if $wgEnableDnsBlacklist is true.
  5106. *
  5107. * This is an array of either a URL or an array with the URL and a key (should
  5108. * the blacklist require a key).
  5109. *
  5110. * @par Example:
  5111. * @code
  5112. * $wgDnsBlacklistUrls = [
  5113. * // String containing URL
  5114. * 'http.dnsbl.sorbs.net.',
  5115. * // Array with URL and key, for services that require a key
  5116. * [ 'dnsbl.httpbl.net.', 'mykey' ],
  5117. * // Array with just the URL. While this works, it is recommended that you
  5118. * // just use a string as shown above
  5119. * [ 'opm.tornevall.org.' ]
  5120. * ];
  5121. * @endcode
  5122. *
  5123. * @note You should end the domain name with a . to avoid searching your
  5124. * eventual domain search suffixes.
  5125. * @since 1.16
  5126. */
  5127. $wgDnsBlacklistUrls = [ 'http.dnsbl.sorbs.net.' ];
  5128. /**
  5129. * Proxy whitelist, list of addresses that are assumed to be non-proxy despite
  5130. * what the other methods might say.
  5131. */
  5132. $wgProxyWhitelist = [];
  5133. /**
  5134. * IP ranges that should be considered soft-blocked (anon-only, account
  5135. * creation allowed). The intent is to use this to prevent anonymous edits from
  5136. * shared resources such as Wikimedia Labs.
  5137. * @since 1.29
  5138. * @var string[]
  5139. */
  5140. $wgSoftBlockRanges = [];
  5141. /**
  5142. * Whether to look at the X-Forwarded-For header's list of (potentially spoofed)
  5143. * IPs and apply IP blocks to them. This allows for IP blocks to work with correctly-configured
  5144. * (transparent) proxies without needing to block the proxies themselves.
  5145. */
  5146. $wgApplyIpBlocksToXff = false;
  5147. /**
  5148. * Simple rate limiter options to brake edit floods.
  5149. *
  5150. * Maximum number actions allowed in the given number of seconds; after that
  5151. * the violating client receives HTTP 500 error pages until the period
  5152. * elapses.
  5153. *
  5154. * @par Example:
  5155. * Limits per configured per action and then type of users.
  5156. * @code
  5157. * $wgRateLimits = [
  5158. * 'edit' => [
  5159. * 'anon' => [ x, y ], // any and all anonymous edits (aggregate)
  5160. * 'user' => [ x, y ], // each logged-in user
  5161. * 'newbie' => [ x, y ], // each new autoconfirmed accounts; overrides 'user'
  5162. * 'ip' => [ x, y ], // each anon and recent account
  5163. * 'subnet' => [ x, y ], // ... within a /24 subnet in IPv4 or /64 in IPv6
  5164. * 'groupName' => [ x, y ], // by group membership
  5165. * ]
  5166. * ];
  5167. * @endcode
  5168. *
  5169. * @par Normally, the 'noratelimit' right allows a user to bypass any rate
  5170. * limit checks. This can be disabled on a per-action basis by setting the
  5171. * special '&can-bypass' key to false in that action's configuration.
  5172. * @code
  5173. * $wgRateLimits = [
  5174. * 'some-action' => [
  5175. * '&can-bypass' => false,
  5176. * 'user' => [ x, y ],
  5177. * ];
  5178. * @endcode
  5179. *
  5180. * @warning Requires that $wgMainCacheType is set to something persistent
  5181. */
  5182. $wgRateLimits = [
  5183. // Page edits
  5184. 'edit' => [
  5185. 'ip' => [ 8, 60 ],
  5186. 'newbie' => [ 8, 60 ],
  5187. 'user' => [ 90, 60 ],
  5188. ],
  5189. // Page moves
  5190. 'move' => [
  5191. 'newbie' => [ 2, 120 ],
  5192. 'user' => [ 8, 60 ],
  5193. ],
  5194. // File uploads
  5195. 'upload' => [
  5196. 'ip' => [ 8, 60 ],
  5197. 'newbie' => [ 8, 60 ],
  5198. ],
  5199. // Page rollbacks
  5200. 'rollback' => [
  5201. 'user' => [ 10, 60 ],
  5202. 'newbie' => [ 5, 120 ]
  5203. ],
  5204. // Triggering password resets emails
  5205. 'mailpassword' => [
  5206. 'ip' => [ 5, 3600 ],
  5207. ],
  5208. // Emailing other users using MediaWiki
  5209. 'emailuser' => [
  5210. 'ip' => [ 5, 86400 ],
  5211. 'newbie' => [ 5, 86400 ],
  5212. 'user' => [ 20, 86400 ],
  5213. ],
  5214. 'changeemail' => [
  5215. 'ip-all' => [ 10, 3600 ],
  5216. 'user' => [ 4, 86400 ]
  5217. ],
  5218. // since 1.33 - rate limit email confirmations
  5219. 'confirmemail' => [
  5220. 'ip-all' => [ 10, 3600 ],
  5221. 'user' => [ 4, 86400 ]
  5222. ],
  5223. // Purging pages
  5224. 'purge' => [
  5225. 'ip' => [ 30, 60 ],
  5226. 'user' => [ 30, 60 ],
  5227. ],
  5228. // Purges of link tables
  5229. 'linkpurge' => [
  5230. 'ip' => [ 30, 60 ],
  5231. 'user' => [ 30, 60 ],
  5232. ],
  5233. // Files rendered via thumb.php or thumb_handler.php
  5234. 'renderfile' => [
  5235. 'ip' => [ 700, 30 ],
  5236. 'user' => [ 700, 30 ],
  5237. ],
  5238. // Same as above but for non-standard thumbnails
  5239. 'renderfile-nonstandard' => [
  5240. 'ip' => [ 70, 30 ],
  5241. 'user' => [ 70, 30 ],
  5242. ],
  5243. // Stashing edits into cache before save
  5244. 'stashedit' => [
  5245. 'ip' => [ 30, 60 ],
  5246. 'newbie' => [ 30, 60 ],
  5247. ],
  5248. // Adding or removing change tags
  5249. 'changetag' => [
  5250. 'ip' => [ 8, 60 ],
  5251. 'newbie' => [ 8, 60 ],
  5252. ],
  5253. // Changing the content model of a page
  5254. 'editcontentmodel' => [
  5255. 'newbie' => [ 2, 120 ],
  5256. 'user' => [ 8, 60 ],
  5257. ],
  5258. ];
  5259. /**
  5260. * Array of IPs / CIDR ranges which should be excluded from rate limits.
  5261. * This may be useful for whitelisting NAT gateways for conferences, etc.
  5262. */
  5263. $wgRateLimitsExcludedIPs = [];
  5264. /**
  5265. * Log IP addresses in the recentchanges table; can be accessed only by
  5266. * extensions (e.g. CheckUser) or a DB admin
  5267. * Used for retroactive autoblocks
  5268. */
  5269. $wgPutIPinRC = true;
  5270. /**
  5271. * Integer defining default number of entries to show on
  5272. * special pages which are query-pages such as Special:Whatlinkshere.
  5273. */
  5274. $wgQueryPageDefaultLimit = 50;
  5275. /**
  5276. * Limit password attempts to X attempts per Y seconds per IP per account.
  5277. *
  5278. * Value is an array of arrays. Each sub-array must have a key for count
  5279. * (ie count of how many attempts before throttle) and a key for seconds.
  5280. * If the key 'allIPs' (case sensitive) is present, then the limit is
  5281. * just per account instead of per IP per account.
  5282. *
  5283. * @since 1.27 allIps support and multiple limits added in 1.27. Prior
  5284. * to 1.27 this only supported having a single throttle.
  5285. * @warning Requires $wgMainCacheType to be enabled
  5286. */
  5287. $wgPasswordAttemptThrottle = [
  5288. // Short term limit
  5289. [ 'count' => 5, 'seconds' => 300 ],
  5290. // Long term limit. We need to balance the risk
  5291. // of somebody using this as a DoS attack to lock someone
  5292. // out of their account, and someone doing a brute force attack.
  5293. [ 'count' => 150, 'seconds' => 60 * 60 * 48 ],
  5294. ];
  5295. /**
  5296. * @var array Map of (grant => right => boolean)
  5297. * Users authorize consumers (like Apps) to act on their behalf but only with
  5298. * a subset of the user's normal account rights (signed off on by the user).
  5299. * The possible rights to grant to a consumer are bundled into groups called
  5300. * "grants". Each grant defines some rights it lets consumers inherit from the
  5301. * account they may act on behalf of. Note that a user granting a right does
  5302. * nothing if that user does not actually have that right to begin with.
  5303. * @since 1.27
  5304. */
  5305. $wgGrantPermissions = [];
  5306. // @TODO: clean up grants
  5307. // @TODO: auto-include read/editsemiprotected rights?
  5308. $wgGrantPermissions['basic']['autocreateaccount'] = true;
  5309. $wgGrantPermissions['basic']['autoconfirmed'] = true;
  5310. $wgGrantPermissions['basic']['autopatrol'] = true;
  5311. $wgGrantPermissions['basic']['editsemiprotected'] = true;
  5312. $wgGrantPermissions['basic']['ipblock-exempt'] = true;
  5313. $wgGrantPermissions['basic']['nominornewtalk'] = true;
  5314. $wgGrantPermissions['basic']['patrolmarks'] = true;
  5315. $wgGrantPermissions['basic']['purge'] = true;
  5316. $wgGrantPermissions['basic']['read'] = true;
  5317. $wgGrantPermissions['basic']['skipcaptcha'] = true;
  5318. $wgGrantPermissions['basic']['writeapi'] = true;
  5319. $wgGrantPermissions['highvolume']['bot'] = true;
  5320. $wgGrantPermissions['highvolume']['apihighlimits'] = true;
  5321. $wgGrantPermissions['highvolume']['noratelimit'] = true;
  5322. $wgGrantPermissions['highvolume']['markbotedits'] = true;
  5323. $wgGrantPermissions['editpage']['edit'] = true;
  5324. $wgGrantPermissions['editpage']['minoredit'] = true;
  5325. $wgGrantPermissions['editpage']['applychangetags'] = true;
  5326. $wgGrantPermissions['editpage']['changetags'] = true;
  5327. $wgGrantPermissions['editprotected'] = $wgGrantPermissions['editpage'];
  5328. $wgGrantPermissions['editprotected']['editprotected'] = true;
  5329. // FIXME: Rename editmycssjs to editmyconfig
  5330. $wgGrantPermissions['editmycssjs'] = $wgGrantPermissions['editpage'];
  5331. $wgGrantPermissions['editmycssjs']['editmyusercss'] = true;
  5332. $wgGrantPermissions['editmycssjs']['editmyuserjson'] = true;
  5333. $wgGrantPermissions['editmycssjs']['editmyuserjs'] = true;
  5334. $wgGrantPermissions['editmyoptions']['editmyoptions'] = true;
  5335. $wgGrantPermissions['editmyoptions']['editmyuserjson'] = true;
  5336. $wgGrantPermissions['editinterface'] = $wgGrantPermissions['editpage'];
  5337. $wgGrantPermissions['editinterface']['editinterface'] = true;
  5338. $wgGrantPermissions['editinterface']['edituserjson'] = true;
  5339. $wgGrantPermissions['editinterface']['editsitejson'] = true;
  5340. $wgGrantPermissions['editsiteconfig'] = $wgGrantPermissions['editinterface'];
  5341. $wgGrantPermissions['editsiteconfig']['editusercss'] = true;
  5342. $wgGrantPermissions['editsiteconfig']['edituserjs'] = true;
  5343. $wgGrantPermissions['editsiteconfig']['editsitecss'] = true;
  5344. $wgGrantPermissions['editsiteconfig']['editsitejs'] = true;
  5345. $wgGrantPermissions['createeditmovepage'] = $wgGrantPermissions['editpage'];
  5346. $wgGrantPermissions['createeditmovepage']['createpage'] = true;
  5347. $wgGrantPermissions['createeditmovepage']['createtalk'] = true;
  5348. $wgGrantPermissions['createeditmovepage']['move'] = true;
  5349. $wgGrantPermissions['createeditmovepage']['move-rootuserpages'] = true;
  5350. $wgGrantPermissions['createeditmovepage']['move-subpages'] = true;
  5351. $wgGrantPermissions['createeditmovepage']['move-categorypages'] = true;
  5352. $wgGrantPermissions['createeditmovepage']['suppressredirect'] = true;
  5353. $wgGrantPermissions['uploadfile']['upload'] = true;
  5354. $wgGrantPermissions['uploadfile']['reupload-own'] = true;
  5355. $wgGrantPermissions['uploadeditmovefile'] = $wgGrantPermissions['uploadfile'];
  5356. $wgGrantPermissions['uploadeditmovefile']['reupload'] = true;
  5357. $wgGrantPermissions['uploadeditmovefile']['reupload-shared'] = true;
  5358. $wgGrantPermissions['uploadeditmovefile']['upload_by_url'] = true;
  5359. $wgGrantPermissions['uploadeditmovefile']['movefile'] = true;
  5360. $wgGrantPermissions['uploadeditmovefile']['suppressredirect'] = true;
  5361. $wgGrantPermissions['patrol']['patrol'] = true;
  5362. $wgGrantPermissions['rollback']['rollback'] = true;
  5363. $wgGrantPermissions['blockusers']['block'] = true;
  5364. $wgGrantPermissions['blockusers']['blockemail'] = true;
  5365. $wgGrantPermissions['viewdeleted']['browsearchive'] = true;
  5366. $wgGrantPermissions['viewdeleted']['deletedhistory'] = true;
  5367. $wgGrantPermissions['viewdeleted']['deletedtext'] = true;
  5368. $wgGrantPermissions['viewrestrictedlogs']['suppressionlog'] = true;
  5369. $wgGrantPermissions['delete'] = $wgGrantPermissions['editpage'] +
  5370. $wgGrantPermissions['viewdeleted'];
  5371. $wgGrantPermissions['delete']['delete'] = true;
  5372. $wgGrantPermissions['delete']['bigdelete'] = true;
  5373. $wgGrantPermissions['delete']['deletelogentry'] = true;
  5374. $wgGrantPermissions['delete']['deleterevision'] = true;
  5375. $wgGrantPermissions['delete']['undelete'] = true;
  5376. $wgGrantPermissions['oversight']['suppressrevision'] = true;
  5377. $wgGrantPermissions['protect'] = $wgGrantPermissions['editprotected'];
  5378. $wgGrantPermissions['protect']['protect'] = true;
  5379. $wgGrantPermissions['viewmywatchlist']['viewmywatchlist'] = true;
  5380. $wgGrantPermissions['editmywatchlist']['editmywatchlist'] = true;
  5381. $wgGrantPermissions['sendemail']['sendemail'] = true;
  5382. $wgGrantPermissions['createaccount']['createaccount'] = true;
  5383. $wgGrantPermissions['privateinfo']['viewmyprivateinfo'] = true;
  5384. /**
  5385. * @var array Map of grants to their UI grouping
  5386. * @since 1.27
  5387. */
  5388. $wgGrantPermissionGroups = [
  5389. // Hidden grants are implicitly present
  5390. 'basic' => 'hidden',
  5391. 'editpage' => 'page-interaction',
  5392. 'createeditmovepage' => 'page-interaction',
  5393. 'editprotected' => 'page-interaction',
  5394. 'patrol' => 'page-interaction',
  5395. 'uploadfile' => 'file-interaction',
  5396. 'uploadeditmovefile' => 'file-interaction',
  5397. 'sendemail' => 'email',
  5398. 'viewmywatchlist' => 'watchlist-interaction',
  5399. 'editviewmywatchlist' => 'watchlist-interaction',
  5400. 'editmycssjs' => 'customization',
  5401. 'editmyoptions' => 'customization',
  5402. 'editinterface' => 'administration',
  5403. 'editsiteconfig' => 'administration',
  5404. 'rollback' => 'administration',
  5405. 'blockusers' => 'administration',
  5406. 'delete' => 'administration',
  5407. 'viewdeleted' => 'administration',
  5408. 'viewrestrictedlogs' => 'administration',
  5409. 'protect' => 'administration',
  5410. 'oversight' => 'administration',
  5411. 'createaccount' => 'administration',
  5412. 'highvolume' => 'high-volume',
  5413. 'privateinfo' => 'private-information',
  5414. ];
  5415. /**
  5416. * @var bool Whether to enable bot passwords
  5417. * @since 1.27
  5418. */
  5419. $wgEnableBotPasswords = true;
  5420. /**
  5421. * Cluster for the bot_passwords table
  5422. * @var string|bool If false, the normal cluster will be used
  5423. * @since 1.27
  5424. */
  5425. $wgBotPasswordsCluster = false;
  5426. /**
  5427. * Database name for the bot_passwords table
  5428. *
  5429. * To use a database with a table prefix, set this variable to
  5430. * "{$database}-{$prefix}".
  5431. * @var string|bool If false, the normal database will be used
  5432. * @since 1.27
  5433. */
  5434. $wgBotPasswordsDatabase = false;
  5435. /** @} */ # end of user rights settings
  5436. /************************************************************************//**
  5437. * @name Proxy scanner settings
  5438. * @{
  5439. */
  5440. /**
  5441. * This should always be customised in LocalSettings.php
  5442. */
  5443. $wgSecretKey = false;
  5444. /**
  5445. * Big list of banned IP addresses.
  5446. *
  5447. * This can have the following formats:
  5448. * - An array of addresses
  5449. * - A string, in which case this is the path to a file
  5450. * containing the list of IP addresses, one per line
  5451. */
  5452. $wgProxyList = [];
  5453. /** @} */ # end of proxy scanner settings
  5454. /************************************************************************//**
  5455. * @name Cookie settings
  5456. * @{
  5457. */
  5458. /**
  5459. * Default cookie lifetime, in seconds. Setting to 0 makes all cookies session-only.
  5460. */
  5461. $wgCookieExpiration = 30 * 86400;
  5462. /**
  5463. * Default login cookie lifetime, in seconds. Setting
  5464. * $wgExtendLoginCookieExpiration to null will use $wgCookieExpiration to
  5465. * calculate the cookie lifetime. As with $wgCookieExpiration, 0 will make
  5466. * login cookies session-only.
  5467. */
  5468. $wgExtendedLoginCookieExpiration = 180 * 86400;
  5469. /**
  5470. * Set to set an explicit domain on the login cookies eg, "justthis.domain.org"
  5471. * or ".any.subdomain.net"
  5472. */
  5473. $wgCookieDomain = '';
  5474. /**
  5475. * Set this variable if you want to restrict cookies to a certain path within
  5476. * the domain specified by $wgCookieDomain.
  5477. */
  5478. $wgCookiePath = '/';
  5479. /**
  5480. * Whether the "secure" flag should be set on the cookie. This can be:
  5481. * - true: Set secure flag
  5482. * - false: Don't set secure flag
  5483. * - "detect": Set the secure flag if $wgServer is set to an HTTPS URL
  5484. */
  5485. $wgCookieSecure = 'detect';
  5486. /**
  5487. * By default, MediaWiki checks if the client supports cookies during the
  5488. * login process, so that it can display an informative error message if
  5489. * cookies are disabled. Set this to true if you want to disable this cookie
  5490. * check.
  5491. */
  5492. $wgDisableCookieCheck = false;
  5493. /**
  5494. * Cookies generated by MediaWiki have names starting with this prefix. Set it
  5495. * to a string to use a custom prefix. Setting it to false causes the database
  5496. * name to be used as a prefix.
  5497. */
  5498. $wgCookiePrefix = false;
  5499. /**
  5500. * Set authentication cookies to HttpOnly to prevent access by JavaScript,
  5501. * in browsers that support this feature. This can mitigates some classes of
  5502. * XSS attack.
  5503. */
  5504. $wgCookieHttpOnly = true;
  5505. /**
  5506. * A list of cookies that vary the cache (for use by extensions)
  5507. */
  5508. $wgCacheVaryCookies = [];
  5509. /**
  5510. * Override to customise the session name
  5511. */
  5512. $wgSessionName = false;
  5513. /**
  5514. * Whether to set a cookie when a user is autoblocked. Doing so means that a blocked user, even
  5515. * after logging out and moving to a new IP address, will still be blocked. This cookie will contain
  5516. * an authentication code if $wgSecretKey is set, or otherwise will just be the block ID (in
  5517. * which case there is a possibility of an attacker discovering the names of revdeleted users, so
  5518. * it is best to use this in conjunction with $wgSecretKey being set).
  5519. */
  5520. $wgCookieSetOnAutoblock = true;
  5521. /**
  5522. * Whether to set a cookie when a logged-out user is blocked. Doing so means that a blocked user,
  5523. * even after moving to a new IP address, will still be blocked. This cookie will contain an
  5524. * authentication code if $wgSecretKey is set, or otherwise will just be the block ID (in which
  5525. * case there is a possibility of an attacker discovering the names of revdeleted users, so it
  5526. * is best to use this in conjunction with $wgSecretKey being set).
  5527. */
  5528. $wgCookieSetOnIpBlock = true;
  5529. /** @} */ # end of cookie settings }
  5530. /************************************************************************//**
  5531. * @name LaTeX (mathematical formulas)
  5532. * @{
  5533. */
  5534. /**
  5535. * To use inline TeX, you need to compile 'texvc' (in the 'math' subdirectory of
  5536. * the MediaWiki package and have latex, dvips, gs (ghostscript), andconvert
  5537. * (ImageMagick) installed and available in the PATH.
  5538. * Please see math/README for more information.
  5539. */
  5540. $wgUseTeX = false;
  5541. /** @} */ # end LaTeX }
  5542. /************************************************************************//**
  5543. * @name Profiling, testing and debugging
  5544. *
  5545. * See $wgProfiler for how to enable profiling.
  5546. *
  5547. * @{
  5548. */
  5549. /**
  5550. * Filename for debug logging. See https://www.mediawiki.org/wiki/How_to_debug
  5551. * The debug log file should be not be publicly accessible if it is used, as it
  5552. * may contain private data.
  5553. */
  5554. $wgDebugLogFile = '';
  5555. /**
  5556. * Prefix for debug log lines
  5557. */
  5558. $wgDebugLogPrefix = '';
  5559. /**
  5560. * If true, instead of redirecting, show a page with a link to the redirect
  5561. * destination. This allows for the inspection of PHP error messages, and easy
  5562. * resubmission of form data. For developer use only.
  5563. */
  5564. $wgDebugRedirects = false;
  5565. /**
  5566. * If true, log debugging data from action=raw and load.php.
  5567. * This is normally false to avoid overlapping debug entries due to gen=css
  5568. * and gen=js requests.
  5569. */
  5570. $wgDebugRawPage = false;
  5571. /**
  5572. * Send debug data to an HTML comment in the output.
  5573. *
  5574. * This may occasionally be useful when supporting a non-technical end-user.
  5575. * It's more secure than exposing the debug log file to the web, since the
  5576. * output only contains private data for the current user. But it's not ideal
  5577. * for development use since data is lost on fatal errors and redirects.
  5578. */
  5579. $wgDebugComments = false;
  5580. /**
  5581. * Write SQL queries to the debug log.
  5582. *
  5583. * This setting is only used $wgLBFactoryConf['class'] is set to
  5584. * '\Wikimedia\Rdbms\LBFactorySimple'; otherwise the DBO_DEBUG flag must be set in
  5585. * the 'flags' option of the database connection to achieve the same functionality.
  5586. */
  5587. $wgDebugDumpSql = false;
  5588. /**
  5589. * Performance expectations for DB usage
  5590. *
  5591. * @since 1.26
  5592. */
  5593. $wgTrxProfilerLimits = [
  5594. // HTTP GET/HEAD requests.
  5595. // Master queries should not happen on GET requests
  5596. 'GET' => [
  5597. 'masterConns' => 0,
  5598. 'writes' => 0,
  5599. 'readQueryTime' => 5,
  5600. 'readQueryRows' => 10000
  5601. ],
  5602. // HTTP POST requests.
  5603. // Master reads and writes will happen for a subset of these.
  5604. 'POST' => [
  5605. 'readQueryTime' => 5,
  5606. 'writeQueryTime' => 1,
  5607. 'readQueryRows' => 100000,
  5608. 'maxAffected' => 1000
  5609. ],
  5610. 'POST-nonwrite' => [
  5611. 'writes' => 0,
  5612. 'readQueryTime' => 5,
  5613. 'readQueryRows' => 10000
  5614. ],
  5615. // Deferred updates that run after HTTP response is sent for GET requests
  5616. 'PostSend-GET' => [
  5617. 'readQueryTime' => 5,
  5618. 'writeQueryTime' => 1,
  5619. 'readQueryRows' => 10000,
  5620. 'maxAffected' => 1000,
  5621. // Log master queries under the post-send entry point as they are discouraged
  5622. 'masterConns' => 0,
  5623. 'writes' => 0,
  5624. ],
  5625. // Deferred updates that run after HTTP response is sent for POST requests
  5626. 'PostSend-POST' => [
  5627. 'readQueryTime' => 5,
  5628. 'writeQueryTime' => 1,
  5629. 'readQueryRows' => 100000,
  5630. 'maxAffected' => 1000
  5631. ],
  5632. // Background job runner
  5633. 'JobRunner' => [
  5634. 'readQueryTime' => 30,
  5635. 'writeQueryTime' => 5,
  5636. 'readQueryRows' => 100000,
  5637. 'maxAffected' => 500 // ballpark of $wgUpdateRowsPerQuery
  5638. ],
  5639. // Command-line scripts
  5640. 'Maintenance' => [
  5641. 'writeQueryTime' => 5,
  5642. 'maxAffected' => 1000
  5643. ]
  5644. ];
  5645. /**
  5646. * Map of string log group names to log destinations.
  5647. *
  5648. * If set, wfDebugLog() output for that group will go to that file instead
  5649. * of the regular $wgDebugLogFile. Useful for enabling selective logging
  5650. * in production.
  5651. *
  5652. * Log destinations may be one of the following:
  5653. * - false to completely remove from the output, including from $wgDebugLogFile.
  5654. * - string values specifying a filename or URI.
  5655. * - associative array with keys:
  5656. * - 'destination' desired filename or URI.
  5657. * - 'sample' an integer value, specifying a sampling factor (optional)
  5658. * - 'level' A \Psr\Log\LogLevel constant, indicating the minimum level
  5659. * to log (optional, since 1.25)
  5660. *
  5661. * @par Example:
  5662. * @code
  5663. * $wgDebugLogGroups['redis'] = '/var/log/mediawiki/redis.log';
  5664. * @endcode
  5665. *
  5666. * @par Advanced example:
  5667. * @code
  5668. * $wgDebugLogGroups['memcached'] = [
  5669. * 'destination' => '/var/log/mediawiki/memcached.log',
  5670. * 'sample' => 1000, // log 1 message out of every 1,000.
  5671. * 'level' => \Psr\Log\LogLevel::WARNING
  5672. * ];
  5673. * @endcode
  5674. */
  5675. $wgDebugLogGroups = [];
  5676. /**
  5677. * Default service provider for creating Psr\Log\LoggerInterface instances.
  5678. *
  5679. * The value should be an array suitable for use with
  5680. * ObjectFactory::getObjectFromSpec(). The created object is expected to
  5681. * implement the MediaWiki\Logger\Spi interface. See ObjectFactory for additional
  5682. * details.
  5683. *
  5684. * Alternately the MediaWiki\Logger\LoggerFactory::registerProvider method can
  5685. * be called to inject an MediaWiki\Logger\Spi instance into the LoggerFactory
  5686. * and bypass the use of this configuration variable entirely.
  5687. *
  5688. * @par To completely disable logging:
  5689. * @code
  5690. * $wgMWLoggerDefaultSpi = [ 'class' => \MediaWiki\Logger\NullSpi::class ];
  5691. * @endcode
  5692. *
  5693. * @since 1.25
  5694. * @var array $wgMWLoggerDefaultSpi
  5695. * @see MwLogger
  5696. */
  5697. $wgMWLoggerDefaultSpi = [
  5698. 'class' => \MediaWiki\Logger\LegacySpi::class,
  5699. ];
  5700. /**
  5701. * Display debug data at the bottom of the main content area.
  5702. *
  5703. * Useful for developers and technical users trying to working on a closed wiki.
  5704. */
  5705. $wgShowDebug = false;
  5706. /**
  5707. * Prefix debug messages with relative timestamp. Very-poor man's profiler.
  5708. * Since 1.19 also includes memory usage.
  5709. */
  5710. $wgDebugTimestamps = false;
  5711. /**
  5712. * Show the contents of $wgHooks in Special:Version
  5713. */
  5714. $wgSpecialVersionShowHooks = false;
  5715. /**
  5716. * Whether to show "we're sorry, but there has been a database error" pages.
  5717. * Displaying errors aids in debugging, but may display information useful
  5718. * to an attacker.
  5719. *
  5720. * @deprecated and nonfunctional since 1.32: set $wgShowExceptionDetails and/or
  5721. * $wgShowHostnames instead.
  5722. */
  5723. $wgShowSQLErrors = false;
  5724. /**
  5725. * If set to true, uncaught exceptions will print the exception message and a
  5726. * complete stack trace to output. This should only be used for debugging, as it
  5727. * may reveal private information in function parameters due to PHP's backtrace
  5728. * formatting. If set to false, only the exception's class will be shown.
  5729. */
  5730. $wgShowExceptionDetails = false;
  5731. /**
  5732. * If true, show a backtrace for database errors
  5733. *
  5734. * @note This setting only applies when connection errors and query errors are
  5735. * reported in the normal manner. $wgShowExceptionDetails applies in other cases,
  5736. * including those in which an uncaught exception is thrown from within the
  5737. * exception handler.
  5738. *
  5739. * @deprecated and nonfunctional since 1.32: set $wgShowExceptionDetails instead.
  5740. */
  5741. $wgShowDBErrorBacktrace = false;
  5742. /**
  5743. * If true, send the exception backtrace to the error log
  5744. */
  5745. $wgLogExceptionBacktrace = true;
  5746. /**
  5747. * If true, the MediaWiki error handler passes errors/warnings to the default error handler
  5748. * after logging them. The setting is ignored when the track_errors php.ini flag is true.
  5749. */
  5750. $wgPropagateErrors = true;
  5751. /**
  5752. * Expose backend server host names through the API and various HTML comments
  5753. */
  5754. $wgShowHostnames = false;
  5755. /**
  5756. * Override server hostname detection with a hardcoded value.
  5757. * Should be a string, default false.
  5758. * @since 1.20
  5759. */
  5760. $wgOverrideHostname = false;
  5761. /**
  5762. * If set to true MediaWiki will throw notices for some possible error
  5763. * conditions and for deprecated functions.
  5764. */
  5765. $wgDevelopmentWarnings = false;
  5766. /**
  5767. * Release limitation to wfDeprecated warnings, if set to a release number
  5768. * development warnings will not be generated for deprecations added in releases
  5769. * after the limit.
  5770. */
  5771. $wgDeprecationReleaseLimit = false;
  5772. /**
  5773. * Profiler configuration.
  5774. *
  5775. * To use a profiler, set $wgProfiler in LocalSetings.php.
  5776. *
  5777. * Example:
  5778. *
  5779. * @code
  5780. * $wgProfiler['class'] = ProfilerXhprof::class;
  5781. * @endcode
  5782. *
  5783. * For output, set the 'output' key to an array of class names, one for each
  5784. * output type you want the profiler to generate. For example:
  5785. *
  5786. * @code
  5787. * $wgProfiler['output'] = [ ProfilerOutputText::class ];
  5788. * @endcode
  5789. *
  5790. * The output classes available to you by default are ProfilerOutputDb,
  5791. * ProfilerOutputDump, ProfilerOutputStats, ProfilerOutputText, and
  5792. * ProfilerOutputUdp.
  5793. *
  5794. * ProfilerOutputStats outputs profiling data as StatsD metrics. It expects
  5795. * that you have set the $wgStatsdServer configuration variable to the host (or
  5796. * host:port) of your statsd server.
  5797. *
  5798. * ProfilerOutputText will output profiling data in the page body as a comment.
  5799. * You can make the profiling data in HTML render as part of the page content
  5800. * by setting the 'visible' configuration flag:
  5801. *
  5802. * @code
  5803. * $wgProfiler['visible'] = true;
  5804. * @endcode
  5805. *
  5806. * 'ProfilerOutputDb' expects a database table that can be created by applying
  5807. * maintenance/archives/patch-profiling.sql to your database.
  5808. *
  5809. * 'ProfilerOutputDump' expects a $wgProfiler['outputDir'] telling it where to
  5810. * write dump files. The files produced are compatible with the XHProf gui.
  5811. * For a rudimentary sampling profiler:
  5812. *
  5813. * @code
  5814. * $wgProfiler['class'] = 'ProfilerXhprof';
  5815. * $wgProfiler['output'] = [ 'ProfilerOutputDb' ];
  5816. * $wgProfiler['sampling'] = 50; // one every 50 requests
  5817. * @endcode
  5818. *
  5819. * When using the built-in `sampling` option, the `class` will changed to
  5820. * ProfilerStub for non-sampled cases.
  5821. *
  5822. * For performance, the profiler is always disabled for CLI scripts as they
  5823. * could be long running and the data would accumulate. Use the '--profiler'
  5824. * parameter of maintenance scripts to override this.
  5825. *
  5826. * @since 1.17.0
  5827. */
  5828. $wgProfiler = [];
  5829. /**
  5830. * Allow the profileinfo.php entrypoint to be used.
  5831. *
  5832. * @since 1.5.0
  5833. */
  5834. $wgEnableProfileInfo = false;
  5835. /**
  5836. * Only record profiling info for pages that took longer than this
  5837. * @deprecated since 1.25: set $wgProfiler['threshold'] instead.
  5838. */
  5839. $wgProfileLimit = 0.0;
  5840. /**
  5841. * Don't put non-profiling info into log file
  5842. *
  5843. * @deprecated since 1.23, set the log file in
  5844. * $wgDebugLogGroups['profileoutput'] instead.
  5845. */
  5846. $wgProfileOnly = false;
  5847. /**
  5848. * Destination of statsd metrics.
  5849. *
  5850. * A host or host:port of a statsd server. Port defaults to 8125.
  5851. *
  5852. * If not set, statsd metrics will not be collected.
  5853. *
  5854. * @see wfLogProfilingData
  5855. * @since 1.25
  5856. */
  5857. $wgStatsdServer = false;
  5858. /**
  5859. * Prefix for metric names sent to $wgStatsdServer.
  5860. *
  5861. * @see MediaWikiServices::getInstance()->getStatsdDataFactory
  5862. * @see BufferingStatsdDataFactory
  5863. * @since 1.25
  5864. */
  5865. $wgStatsdMetricPrefix = 'MediaWiki';
  5866. /**
  5867. * Sampling rate for statsd metrics as an associative array of patterns and rates.
  5868. * Patterns are Unix shell patterns (e.g. 'MediaWiki.api.*').
  5869. * Rates are sampling probabilities (e.g. 0.1 means 1 in 10 events are sampled).
  5870. * @since 1.28
  5871. */
  5872. $wgStatsdSamplingRates = [
  5873. 'wanobjectcache:*' => 0.001
  5874. ];
  5875. /**
  5876. * InfoAction retrieves a list of transclusion links (both to and from).
  5877. * This number puts a limit on that query in the case of highly transcluded
  5878. * templates.
  5879. */
  5880. $wgPageInfoTransclusionLimit = 50;
  5881. /**
  5882. * Parser test suite files to be run by parserTests.php when no specific
  5883. * filename is passed to it.
  5884. *
  5885. * Extensions using extension.json will have any *.txt file in a
  5886. * tests/parser/ directory automatically run.
  5887. *
  5888. * Core tests can be added to ParserTestRunner::$coreTestFiles.
  5889. *
  5890. * Use full paths.
  5891. *
  5892. * @deprecated since 1.30
  5893. */
  5894. $wgParserTestFiles = [];
  5895. /**
  5896. * Allow running of javascript test suites via [[Special:JavaScriptTest]] (such as QUnit).
  5897. */
  5898. $wgEnableJavaScriptTest = false;
  5899. /**
  5900. * Overwrite the caching key prefix with custom value.
  5901. * @since 1.19
  5902. */
  5903. $wgCachePrefix = false;
  5904. /**
  5905. * Display the new debugging toolbar. This also enables profiling on database
  5906. * queries and other useful output.
  5907. * Will be ignored if $wgUseFileCache or $wgUseCdn is enabled.
  5908. *
  5909. * @since 1.19
  5910. */
  5911. $wgDebugToolbar = false;
  5912. /** @} */ # end of profiling, testing and debugging }
  5913. /************************************************************************//**
  5914. * @name Search
  5915. * @{
  5916. */
  5917. /**
  5918. * Set this to true to disable the full text search feature.
  5919. */
  5920. $wgDisableTextSearch = false;
  5921. /**
  5922. * Set to true to have nicer highlighted text in search results,
  5923. * by default off due to execution overhead
  5924. */
  5925. $wgAdvancedSearchHighlighting = false;
  5926. /**
  5927. * Regexp to match word boundaries, defaults for non-CJK languages
  5928. * should be empty for CJK since the words are not separate
  5929. */
  5930. $wgSearchHighlightBoundaries = '[\p{Z}\p{P}\p{C}]';
  5931. /**
  5932. * Template for OpenSearch suggestions, defaults to API action=opensearch
  5933. *
  5934. * Sites with heavy load would typically have these point to a custom
  5935. * PHP wrapper to avoid firing up mediawiki for every keystroke
  5936. *
  5937. * Placeholders: {searchTerms}
  5938. *
  5939. * @deprecated since 1.25 Use $wgOpenSearchTemplates['application/x-suggestions+json'] instead
  5940. */
  5941. $wgOpenSearchTemplate = false;
  5942. /**
  5943. * Templates for OpenSearch suggestions, defaults to API action=opensearch
  5944. *
  5945. * Sites with heavy load would typically have these point to a custom
  5946. * PHP wrapper to avoid firing up mediawiki for every keystroke
  5947. *
  5948. * Placeholders: {searchTerms}
  5949. */
  5950. $wgOpenSearchTemplates = [
  5951. 'application/x-suggestions+json' => false,
  5952. 'application/x-suggestions+xml' => false,
  5953. ];
  5954. /**
  5955. * Enable OpenSearch suggestions requested by MediaWiki. Set this to
  5956. * false if you've disabled scripts that use api?action=opensearch and
  5957. * want reduce load caused by cached scripts still pulling suggestions.
  5958. * It will let the API fallback by responding with an empty array.
  5959. */
  5960. $wgEnableOpenSearchSuggest = true;
  5961. /**
  5962. * Integer defining default number of entries to show on
  5963. * OpenSearch call.
  5964. */
  5965. $wgOpenSearchDefaultLimit = 10;
  5966. /**
  5967. * Minimum length of extract in <Description>. Actual extracts will last until the end of sentence.
  5968. */
  5969. $wgOpenSearchDescriptionLength = 100;
  5970. /**
  5971. * Expiry time for search suggestion responses
  5972. */
  5973. $wgSearchSuggestCacheExpiry = 1200;
  5974. /**
  5975. * If you've disabled search semi-permanently, this also disables updates to the
  5976. * table. If you ever re-enable, be sure to rebuild the search table.
  5977. */
  5978. $wgDisableSearchUpdate = false;
  5979. /**
  5980. * List of namespaces which are searched by default.
  5981. *
  5982. * @par Example:
  5983. * @code
  5984. * $wgNamespacesToBeSearchedDefault[NS_MAIN] = true;
  5985. * $wgNamespacesToBeSearchedDefault[NS_PROJECT] = true;
  5986. * @endcode
  5987. */
  5988. $wgNamespacesToBeSearchedDefault = [
  5989. NS_MAIN => true,
  5990. ];
  5991. /**
  5992. * Disable the internal MySQL-based search, to allow it to be
  5993. * implemented by an extension instead.
  5994. */
  5995. $wgDisableInternalSearch = false;
  5996. /**
  5997. * Set this to a URL to forward search requests to some external location.
  5998. * If the URL includes '$1', this will be replaced with the URL-encoded
  5999. * search term.
  6000. *
  6001. * @par Example:
  6002. * To forward to Google you'd have something like:
  6003. * @code
  6004. * $wgSearchForwardUrl =
  6005. * 'https://www.google.com/search?q=$1' .
  6006. * '&domains=https://example.com' .
  6007. * '&sitesearch=https://example.com' .
  6008. * '&ie=utf-8&oe=utf-8';
  6009. * @endcode
  6010. */
  6011. $wgSearchForwardUrl = null;
  6012. /**
  6013. * Search form behavior.
  6014. * - true = use Go & Search buttons
  6015. * - false = use Go button & Advanced search link
  6016. */
  6017. $wgUseTwoButtonsSearchForm = true;
  6018. /**
  6019. * Array of namespaces to generate a Google sitemap for when the
  6020. * maintenance/generateSitemap.php script is run, or false if one is to be
  6021. * generated for all namespaces.
  6022. */
  6023. $wgSitemapNamespaces = false;
  6024. /**
  6025. * Custom namespace priorities for sitemaps. Setting this will allow you to
  6026. * set custom priorities to namespaces when sitemaps are generated using the
  6027. * maintenance/generateSitemap.php script.
  6028. *
  6029. * This should be a map of namespace IDs to priority
  6030. * @par Example:
  6031. * @code
  6032. * $wgSitemapNamespacesPriorities = [
  6033. * NS_USER => '0.9',
  6034. * NS_HELP => '0.0',
  6035. * ];
  6036. * @endcode
  6037. */
  6038. $wgSitemapNamespacesPriorities = false;
  6039. /**
  6040. * If true, searches for IP addresses will be redirected to that IP's
  6041. * contributions page. E.g. searching for "1.2.3.4" will redirect to
  6042. * [[Special:Contributions/1.2.3.4]]
  6043. */
  6044. $wgEnableSearchContributorsByIP = true;
  6045. /** @} */ # end of search settings
  6046. /************************************************************************//**
  6047. * @name Edit user interface
  6048. * @{
  6049. */
  6050. /**
  6051. * Path to the GNU diff3 utility. If the file doesn't exist, edit conflicts will
  6052. * fall back to the old behavior (no merging).
  6053. */
  6054. $wgDiff3 = '/usr/bin/diff3';
  6055. /**
  6056. * Path to the GNU diff utility.
  6057. */
  6058. $wgDiff = '/usr/bin/diff';
  6059. /**
  6060. * Which namespaces have special treatment where they should be preview-on-open
  6061. * Internally only Category: pages apply, but using this extensions (e.g. Semantic MediaWiki)
  6062. * can specify namespaces of pages they have special treatment for
  6063. */
  6064. $wgPreviewOnOpenNamespaces = [
  6065. NS_CATEGORY => true
  6066. ];
  6067. /**
  6068. * Enable the UniversalEditButton for browsers that support it
  6069. * (currently only Firefox with an extension)
  6070. * See http://universaleditbutton.org for more background information
  6071. */
  6072. $wgUniversalEditButton = true;
  6073. /**
  6074. * If user doesn't specify any edit summary when making a an edit, MediaWiki
  6075. * will try to automatically create one. This feature can be disabled by set-
  6076. * ting this variable false.
  6077. */
  6078. $wgUseAutomaticEditSummaries = true;
  6079. /** @} */ # end edit UI }
  6080. /************************************************************************//**
  6081. * @name Maintenance
  6082. * See also $wgSiteNotice
  6083. * @{
  6084. */
  6085. /**
  6086. * @cond file_level_code
  6087. * Set $wgCommandLineMode if it's not set already, to avoid notices
  6088. */
  6089. if ( !isset( $wgCommandLineMode ) ) {
  6090. $wgCommandLineMode = false;
  6091. }
  6092. /** @endcond */
  6093. /**
  6094. * For colorized maintenance script output, is your terminal background dark ?
  6095. */
  6096. $wgCommandLineDarkBg = false;
  6097. /**
  6098. * Set this to a string to put the wiki into read-only mode. The text will be
  6099. * used as an explanation to users.
  6100. *
  6101. * This prevents most write operations via the web interface. Cache updates may
  6102. * still be possible. To prevent database writes completely, use the read_only
  6103. * option in MySQL.
  6104. */
  6105. $wgReadOnly = null;
  6106. /**
  6107. * Set this to true to put the wiki watchlists into read-only mode.
  6108. * @var bool
  6109. * @since 1.31
  6110. */
  6111. $wgReadOnlyWatchedItemStore = false;
  6112. /**
  6113. * If this lock file exists (size > 0), the wiki will be forced into read-only mode.
  6114. * Its contents will be shown to users as part of the read-only warning
  6115. * message.
  6116. *
  6117. * Will default to "{$wgUploadDirectory}/lock_yBgMBwiR" in Setup.php
  6118. */
  6119. $wgReadOnlyFile = false;
  6120. /**
  6121. * When you run the web-based upgrade utility, it will tell you what to set
  6122. * this to in order to authorize the upgrade process. It will subsequently be
  6123. * used as a password, to authorize further upgrades.
  6124. *
  6125. * For security, do not set this to a guessable string. Use the value supplied
  6126. * by the install/upgrade process. To cause the upgrader to generate a new key,
  6127. * delete the old key from LocalSettings.php.
  6128. */
  6129. $wgUpgradeKey = false;
  6130. /**
  6131. * Fully specified path to git binary
  6132. */
  6133. $wgGitBin = '/usr/bin/git';
  6134. /**
  6135. * Map GIT repository URLs to viewer URLs to provide links in Special:Version
  6136. *
  6137. * Key is a pattern passed to preg_match() and preg_replace(),
  6138. * without the delimiters (which are #) and must match the whole URL.
  6139. * The value is the replacement for the key (it can contain $1, etc.)
  6140. * %h will be replaced by the short SHA-1 (7 first chars) and %H by the
  6141. * full SHA-1 of the HEAD revision.
  6142. * %r will be replaced with a URL-encoded version of $1.
  6143. * %R will be replaced with $1 and no URL-encoding
  6144. *
  6145. * @since 1.20
  6146. */
  6147. $wgGitRepositoryViewers = [
  6148. 'https://(?:[a-z0-9_]+@)?gerrit.wikimedia.org/r/(?:p/)?(.*)' =>
  6149. 'https://gerrit.wikimedia.org/g/%R/+/%H',
  6150. 'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)' =>
  6151. 'https://gerrit.wikimedia.org/g/%R/+/%H',
  6152. ];
  6153. /** @} */ # End of maintenance }
  6154. /************************************************************************//**
  6155. * @name Recent changes, new pages, watchlist and history
  6156. * @{
  6157. */
  6158. /**
  6159. * Recentchanges items are periodically purged; entries older than this many
  6160. * seconds will go.
  6161. * Default: 90 days = about three months
  6162. */
  6163. $wgRCMaxAge = 90 * 24 * 3600;
  6164. /**
  6165. * Page watchers inactive for more than this many seconds are considered inactive.
  6166. * Used mainly by action=info. Default: 180 days = about six months.
  6167. * @since 1.26
  6168. */
  6169. $wgWatchersMaxAge = 180 * 24 * 3600;
  6170. /**
  6171. * If active watchers (per above) are this number or less, do not disclose it.
  6172. * Left to 1, prevents unprivileged users from knowing for sure that there are 0.
  6173. * Set to -1 if you want to always complement watchers count with this info.
  6174. * @since 1.26
  6175. */
  6176. $wgUnwatchedPageSecret = 1;
  6177. /**
  6178. * Filter $wgRCLinkDays by $wgRCMaxAge to avoid showing links for numbers
  6179. * higher than what will be stored. Note that this is disabled by default
  6180. * because we sometimes do have RC data which is beyond the limit for some
  6181. * reason, and some users may use the high numbers to display that data which
  6182. * is still there.
  6183. */
  6184. $wgRCFilterByAge = false;
  6185. /**
  6186. * List of Limits options to list in the Special:Recentchanges and
  6187. * Special:Recentchangeslinked pages.
  6188. */
  6189. $wgRCLinkLimits = [ 50, 100, 250, 500 ];
  6190. /**
  6191. * List of Days options to list in the Special:Recentchanges and
  6192. * Special:Recentchangeslinked pages.
  6193. *
  6194. * @see ChangesListSpecialPage::getLinkDays
  6195. */
  6196. $wgRCLinkDays = [ 1, 3, 7, 14, 30 ];
  6197. /**
  6198. * Configuration for feeds to which notifications about recent changes will be sent.
  6199. *
  6200. * The following feed classes are available by default:
  6201. * - 'UDPRCFeedEngine' - sends recent changes over UDP to the specified server.
  6202. * - 'RedisPubSubFeedEngine' - send recent changes to Redis.
  6203. *
  6204. * Only 'class' or 'uri' is required. If 'uri' is set instead of 'class', then
  6205. * RecentChange::getEngine() is used to determine the class. All options are
  6206. * passed to the constructor.
  6207. *
  6208. * Common options:
  6209. * - 'class' -- The class to use for this feed (must implement RCFeed).
  6210. * - 'omit_bots' -- Exclude bot edits from the feed. (default: false)
  6211. * - 'omit_anon' -- Exclude anonymous edits from the feed. (default: false)
  6212. * - 'omit_user' -- Exclude edits by registered users from the feed. (default: false)
  6213. * - 'omit_minor' -- Exclude minor edits from the feed. (default: false)
  6214. * - 'omit_patrolled' -- Exclude patrolled edits from the feed. (default: false)
  6215. *
  6216. * FormattedRCFeed-specific options:
  6217. * - 'uri' -- [required] The address to which the messages are sent.
  6218. * The uri scheme of this string will be looked up in $wgRCEngines
  6219. * to determine which FormattedRCFeed class to use.
  6220. * - 'formatter' -- [required] The class (implementing RCFeedFormatter) which will
  6221. * produce the text to send. This can also be an object of the class.
  6222. * Formatters available by default: JSONRCFeedFormatter, XMLRCFeedFormatter,
  6223. * IRCColourfulRCFeedFormatter.
  6224. *
  6225. * IRCColourfulRCFeedFormatter-specific options:
  6226. * - 'add_interwiki_prefix' -- whether the titles should be prefixed with
  6227. * the first entry in the $wgLocalInterwikis array (or the value of
  6228. * $wgLocalInterwiki, if set)
  6229. *
  6230. * JSONRCFeedFormatter-specific options:
  6231. * - 'channel' -- if set, the 'channel' parameter is also set in JSON values.
  6232. *
  6233. * @example $wgRCFeeds['example'] = [
  6234. * 'uri' => 'udp://localhost:1336',
  6235. * 'formatter' => 'JSONRCFeedFormatter',
  6236. * 'add_interwiki_prefix' => false,
  6237. * 'omit_bots' => true,
  6238. * ];
  6239. * @example $wgRCFeeds['example'] = [
  6240. * 'uri' => 'udp://localhost:1338',
  6241. * 'formatter' => 'IRCColourfulRCFeedFormatter',
  6242. * 'add_interwiki_prefix' => false,
  6243. * 'omit_bots' => true,
  6244. * ];
  6245. * @example $wgRCFeeds['example'] = [
  6246. * 'class' => ExampleRCFeed::class,
  6247. * ];
  6248. * @since 1.22
  6249. */
  6250. $wgRCFeeds = [];
  6251. /**
  6252. * Used by RecentChange::getEngine to find the correct engine for a given URI scheme.
  6253. * Keys are scheme names, values are names of FormattedRCFeed sub classes.
  6254. * @since 1.22
  6255. */
  6256. $wgRCEngines = [
  6257. 'redis' => RedisPubSubFeedEngine::class,
  6258. 'udp' => UDPRCFeedEngine::class,
  6259. ];
  6260. /**
  6261. * Treat category membership changes as a RecentChange.
  6262. * Changes are mentioned in RC for page actions as follows:
  6263. * - creation: pages created with categories are mentioned
  6264. * - edit: category additions/removals to existing pages are mentioned
  6265. * - move: nothing is mentioned (unless templates used depend on the title)
  6266. * - deletion: nothing is mentioned
  6267. * - undeletion: nothing is mentioned
  6268. *
  6269. * @since 1.27
  6270. */
  6271. $wgRCWatchCategoryMembership = false;
  6272. /**
  6273. * Use RC Patrolling to check for vandalism (from recent changes and watchlists)
  6274. * New pages and new files are included.
  6275. *
  6276. * @note If you disable all patrolling features, you probably also want to
  6277. * remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
  6278. * Special:Log.
  6279. */
  6280. $wgUseRCPatrol = true;
  6281. /**
  6282. * Polling rate, in seconds, used by the 'live update' and 'view newest' features
  6283. * of the RCFilters app on SpecialRecentChanges and Special:Watchlist.
  6284. * 0 to disable completely.
  6285. */
  6286. $wgStructuredChangeFiltersLiveUpdatePollingRate = 3;
  6287. /**
  6288. * Use new page patrolling to check new pages on Special:Newpages
  6289. *
  6290. * @note If you disable all patrolling features, you probably also want to
  6291. * remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
  6292. * Special:Log.
  6293. */
  6294. $wgUseNPPatrol = true;
  6295. /**
  6296. * Use file patrolling to check new files on Special:Newfiles
  6297. *
  6298. * @note If you disable all patrolling features, you probably also want to
  6299. * remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
  6300. * Special:Log.
  6301. *
  6302. * @since 1.27
  6303. */
  6304. $wgUseFilePatrol = true;
  6305. /**
  6306. * Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages
  6307. */
  6308. $wgFeed = true;
  6309. /**
  6310. * Set maximum number of results to return in syndication feeds (RSS, Atom) for
  6311. * eg Recentchanges, Newpages.
  6312. */
  6313. $wgFeedLimit = 50;
  6314. /**
  6315. * _Minimum_ timeout for cached Recentchanges feed, in seconds.
  6316. * A cached version will continue to be served out even if changes
  6317. * are made, until this many seconds runs out since the last render.
  6318. *
  6319. * If set to 0, feed caching is disabled. Use this for debugging only;
  6320. * feed generation can be pretty slow with diffs.
  6321. */
  6322. $wgFeedCacheTimeout = 60;
  6323. /**
  6324. * When generating Recentchanges RSS/Atom feed, diffs will not be generated for
  6325. * pages larger than this size.
  6326. */
  6327. $wgFeedDiffCutoff = 32768;
  6328. /**
  6329. * Override the site's default RSS/ATOM feed for recentchanges that appears on
  6330. * every page. Some sites might have a different feed they'd like to promote
  6331. * instead of the RC feed (maybe like a "Recent New Articles" or "Breaking news" one).
  6332. * Should be a format as key (either 'rss' or 'atom') and an URL to the feed
  6333. * as value.
  6334. * @par Example:
  6335. * Configure the 'atom' feed to https://example.com/somefeed.xml
  6336. * @code
  6337. * $wgSiteFeed['atom'] = "https://example.com/somefeed.xml";
  6338. * @endcode
  6339. */
  6340. $wgOverrideSiteFeed = [];
  6341. /**
  6342. * Available feeds objects.
  6343. * Should probably only be defined when a page is syndicated ie when
  6344. * $wgOut->isSyndicated() is true.
  6345. */
  6346. $wgFeedClasses = [
  6347. 'rss' => RSSFeed::class,
  6348. 'atom' => AtomFeed::class,
  6349. ];
  6350. /**
  6351. * Which feed types should we provide by default? This can include 'rss',
  6352. * 'atom', neither, or both.
  6353. */
  6354. $wgAdvertisedFeedTypes = [ 'atom' ];
  6355. /**
  6356. * Show watching users in recent changes, watchlist and page history views
  6357. */
  6358. $wgRCShowWatchingUsers = false; # UPO
  6359. /**
  6360. * Show the amount of changed characters in recent changes
  6361. */
  6362. $wgRCShowChangedSize = true;
  6363. /**
  6364. * If the difference between the character counts of the text
  6365. * before and after the edit is below that value, the value will be
  6366. * highlighted on the RC page.
  6367. */
  6368. $wgRCChangedSizeThreshold = 500;
  6369. /**
  6370. * Show "Updated (since my last visit)" marker in RC view, watchlist and history
  6371. * view for watched pages with new changes
  6372. */
  6373. $wgShowUpdatedMarker = true;
  6374. /**
  6375. * Disable links to talk pages of anonymous users (IPs) in listings on special
  6376. * pages like page history, Special:Recentchanges, etc.
  6377. */
  6378. $wgDisableAnonTalk = false;
  6379. /**
  6380. * Allow filtering by change tag in recentchanges, history, etc
  6381. * Has no effect if no tags are defined in valid_tag.
  6382. */
  6383. $wgUseTagFilter = true;
  6384. /**
  6385. * List of core tags to enable. Available tags are:
  6386. * - 'mw-contentmodelchange': Edit changes content model of a page
  6387. * - 'mw-new-redirect': Edit makes new redirect page (new page or by changing content page)
  6388. * - 'mw-removed-redirect': Edit changes an existing redirect into a non-redirect
  6389. * - 'mw-changed-redirect-target': Edit changes redirect target
  6390. * - 'mw-blank': Edit completely blanks the page
  6391. * - 'mw-replace': Edit removes more than 90% of the content
  6392. * - 'mw-rollback': Edit is a rollback, made through the rollback link or rollback API
  6393. * - 'mw-undo': Edit made through an undo link
  6394. *
  6395. * @var array
  6396. * @since 1.31
  6397. */
  6398. $wgSoftwareTags = [
  6399. 'mw-contentmodelchange' => true,
  6400. 'mw-new-redirect' => true,
  6401. 'mw-removed-redirect' => true,
  6402. 'mw-changed-redirect-target' => true,
  6403. 'mw-blank' => true,
  6404. 'mw-replace' => true,
  6405. 'mw-rollback' => true,
  6406. 'mw-undo' => true,
  6407. ];
  6408. /**
  6409. * If set to an integer, pages that are watched by this many users or more
  6410. * will not require the unwatchedpages permission to view the number of
  6411. * watchers.
  6412. *
  6413. * @since 1.21
  6414. */
  6415. $wgUnwatchedPageThreshold = false;
  6416. /**
  6417. * Flags (letter symbols) shown in recent changes and watchlist to indicate
  6418. * certain types of edits.
  6419. *
  6420. * To register a new one:
  6421. * @code
  6422. * $wgRecentChangesFlags['flag'] => [
  6423. * // message for the letter displayed next to rows on changes lists
  6424. * 'letter' => 'letter-msg',
  6425. * // message for the tooltip of the letter
  6426. * 'title' => 'tooltip-msg',
  6427. * // optional (defaults to 'tooltip-msg'), message to use in the legend box
  6428. * 'legend' => 'legend-msg',
  6429. * // optional (defaults to 'flag'), CSS class to put on changes lists rows
  6430. * 'class' => 'css-class',
  6431. * // optional (defaults to 'any'), how top-level flag is determined. 'any'
  6432. * // will set the top-level flag if any line contains the flag, 'all' will
  6433. * // only be set if all lines contain the flag.
  6434. * 'grouping' => 'any',
  6435. * ];
  6436. * @endcode
  6437. *
  6438. * @since 1.22
  6439. */
  6440. $wgRecentChangesFlags = [
  6441. 'newpage' => [
  6442. 'letter' => 'newpageletter',
  6443. 'title' => 'recentchanges-label-newpage',
  6444. 'legend' => 'recentchanges-legend-newpage',
  6445. 'grouping' => 'any',
  6446. ],
  6447. 'minor' => [
  6448. 'letter' => 'minoreditletter',
  6449. 'title' => 'recentchanges-label-minor',
  6450. 'legend' => 'recentchanges-legend-minor',
  6451. 'class' => 'minoredit',
  6452. 'grouping' => 'all',
  6453. ],
  6454. 'bot' => [
  6455. 'letter' => 'boteditletter',
  6456. 'title' => 'recentchanges-label-bot',
  6457. 'legend' => 'recentchanges-legend-bot',
  6458. 'class' => 'botedit',
  6459. 'grouping' => 'all',
  6460. ],
  6461. 'unpatrolled' => [
  6462. 'letter' => 'unpatrolledletter',
  6463. 'title' => 'recentchanges-label-unpatrolled',
  6464. 'legend' => 'recentchanges-legend-unpatrolled',
  6465. 'grouping' => 'any',
  6466. ],
  6467. ];
  6468. /** @} */ # end RC/watchlist }
  6469. /************************************************************************//**
  6470. * @name Copyright and credits settings
  6471. * @{
  6472. */
  6473. /**
  6474. * Override for copyright metadata.
  6475. *
  6476. * This is the name of the page containing information about the wiki's copyright status,
  6477. * which will be added as a link in the footer if it is specified. It overrides
  6478. * $wgRightsUrl if both are specified.
  6479. */
  6480. $wgRightsPage = null;
  6481. /**
  6482. * Set this to specify an external URL containing details about the content license used on your
  6483. * wiki.
  6484. * If $wgRightsPage is set then this setting is ignored.
  6485. */
  6486. $wgRightsUrl = null;
  6487. /**
  6488. * If either $wgRightsUrl or $wgRightsPage is specified then this variable gives the text for the
  6489. * link. Otherwise, it will be treated as raw HTML.
  6490. * If using $wgRightsUrl then this value must be specified. If using $wgRightsPage then the name
  6491. * of the page will also be used as the link if this variable is not set.
  6492. */
  6493. $wgRightsText = null;
  6494. /**
  6495. * Override for copyright metadata.
  6496. */
  6497. $wgRightsIcon = null;
  6498. /**
  6499. * Set this to true if you want detailed copyright information forms on Upload.
  6500. */
  6501. $wgUseCopyrightUpload = false;
  6502. /**
  6503. * Set this to the number of authors that you want to be credited below an
  6504. * article text. Set it to zero to hide the attribution block, and a negative
  6505. * number (like -1) to show all authors. Note that this will require 2-3 extra
  6506. * database hits, which can have a not insignificant impact on performance for
  6507. * large wikis.
  6508. */
  6509. $wgMaxCredits = 0;
  6510. /**
  6511. * If there are more than $wgMaxCredits authors, show $wgMaxCredits of them.
  6512. * Otherwise, link to a separate credits page.
  6513. */
  6514. $wgShowCreditsIfMax = true;
  6515. /** @} */ # end of copyright and credits settings }
  6516. /************************************************************************//**
  6517. * @name Import / Export
  6518. * @{
  6519. */
  6520. /**
  6521. * List of interwiki prefixes for wikis we'll accept as sources for
  6522. * Special:Import and API action=import. Since complete page history can be
  6523. * imported, these should be 'trusted'.
  6524. *
  6525. * This can either be a regular array, or an associative map specifying
  6526. * subprojects on the interwiki map of the target wiki, or a mix of the two,
  6527. * e.g.
  6528. * @code
  6529. * $wgImportSources = [
  6530. * 'wikipedia' => [ 'cs', 'en', 'fr', 'zh' ],
  6531. * 'wikispecies',
  6532. * 'wikia' => [ 'animanga', 'brickipedia', 'desserts' ],
  6533. * ];
  6534. * @endcode
  6535. *
  6536. * If you have a very complex import sources setup, you can lazy-load it using
  6537. * the ImportSources hook.
  6538. *
  6539. * If a user has the 'import' permission but not the 'importupload' permission,
  6540. * they will only be able to run imports through this transwiki interface.
  6541. */
  6542. $wgImportSources = [];
  6543. /**
  6544. * Optional default target namespace for interwiki imports.
  6545. * Can use this to create an incoming "transwiki"-style queue.
  6546. * Set to numeric key, not the name.
  6547. *
  6548. * Users may override this in the Special:Import dialog.
  6549. */
  6550. $wgImportTargetNamespace = null;
  6551. /**
  6552. * If set to false, disables the full-history option on Special:Export.
  6553. * This is currently poorly optimized for long edit histories, so is
  6554. * disabled on Wikimedia's sites.
  6555. */
  6556. $wgExportAllowHistory = true;
  6557. /**
  6558. * If set nonzero, Special:Export requests for history of pages with
  6559. * more revisions than this will be rejected. On some big sites things
  6560. * could get bogged down by very very long pages.
  6561. */
  6562. $wgExportMaxHistory = 0;
  6563. /**
  6564. * Return distinct author list (when not returning full history)
  6565. */
  6566. $wgExportAllowListContributors = false;
  6567. /**
  6568. * If non-zero, Special:Export accepts a "pagelink-depth" parameter
  6569. * up to this specified level, which will cause it to include all
  6570. * pages linked to from the pages you specify. Since this number
  6571. * can become *insanely large* and could easily break your wiki,
  6572. * it's disabled by default for now.
  6573. *
  6574. * @warning There's a HARD CODED limit of 5 levels of recursion to prevent a
  6575. * crazy-big export from being done by someone setting the depth number too
  6576. * high. In other words, last resort safety net.
  6577. */
  6578. $wgExportMaxLinkDepth = 0;
  6579. /**
  6580. * Whether to allow the "export all pages in namespace" option
  6581. */
  6582. $wgExportFromNamespaces = false;
  6583. /**
  6584. * Whether to allow exporting the entire wiki into a single file
  6585. */
  6586. $wgExportAllowAll = false;
  6587. /**
  6588. * Maximum number of pages returned by the GetPagesFromCategory and
  6589. * GetPagesFromNamespace functions.
  6590. *
  6591. * @since 1.27
  6592. */
  6593. $wgExportPagelistLimit = 5000;
  6594. /** @} */ # end of import/export }
  6595. /*************************************************************************//**
  6596. * @name Extensions
  6597. * @{
  6598. */
  6599. /**
  6600. * A list of callback functions which are called once MediaWiki is fully
  6601. * initialised
  6602. */
  6603. $wgExtensionFunctions = [];
  6604. /**
  6605. * Extension messages files.
  6606. *
  6607. * Associative array mapping extension name to the filename where messages can be
  6608. * found. The file should contain variable assignments. Any of the variables
  6609. * present in languages/messages/MessagesEn.php may be defined, but $messages
  6610. * is the most common.
  6611. *
  6612. * Variables defined in extensions will override conflicting variables defined
  6613. * in the core.
  6614. *
  6615. * Since MediaWiki 1.23, use of this variable to define messages is discouraged; instead, store
  6616. * messages in JSON format and use $wgMessagesDirs. For setting other variables than
  6617. * $messages, $wgExtensionMessagesFiles should still be used. Use a DIFFERENT key because
  6618. * any entry having a key that also exists in $wgMessagesDirs will be ignored.
  6619. *
  6620. * Extensions using the JSON message format can preserve backward compatibility with
  6621. * earlier versions of MediaWiki by using a compatibility shim, such as one generated
  6622. * by the generateJsonI18n.php maintenance script, listing it under the SAME key
  6623. * as for the $wgMessagesDirs entry.
  6624. *
  6625. * @par Example:
  6626. * @code
  6627. * $wgExtensionMessagesFiles['ConfirmEdit'] = __DIR__.'/ConfirmEdit.i18n.php';
  6628. * @endcode
  6629. */
  6630. $wgExtensionMessagesFiles = [];
  6631. /**
  6632. * Extension messages directories.
  6633. *
  6634. * Associative array mapping extension name to the path of the directory where message files can
  6635. * be found. The message files are expected to be JSON files named for their language code, e.g.
  6636. * en.json, de.json, etc. Extensions with messages in multiple places may specify an array of
  6637. * message directories.
  6638. *
  6639. * Message directories in core should be added to LocalisationCache::getMessagesDirs()
  6640. *
  6641. * @par Simple example:
  6642. * @code
  6643. * $wgMessagesDirs['Example'] = __DIR__ . '/i18n';
  6644. * @endcode
  6645. *
  6646. * @par Complex example:
  6647. * @code
  6648. * $wgMessagesDirs['Example'] = [
  6649. * __DIR__ . '/lib/ve/i18n',
  6650. * __DIR__ . '/lib/ooui/i18n',
  6651. * __DIR__ . '/i18n',
  6652. * ]
  6653. * @endcode
  6654. * @since 1.23
  6655. */
  6656. $wgMessagesDirs = [];
  6657. /**
  6658. * Array of files with list(s) of extension entry points to be used in
  6659. * maintenance/mergeMessageFileList.php
  6660. * @since 1.22
  6661. */
  6662. $wgExtensionEntryPointListFiles = [];
  6663. /**
  6664. * Parser output hooks.
  6665. * This is an associative array where the key is an extension-defined tag
  6666. * (typically the extension name), and the value is a PHP callback.
  6667. * These will be called as an OutputPageParserOutput hook, if the relevant
  6668. * tag has been registered with the parser output object.
  6669. *
  6670. * Registration is done with $pout->addOutputHook( $tag, $data ).
  6671. *
  6672. * The callback has the form:
  6673. * @code
  6674. * function outputHook( $outputPage, $parserOutput, $data ) { ... }
  6675. * @endcode
  6676. */
  6677. $wgParserOutputHooks = [];
  6678. /**
  6679. * Whether to include the NewPP limit report as a HTML comment
  6680. */
  6681. $wgEnableParserLimitReporting = true;
  6682. /**
  6683. * List of valid skin names
  6684. *
  6685. * The key should be the name in all lower case, the value should be a properly
  6686. * cased name for the skin. This value will be prefixed with "Skin" to create
  6687. * the class name of the skin to load. Use Skin::getSkinNames() as an accessor
  6688. * if you wish to have access to the full list.
  6689. */
  6690. $wgValidSkinNames = [];
  6691. /**
  6692. * Special page list. This is an associative array mapping the (canonical) names of
  6693. * special pages to either a class name to be instantiated, or a callback to use for
  6694. * creating the special page object. In both cases, the result must be an instance of
  6695. * SpecialPage.
  6696. */
  6697. $wgSpecialPages = [];
  6698. /**
  6699. * Array mapping class names to filenames, for autoloading.
  6700. */
  6701. $wgAutoloadClasses = $wgAutoloadClasses ?? [];
  6702. /**
  6703. * Switch controlling legacy case-insensitive classloading.
  6704. * Do not disable if your wiki must support data created by PHP4, or by
  6705. * MediaWiki 1.4 or earlier.
  6706. */
  6707. $wgAutoloadAttemptLowercase = true;
  6708. /**
  6709. * An array of information about installed extensions keyed by their type.
  6710. *
  6711. * All but 'name', 'path' and 'author' can be omitted.
  6712. *
  6713. * @code
  6714. * $wgExtensionCredits[$type][] = [
  6715. * 'path' => __FILE__,
  6716. * 'name' => 'Example extension',
  6717. * 'namemsg' => 'exampleextension-name',
  6718. * 'author' => [
  6719. * 'Foo Barstein',
  6720. * ],
  6721. * 'version' => '1.9.0',
  6722. * 'url' => 'https://example.org/example-extension/',
  6723. * 'descriptionmsg' => 'exampleextension-desc',
  6724. * 'license-name' => 'GPL-2.0-or-later',
  6725. * ];
  6726. * @endcode
  6727. *
  6728. * The extensions are listed on Special:Version. This page also looks for a file
  6729. * named COPYING or LICENSE (optional .txt extension) and provides a link to
  6730. * view said file. When the 'license-name' key is specified, this file is
  6731. * interpreted as wikitext.
  6732. *
  6733. * - $type: One of 'specialpage', 'parserhook', 'variable', 'media', 'antispam',
  6734. * 'skin', 'api', or 'other', or any additional types as specified through the
  6735. * ExtensionTypes hook as used in SpecialVersion::getExtensionTypes().
  6736. *
  6737. * - name: Name of extension as an inline string instead of localizable message.
  6738. * Do not omit this even if 'namemsg' is provided, as it is used to override
  6739. * the path Special:Version uses to find extension's license info, and is
  6740. * required for backwards-compatibility with MediaWiki 1.23 and older.
  6741. *
  6742. * - namemsg (since MW 1.24): A message key for a message containing the
  6743. * extension's name, if the name is localizable. (For example, skin names
  6744. * usually are.)
  6745. *
  6746. * - author: A string or an array of strings. Authors can be linked using
  6747. * the regular wikitext link syntax. To have an internationalized version of
  6748. * "and others" show, add an element "...". This element can also be linked,
  6749. * for instance "[https://example ...]".
  6750. *
  6751. * - descriptionmsg: A message key or an an array with message key and parameters:
  6752. * `'descriptionmsg' => 'exampleextension-desc',`
  6753. *
  6754. * - description: Description of extension as an inline string instead of
  6755. * localizable message (omit in favour of 'descriptionmsg').
  6756. *
  6757. * - license-name: Short name of the license (used as label for the link), such
  6758. * as "GPL-2.0-or-later" or "MIT" (https://spdx.org/licenses/ for a list of identifiers).
  6759. */
  6760. $wgExtensionCredits = [];
  6761. /**
  6762. * Global list of hooks.
  6763. *
  6764. * The key is one of the events made available by MediaWiki, you can find
  6765. * a description for most of them in docs/hooks.txt. The array is used
  6766. * internally by Hook:run().
  6767. *
  6768. * The value can be one of:
  6769. *
  6770. * - A function name:
  6771. * @code
  6772. * $wgHooks['event_name'][] = $function;
  6773. * @endcode
  6774. * - A function with some data:
  6775. * @code
  6776. * $wgHooks['event_name'][] = [ $function, $data ];
  6777. * @endcode
  6778. * - A an object method:
  6779. * @code
  6780. * $wgHooks['event_name'][] = [ $object, 'method' ];
  6781. * @endcode
  6782. * - A closure:
  6783. * @code
  6784. * $wgHooks['event_name'][] = function ( $hookParam ) {
  6785. * // Handler code goes here.
  6786. * };
  6787. * @endcode
  6788. *
  6789. * @warning You should always append to an event array or you will end up
  6790. * deleting a previous registered hook.
  6791. *
  6792. * @warning Hook handlers should be registered at file scope. Registering
  6793. * handlers after file scope can lead to unexpected results due to caching.
  6794. */
  6795. $wgHooks = [];
  6796. /**
  6797. * List of service wiring files to be loaded by the default instance of MediaWikiServices.
  6798. * Each file listed here is expected to return an associative array mapping service names
  6799. * to instantiator functions. Extensions may add wiring files to define their own services.
  6800. * However, this cannot be used to replace existing services - use the MediaWikiServices
  6801. * hook for that.
  6802. *
  6803. * @see MediaWikiServices
  6804. * @see ServiceContainer::loadWiringFiles() for details on loading service instantiator functions.
  6805. * @see docs/injection.txt for an overview of dependency injection in MediaWiki.
  6806. */
  6807. $wgServiceWiringFiles = [
  6808. __DIR__ . '/ServiceWiring.php'
  6809. ];
  6810. /**
  6811. * Maps jobs to their handlers; extensions
  6812. * can add to this to provide custom jobs.
  6813. * A job handler should either be a class name to be instantiated,
  6814. * or (since 1.30) a callback to use for creating the job object.
  6815. * The callback takes (Title, array map of parameters) as arguments.
  6816. */
  6817. $wgJobClasses = [
  6818. 'deletePage' => DeletePageJob::class,
  6819. 'refreshLinks' => RefreshLinksJob::class,
  6820. 'deleteLinks' => DeleteLinksJob::class,
  6821. 'htmlCacheUpdate' => HTMLCacheUpdateJob::class,
  6822. 'sendMail' => EmaillingJob::class,
  6823. 'enotifNotify' => EnotifNotifyJob::class,
  6824. 'fixDoubleRedirect' => DoubleRedirectJob::class,
  6825. 'AssembleUploadChunks' => AssembleUploadChunksJob::class,
  6826. 'PublishStashedFile' => PublishStashedFileJob::class,
  6827. 'ThumbnailRender' => ThumbnailRenderJob::class,
  6828. 'recentChangesUpdate' => RecentChangesUpdateJob::class,
  6829. 'refreshLinksPrioritized' => RefreshLinksJob::class,
  6830. 'refreshLinksDynamic' => RefreshLinksJob::class,
  6831. 'activityUpdateJob' => ActivityUpdateJob::class,
  6832. 'categoryMembershipChange' => function ( Title $title, $params = [] ) {
  6833. $pc = MediaWikiServices::getInstance()->getParserCache();
  6834. return new CategoryMembershipChangeJob( $pc, $title, $params );
  6835. },
  6836. 'clearUserWatchlist' => ClearUserWatchlistJob::class,
  6837. 'cdnPurge' => CdnPurgeJob::class,
  6838. 'userGroupExpiry' => UserGroupExpiryJob::class,
  6839. 'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class,
  6840. 'userOptionsUpdate' => UserOptionsUpdateJob::class,
  6841. 'enqueue' => EnqueueJob::class, // local queue for multi-DC setups
  6842. 'null' => NullJob::class,
  6843. ];
  6844. /**
  6845. * Jobs that must be explicitly requested, i.e. aren't run by job runners unless
  6846. * special flags are set. The values here are keys of $wgJobClasses.
  6847. *
  6848. * These can be:
  6849. * - Very long-running jobs.
  6850. * - Jobs that you would never want to run as part of a page rendering request.
  6851. * - Jobs that you want to run on specialized machines ( like transcoding, or a particular
  6852. * machine on your cluster has 'outside' web access you could restrict uploadFromUrl )
  6853. * These settings should be global to all wikis.
  6854. */
  6855. $wgJobTypesExcludedFromDefaultQueue = [ 'AssembleUploadChunks', 'PublishStashedFile' ];
  6856. /**
  6857. * Map of job types to how many job "work items" should be run per second
  6858. * on each job runner process. The meaning of "work items" varies per job,
  6859. * but typically would be something like "pages to update". A single job
  6860. * may have a variable number of work items, as is the case with batch jobs.
  6861. * This is used by runJobs.php and not jobs run via $wgJobRunRate.
  6862. * These settings should be global to all wikis.
  6863. * @var float[]
  6864. */
  6865. $wgJobBackoffThrottling = [];
  6866. /**
  6867. * Make job runners commit changes for replica DB-lag prone jobs one job at a time.
  6868. * This is useful if there are many job workers that race on replica DB lag checks.
  6869. * If set, jobs taking this many seconds of DB write time have serialized commits.
  6870. *
  6871. * Note that affected jobs may have worse lock contention. Also, if they affect
  6872. * several DBs at once they may have a smaller chance of being atomic due to the
  6873. * possibility of connection loss while queueing up to commit. Affected jobs may
  6874. * also fail due to the commit lock acquisition timeout.
  6875. *
  6876. * @var float|bool
  6877. * @since 1.26
  6878. */
  6879. $wgJobSerialCommitThreshold = false;
  6880. /**
  6881. * Map of job types to configuration arrays.
  6882. * This determines which queue class and storage system is used for each job type.
  6883. * Job types that do not have explicit configuration will use the 'default' config.
  6884. * These settings should be global to all wikis.
  6885. */
  6886. $wgJobTypeConf = [
  6887. 'default' => [ 'class' => JobQueueDB::class, 'order' => 'random', 'claimTTL' => 3600 ],
  6888. ];
  6889. /**
  6890. * Whether to include the number of jobs that are queued
  6891. * for the API's maxlag parameter.
  6892. * The total number of jobs will be divided by this to get an
  6893. * estimated second of maxlag. Typically bots backoff at maxlag=5,
  6894. * so setting this to the max number of jobs that should be in your
  6895. * queue divided by 5 should have the effect of stopping bots once
  6896. * that limit is hit.
  6897. *
  6898. * @since 1.29
  6899. */
  6900. $wgJobQueueIncludeInMaxLagFactor = false;
  6901. /**
  6902. * Additional functions to be performed with updateSpecialPages.
  6903. * Expensive Querypages are already updated.
  6904. */
  6905. $wgSpecialPageCacheUpdates = [
  6906. 'Statistics' => [ SiteStatsUpdate::class, 'cacheUpdate' ]
  6907. ];
  6908. /**
  6909. * Page property link table invalidation lists. When a page property
  6910. * changes, this may require other link tables to be updated (eg
  6911. * adding __HIDDENCAT__ means the hiddencat tracking category will
  6912. * have been added, so the categorylinks table needs to be rebuilt).
  6913. * This array can be added to by extensions.
  6914. */
  6915. $wgPagePropLinkInvalidations = [
  6916. 'hiddencat' => 'categorylinks',
  6917. ];
  6918. /** @} */ # End extensions }
  6919. /*************************************************************************//**
  6920. * @name Categories
  6921. * @{
  6922. */
  6923. /**
  6924. * Use experimental, DMOZ-like category browser
  6925. */
  6926. $wgUseCategoryBrowser = false;
  6927. /**
  6928. * On category pages, show thumbnail gallery for images belonging to that
  6929. * category instead of listing them as articles.
  6930. */
  6931. $wgCategoryMagicGallery = true;
  6932. /**
  6933. * Paging limit for categories
  6934. */
  6935. $wgCategoryPagingLimit = 200;
  6936. /**
  6937. * Specify how category names should be sorted, when listed on a category page.
  6938. * A sorting scheme is also known as a collation.
  6939. *
  6940. * Available values are:
  6941. *
  6942. * - uppercase: Converts the category name to upper case, and sorts by that.
  6943. *
  6944. * - identity: Does no conversion. Sorts by binary value of the string.
  6945. *
  6946. * - uca-default: Provides access to the Unicode Collation Algorithm with
  6947. * the default element table. This is a compromise collation which sorts
  6948. * all languages in a mediocre way. However, it is better than "uppercase".
  6949. *
  6950. * To use the uca-default collation, you must have PHP's intl extension
  6951. * installed. See https://www.php.net/manual/en/intl.setup.php . The details of the
  6952. * resulting collation will depend on the version of ICU installed on the
  6953. * server.
  6954. *
  6955. * After you change this, you must run maintenance/updateCollation.php to fix
  6956. * the sort keys in the database.
  6957. *
  6958. * Extensions can define there own collations by subclassing Collation
  6959. * and using the Collation::factory hook.
  6960. */
  6961. $wgCategoryCollation = 'uppercase';
  6962. /** @} */ # End categories }
  6963. /*************************************************************************//**
  6964. * @name Logging
  6965. * @{
  6966. */
  6967. /**
  6968. * The logging system has two levels: an event type, which describes the
  6969. * general category and can be viewed as a named subset of all logs; and
  6970. * an action, which is a specific kind of event that can exist in that
  6971. * log type.
  6972. *
  6973. * Note that code should call LogPage::validTypes() to get a list of valid
  6974. * log types instead of checking the global variable.
  6975. */
  6976. $wgLogTypes = [
  6977. '',
  6978. 'block',
  6979. 'protect',
  6980. 'rights',
  6981. 'delete',
  6982. 'upload',
  6983. 'move',
  6984. 'import',
  6985. 'patrol',
  6986. 'merge',
  6987. 'suppress',
  6988. 'tag',
  6989. 'managetags',
  6990. 'contentmodel',
  6991. ];
  6992. /**
  6993. * This restricts log access to those who have a certain right
  6994. * Users without this will not see it in the option menu and can not view it
  6995. * Restricted logs are not added to recent changes
  6996. * Logs should remain non-transcludable
  6997. * Format: logtype => permissiontype
  6998. */
  6999. $wgLogRestrictions = [
  7000. 'suppress' => 'suppressionlog'
  7001. ];
  7002. /**
  7003. * Show/hide links on Special:Log will be shown for these log types.
  7004. *
  7005. * This is associative array of log type => boolean "hide by default"
  7006. *
  7007. * See $wgLogTypes for a list of available log types.
  7008. *
  7009. * @par Example:
  7010. * @code
  7011. * $wgFilterLogTypes = [ 'move' => true, 'import' => false ];
  7012. * @endcode
  7013. *
  7014. * Will display show/hide links for the move and import logs. Move logs will be
  7015. * hidden by default unless the link is clicked. Import logs will be shown by
  7016. * default, and hidden when the link is clicked.
  7017. *
  7018. * A message of the form logeventslist-[type]-log should be added, and will be
  7019. * used for the link text.
  7020. */
  7021. $wgFilterLogTypes = [
  7022. 'patrol' => true,
  7023. 'tag' => true,
  7024. ];
  7025. /**
  7026. * Lists the message key string for each log type. The localized messages
  7027. * will be listed in the user interface.
  7028. *
  7029. * Extensions with custom log types may add to this array.
  7030. *
  7031. * @since 1.19, if you follow the naming convention log-name-TYPE,
  7032. * where TYPE is your log type, yoy don't need to use this array.
  7033. */
  7034. $wgLogNames = [
  7035. '' => 'all-logs-page',
  7036. 'block' => 'blocklogpage',
  7037. 'protect' => 'protectlogpage',
  7038. 'rights' => 'rightslog',
  7039. 'delete' => 'dellogpage',
  7040. 'upload' => 'uploadlogpage',
  7041. 'move' => 'movelogpage',
  7042. 'import' => 'importlogpage',
  7043. 'patrol' => 'patrol-log-page',
  7044. 'merge' => 'mergelog',
  7045. 'suppress' => 'suppressionlog',
  7046. ];
  7047. /**
  7048. * Lists the message key string for descriptive text to be shown at the
  7049. * top of each log type.
  7050. *
  7051. * Extensions with custom log types may add to this array.
  7052. *
  7053. * @since 1.19, if you follow the naming convention log-description-TYPE,
  7054. * where TYPE is your log type, yoy don't need to use this array.
  7055. */
  7056. $wgLogHeaders = [
  7057. '' => 'alllogstext',
  7058. 'block' => 'blocklogtext',
  7059. 'delete' => 'dellogpagetext',
  7060. 'import' => 'importlogpagetext',
  7061. 'merge' => 'mergelogpagetext',
  7062. 'move' => 'movelogpagetext',
  7063. 'patrol' => 'patrol-log-header',
  7064. 'protect' => 'protectlogtext',
  7065. 'rights' => 'rightslogtext',
  7066. 'suppress' => 'suppressionlogtext',
  7067. 'upload' => 'uploadlogpagetext',
  7068. ];
  7069. /**
  7070. * Lists the message key string for formatting individual events of each
  7071. * type and action when listed in the logs.
  7072. *
  7073. * Extensions with custom log types may add to this array.
  7074. */
  7075. $wgLogActions = [];
  7076. /**
  7077. * The same as above, but here values are names of classes,
  7078. * not messages.
  7079. * @see LogPage::actionText
  7080. * @see LogFormatter
  7081. */
  7082. $wgLogActionsHandlers = [
  7083. 'block/block' => BlockLogFormatter::class,
  7084. 'block/reblock' => BlockLogFormatter::class,
  7085. 'block/unblock' => BlockLogFormatter::class,
  7086. 'contentmodel/change' => ContentModelLogFormatter::class,
  7087. 'contentmodel/new' => ContentModelLogFormatter::class,
  7088. 'delete/delete' => DeleteLogFormatter::class,
  7089. 'delete/delete_redir' => DeleteLogFormatter::class,
  7090. 'delete/event' => DeleteLogFormatter::class,
  7091. 'delete/restore' => DeleteLogFormatter::class,
  7092. 'delete/revision' => DeleteLogFormatter::class,
  7093. 'import/interwiki' => ImportLogFormatter::class,
  7094. 'import/upload' => ImportLogFormatter::class,
  7095. 'managetags/activate' => LogFormatter::class,
  7096. 'managetags/create' => LogFormatter::class,
  7097. 'managetags/deactivate' => LogFormatter::class,
  7098. 'managetags/delete' => LogFormatter::class,
  7099. 'merge/merge' => MergeLogFormatter::class,
  7100. 'move/move' => MoveLogFormatter::class,
  7101. 'move/move_redir' => MoveLogFormatter::class,
  7102. 'patrol/patrol' => PatrolLogFormatter::class,
  7103. 'patrol/autopatrol' => PatrolLogFormatter::class,
  7104. 'protect/modify' => ProtectLogFormatter::class,
  7105. 'protect/move_prot' => ProtectLogFormatter::class,
  7106. 'protect/protect' => ProtectLogFormatter::class,
  7107. 'protect/unprotect' => ProtectLogFormatter::class,
  7108. 'rights/autopromote' => RightsLogFormatter::class,
  7109. 'rights/rights' => RightsLogFormatter::class,
  7110. 'suppress/block' => BlockLogFormatter::class,
  7111. 'suppress/delete' => DeleteLogFormatter::class,
  7112. 'suppress/event' => DeleteLogFormatter::class,
  7113. 'suppress/reblock' => BlockLogFormatter::class,
  7114. 'suppress/revision' => DeleteLogFormatter::class,
  7115. 'tag/update' => TagLogFormatter::class,
  7116. 'upload/overwrite' => UploadLogFormatter::class,
  7117. 'upload/revert' => UploadLogFormatter::class,
  7118. 'upload/upload' => UploadLogFormatter::class,
  7119. ];
  7120. /**
  7121. * List of log types that can be filtered by action types
  7122. *
  7123. * To each action is associated the list of log_action
  7124. * subtypes to search for, usually one, but not necessarily so
  7125. * Extensions may append to this array
  7126. * @since 1.27
  7127. */
  7128. $wgActionFilteredLogs = [
  7129. 'block' => [
  7130. 'block' => [ 'block' ],
  7131. 'reblock' => [ 'reblock' ],
  7132. 'unblock' => [ 'unblock' ],
  7133. ],
  7134. 'contentmodel' => [
  7135. 'change' => [ 'change' ],
  7136. 'new' => [ 'new' ],
  7137. ],
  7138. 'delete' => [
  7139. 'delete' => [ 'delete' ],
  7140. 'delete_redir' => [ 'delete_redir' ],
  7141. 'restore' => [ 'restore' ],
  7142. 'event' => [ 'event' ],
  7143. 'revision' => [ 'revision' ],
  7144. ],
  7145. 'import' => [
  7146. 'interwiki' => [ 'interwiki' ],
  7147. 'upload' => [ 'upload' ],
  7148. ],
  7149. 'managetags' => [
  7150. 'create' => [ 'create' ],
  7151. 'delete' => [ 'delete' ],
  7152. 'activate' => [ 'activate' ],
  7153. 'deactivate' => [ 'deactivate' ],
  7154. ],
  7155. 'move' => [
  7156. 'move' => [ 'move' ],
  7157. 'move_redir' => [ 'move_redir' ],
  7158. ],
  7159. 'newusers' => [
  7160. 'create' => [ 'create', 'newusers' ],
  7161. 'create2' => [ 'create2' ],
  7162. 'autocreate' => [ 'autocreate' ],
  7163. 'byemail' => [ 'byemail' ],
  7164. ],
  7165. 'protect' => [
  7166. 'protect' => [ 'protect' ],
  7167. 'modify' => [ 'modify' ],
  7168. 'unprotect' => [ 'unprotect' ],
  7169. 'move_prot' => [ 'move_prot' ],
  7170. ],
  7171. 'rights' => [
  7172. 'rights' => [ 'rights' ],
  7173. 'autopromote' => [ 'autopromote' ],
  7174. ],
  7175. 'suppress' => [
  7176. 'event' => [ 'event' ],
  7177. 'revision' => [ 'revision' ],
  7178. 'delete' => [ 'delete' ],
  7179. 'block' => [ 'block' ],
  7180. 'reblock' => [ 'reblock' ],
  7181. ],
  7182. 'upload' => [
  7183. 'upload' => [ 'upload' ],
  7184. 'overwrite' => [ 'overwrite' ],
  7185. 'revert' => [ 'revert' ],
  7186. ],
  7187. ];
  7188. /**
  7189. * Maintain a log of newusers at Special:Log/newusers?
  7190. */
  7191. $wgNewUserLog = true;
  7192. /**
  7193. * Maintain a log of page creations at Special:Log/create?
  7194. * @since 1.32
  7195. */
  7196. $wgPageCreationLog = true;
  7197. /** @} */ # end logging }
  7198. /*************************************************************************//**
  7199. * @name Special pages (general and miscellaneous)
  7200. * @{
  7201. */
  7202. /**
  7203. * Allow special page inclusions such as {{Special:Allpages}}
  7204. */
  7205. $wgAllowSpecialInclusion = true;
  7206. /**
  7207. * Set this to an array of special page names to prevent
  7208. * maintenance/updateSpecialPages.php from updating those pages.
  7209. * Mapping each special page name to an run mode like 'periodical' if a cronjob is set up.
  7210. */
  7211. $wgDisableQueryPageUpdate = false;
  7212. /**
  7213. * On Special:Unusedimages, consider images "used", if they are put
  7214. * into a category. Default (false) is not to count those as used.
  7215. */
  7216. $wgCountCategorizedImagesAsUsed = false;
  7217. /**
  7218. * Maximum number of links to a redirect page listed on
  7219. * Special:Whatlinkshere/RedirectDestination
  7220. */
  7221. $wgMaxRedirectLinksRetrieved = 500;
  7222. /** @} */ # end special pages }
  7223. /*************************************************************************//**
  7224. * @name Actions
  7225. * @{
  7226. */
  7227. /**
  7228. * Array of allowed values for the "title=foo&action=<action>" parameter. Syntax is:
  7229. * 'foo' => 'ClassName' Load the specified class which subclasses Action
  7230. * 'foo' => true Load the class FooAction which subclasses Action
  7231. * If something is specified in the getActionOverrides()
  7232. * of the relevant Page object it will be used
  7233. * instead of the default class.
  7234. * 'foo' => false The action is disabled; show an error message
  7235. * Unsetting core actions will probably cause things to complain loudly.
  7236. */
  7237. $wgActions = [
  7238. 'credits' => true,
  7239. 'delete' => true,
  7240. 'edit' => true,
  7241. 'editchangetags' => SpecialPageAction::class,
  7242. 'history' => true,
  7243. 'info' => true,
  7244. 'markpatrolled' => true,
  7245. 'mcrundo' => McrUndoAction::class,
  7246. 'mcrrestore' => McrRestoreAction::class,
  7247. 'protect' => true,
  7248. 'purge' => true,
  7249. 'raw' => true,
  7250. 'render' => true,
  7251. 'revert' => true,
  7252. 'revisiondelete' => SpecialPageAction::class,
  7253. 'rollback' => true,
  7254. 'submit' => true,
  7255. 'unprotect' => true,
  7256. 'unwatch' => true,
  7257. 'view' => true,
  7258. 'watch' => true,
  7259. ];
  7260. /** @} */ # end actions }
  7261. /*************************************************************************//**
  7262. * @name Robot (search engine crawler) policy
  7263. * See also $wgNoFollowLinks.
  7264. * @{
  7265. */
  7266. /**
  7267. * Default robot policy. The default policy is to encourage indexing and fol-
  7268. * lowing of links. It may be overridden on a per-namespace and/or per-page
  7269. * basis.
  7270. */
  7271. $wgDefaultRobotPolicy = 'index,follow';
  7272. /**
  7273. * Robot policies per namespaces. The default policy is given above, the array
  7274. * is made of namespace constants as defined in includes/Defines.php. You can-
  7275. * not specify a different default policy for NS_SPECIAL: it is always noindex,
  7276. * nofollow. This is because a number of special pages (e.g., ListPages) have
  7277. * many permutations of options that display the same data under redundant
  7278. * URLs, so search engine spiders risk getting lost in a maze of twisty special
  7279. * pages, all alike, and never reaching your actual content.
  7280. *
  7281. * @par Example:
  7282. * @code
  7283. * $wgNamespaceRobotPolicies = [ NS_TALK => 'noindex' ];
  7284. * @endcode
  7285. */
  7286. $wgNamespaceRobotPolicies = [];
  7287. /**
  7288. * Robot policies per article. These override the per-namespace robot policies.
  7289. * Must be in the form of an array where the key part is a properly canonicalised
  7290. * text form title and the value is a robot policy.
  7291. *
  7292. * @par Example:
  7293. * @code
  7294. * $wgArticleRobotPolicies = [
  7295. * 'Main Page' => 'noindex,follow',
  7296. * 'User:Bob' => 'index,follow',
  7297. * ];
  7298. * @endcode
  7299. *
  7300. * @par Example that DOES NOT WORK because the names are not canonical text
  7301. * forms:
  7302. * @code
  7303. * $wgArticleRobotPolicies = [
  7304. * # Underscore, not space!
  7305. * 'Main_Page' => 'noindex,follow',
  7306. * # "Project", not the actual project name!
  7307. * 'Project:X' => 'index,follow',
  7308. * # Needs to be "Abc", not "abc" (unless $wgCapitalLinks is false for that namespace)!
  7309. * 'abc' => 'noindex,nofollow'
  7310. * ];
  7311. * @endcode
  7312. */
  7313. $wgArticleRobotPolicies = [];
  7314. /**
  7315. * An array of namespace keys in which the __INDEX__/__NOINDEX__ magic words
  7316. * will not function, so users can't decide whether pages in that namespace are
  7317. * indexed by search engines. If set to null, default to $wgContentNamespaces.
  7318. *
  7319. * @par Example:
  7320. * @code
  7321. * $wgExemptFromUserRobotsControl = [ NS_MAIN, NS_TALK, NS_PROJECT ];
  7322. * @endcode
  7323. */
  7324. $wgExemptFromUserRobotsControl = null;
  7325. /** @} */ # End robot policy }
  7326. /************************************************************************//**
  7327. * @name AJAX, Action API and REST API
  7328. * Note: The AJAX entry point which this section refers to is gradually being
  7329. * replaced by the Action API entry point, api.php. They are essentially
  7330. * equivalent. Both of them are used for dynamic client-side features, via XHR.
  7331. * @{
  7332. */
  7333. /**
  7334. *
  7335. * WARNING: SECURITY THREAT - debug use only
  7336. *
  7337. * Disables many security checks in the API for debugging purposes.
  7338. * This flag should never be used on the production servers, as it introduces
  7339. * a number of potential security holes. Even when enabled, the validation
  7340. * will still be performed, but instead of failing, API will return a warning.
  7341. * Also, there will always be a warning notifying that this flag is set.
  7342. * At this point, the flag allows GET requests to go through for modules
  7343. * requiring POST.
  7344. *
  7345. * @since 1.21
  7346. */
  7347. $wgDebugAPI = false;
  7348. /**
  7349. * API module extensions.
  7350. *
  7351. * Associative array mapping module name to modules specs;
  7352. * Each module spec is an associative array containing at least
  7353. * the 'class' key for the module's class, and optionally a
  7354. * 'factory' key for the factory function to use for the module.
  7355. *
  7356. * That factory function will be called with two parameters,
  7357. * the parent module (an instance of ApiBase, usually ApiMain)
  7358. * and the name the module was registered under. The return
  7359. * value must be an instance of the class given in the 'class'
  7360. * field.
  7361. *
  7362. * For backward compatibility, the module spec may also be a
  7363. * simple string containing the module's class name. In that
  7364. * case, the class' constructor will be called with the parent
  7365. * module and module name as parameters, as described above.
  7366. *
  7367. * Examples for registering API modules:
  7368. *
  7369. * @code
  7370. * $wgAPIModules['foo'] = 'ApiFoo';
  7371. * $wgAPIModules['bar'] = [
  7372. * 'class' => ApiBar::class,
  7373. * 'factory' => function( $main, $name ) { ... }
  7374. * ];
  7375. * $wgAPIModules['xyzzy'] = [
  7376. * 'class' => ApiXyzzy::class,
  7377. * 'factory' => [ XyzzyFactory::class, 'newApiModule' ]
  7378. * ];
  7379. * @endcode
  7380. *
  7381. * Extension modules may override the core modules.
  7382. * See ApiMain::$Modules for a list of the core modules.
  7383. */
  7384. $wgAPIModules = [];
  7385. /**
  7386. * API format module extensions.
  7387. * Associative array mapping format module name to module specs (see $wgAPIModules).
  7388. * Extension modules may override the core modules.
  7389. *
  7390. * See ApiMain::$Formats for a list of the core format modules.
  7391. */
  7392. $wgAPIFormatModules = [];
  7393. /**
  7394. * API Query meta module extensions.
  7395. * Associative array mapping meta module name to module specs (see $wgAPIModules).
  7396. * Extension modules may override the core modules.
  7397. *
  7398. * See ApiQuery::$QueryMetaModules for a list of the core meta modules.
  7399. */
  7400. $wgAPIMetaModules = [];
  7401. /**
  7402. * API Query prop module extensions.
  7403. * Associative array mapping prop module name to module specs (see $wgAPIModules).
  7404. * Extension modules may override the core modules.
  7405. *
  7406. * See ApiQuery::$QueryPropModules for a list of the core prop modules.
  7407. */
  7408. $wgAPIPropModules = [];
  7409. /**
  7410. * API Query list module extensions.
  7411. * Associative array mapping list module name to module specs (see $wgAPIModules).
  7412. * Extension modules may override the core modules.
  7413. *
  7414. * See ApiQuery::$QueryListModules for a list of the core list modules.
  7415. */
  7416. $wgAPIListModules = [];
  7417. /**
  7418. * Maximum amount of rows to scan in a DB query in the API
  7419. * The default value is generally fine
  7420. */
  7421. $wgAPIMaxDBRows = 5000;
  7422. /**
  7423. * The maximum size (in bytes) of an API result.
  7424. * @warning Do not set this lower than $wgMaxArticleSize*1024
  7425. */
  7426. $wgAPIMaxResultSize = 8388608;
  7427. /**
  7428. * The maximum number of uncached diffs that can be retrieved in one API
  7429. * request. Set this to 0 to disable API diffs altogether
  7430. */
  7431. $wgAPIMaxUncachedDiffs = 1;
  7432. /**
  7433. * Maximum amount of DB lag on a majority of DB replica DBs to tolerate
  7434. * before forcing bots to retry any write requests via API errors.
  7435. * This should be lower than the 'max lag' value in $wgLBFactoryConf.
  7436. */
  7437. $wgAPIMaxLagThreshold = 7;
  7438. /**
  7439. * Log file or URL (TCP or UDP) to log API requests to, or false to disable
  7440. * API request logging
  7441. */
  7442. $wgAPIRequestLog = false;
  7443. /**
  7444. * Set the timeout for the API help text cache. If set to 0, caching disabled
  7445. */
  7446. $wgAPICacheHelpTimeout = 60 * 60;
  7447. /**
  7448. * The ApiQueryQueryPages module should skip pages that are redundant to true
  7449. * API queries.
  7450. */
  7451. $wgAPIUselessQueryPages = [
  7452. 'MIMEsearch', // aiprop=mime
  7453. 'LinkSearch', // list=exturlusage
  7454. 'FileDuplicateSearch', // prop=duplicatefiles
  7455. ];
  7456. /**
  7457. * Enable AJAX framework
  7458. *
  7459. * @deprecated (officially) since MediaWiki 1.31 and ignored since 1.32
  7460. */
  7461. $wgUseAjax = true;
  7462. /**
  7463. * List of Ajax-callable functions.
  7464. * Extensions acting as Ajax callbacks must register here
  7465. * @deprecated (officially) since 1.27; use the API instead
  7466. */
  7467. $wgAjaxExportList = [];
  7468. /**
  7469. * Enable AJAX check for file overwrite, pre-upload
  7470. */
  7471. $wgAjaxUploadDestCheck = true;
  7472. /**
  7473. * Enable previewing licences via AJAX.
  7474. */
  7475. $wgAjaxLicensePreview = true;
  7476. /**
  7477. * Have clients send edits to be prepared when filling in edit summaries.
  7478. * This gives the server a head start on the expensive parsing operation.
  7479. */
  7480. $wgAjaxEditStash = true;
  7481. /**
  7482. * Settings for incoming cross-site AJAX requests:
  7483. * Newer browsers support cross-site AJAX when the target resource allows requests
  7484. * from the origin domain by the Access-Control-Allow-Origin header.
  7485. * This is currently only used by the API (requests to api.php)
  7486. * $wgCrossSiteAJAXdomains can be set using a wildcard syntax:
  7487. *
  7488. * - '*' matches any number of characters
  7489. * - '?' matches any 1 character
  7490. *
  7491. * @par Example:
  7492. * @code
  7493. * $wgCrossSiteAJAXdomains = [
  7494. * 'www.mediawiki.org',
  7495. * '*.wikipedia.org',
  7496. * '*.wikimedia.org',
  7497. * '*.wiktionary.org',
  7498. * ];
  7499. * @endcode
  7500. */
  7501. $wgCrossSiteAJAXdomains = [];
  7502. /**
  7503. * Domains that should not be allowed to make AJAX requests,
  7504. * even if they match one of the domains allowed by $wgCrossSiteAJAXdomains
  7505. * Uses the same syntax as $wgCrossSiteAJAXdomains
  7506. */
  7507. $wgCrossSiteAJAXdomainExceptions = [];
  7508. /**
  7509. * Enable the experimental REST API.
  7510. *
  7511. * This will be removed once the REST API is stable and used by clients.
  7512. */
  7513. $wgEnableRestAPI = false;
  7514. /** @} */ # End AJAX and API }
  7515. /************************************************************************//**
  7516. * @name Shell and process control
  7517. * @{
  7518. */
  7519. /**
  7520. * Maximum amount of virtual memory available to shell processes under linux, in KB.
  7521. */
  7522. $wgMaxShellMemory = 307200;
  7523. /**
  7524. * Maximum file size created by shell processes under linux, in KB
  7525. * ImageMagick convert for example can be fairly hungry for scratch space
  7526. */
  7527. $wgMaxShellFileSize = 102400;
  7528. /**
  7529. * Maximum CPU time in seconds for shell processes under Linux
  7530. */
  7531. $wgMaxShellTime = 180;
  7532. /**
  7533. * Maximum wall clock time (i.e. real time, of the kind the clock on the wall
  7534. * would measure) in seconds for shell processes under Linux
  7535. */
  7536. $wgMaxShellWallClockTime = 180;
  7537. /**
  7538. * Under Linux: a cgroup directory used to constrain memory usage of shell
  7539. * commands. The directory must be writable by the user which runs MediaWiki.
  7540. *
  7541. * If specified, this is used instead of ulimit, which is inaccurate, and
  7542. * causes malloc() to return NULL, which exposes bugs in C applications, making
  7543. * them segfault or deadlock.
  7544. *
  7545. * A wrapper script will create a cgroup for each shell command that runs, as
  7546. * a subgroup of the specified cgroup. If the memory limit is exceeded, the
  7547. * kernel will send a SIGKILL signal to a process in the subgroup.
  7548. *
  7549. * @par Example:
  7550. * @code
  7551. * mkdir -p /sys/fs/cgroup/memory/mediawiki
  7552. * mkdir -m 0777 /sys/fs/cgroup/memory/mediawiki/job
  7553. * echo '$wgShellCgroup = "/sys/fs/cgroup/memory/mediawiki/job";' >> LocalSettings.php
  7554. * @endcode
  7555. *
  7556. * The reliability of cgroup cleanup can be improved by installing a
  7557. * notify_on_release script in the root cgroup, see e.g.
  7558. * https://gerrit.wikimedia.org/r/#/c/40784
  7559. */
  7560. $wgShellCgroup = false;
  7561. /**
  7562. * Executable path of the PHP cli binary. Should be set up on install.
  7563. */
  7564. $wgPhpCli = '/usr/bin/php';
  7565. /**
  7566. * Locale for LC_ALL, to provide a known environment for locale-sensitive operations
  7567. *
  7568. * For Unix-like operating systems, this should be set to C.UTF-8 or an
  7569. * equivalent to provide the most consistent behavior for locale-sensitive
  7570. * C library operations across different-language wikis. If that locale is not
  7571. * available, use another locale that has a UTF-8 character set.
  7572. *
  7573. * This setting mainly affects the behavior of C library functions, including:
  7574. * - String collation (order when sorting using locale-sensitive comparison)
  7575. * - For example, whether "Å" and "A" are considered to be the same letter or
  7576. * different letters and if different whether it comes after "A" or after
  7577. * "Z", and whether sorting is case sensitive.
  7578. * - String character set (how characters beyond basic ASCII are represented)
  7579. * - We need this to be a UTF-8 character set to work around
  7580. * https://bugs.php.net/bug.php?id=45132
  7581. * - Language used for low-level error messages.
  7582. * - Formatting of date/time and numeric values (e.g. '.' versus ',' as the
  7583. * decimal separator)
  7584. *
  7585. * MediaWiki provides its own methods and classes to perform many
  7586. * locale-sensitive operations, which are designed to be able to vary locale
  7587. * based on wiki language or user preference:
  7588. * - MediaWiki's Collation class should generally be used instead of the C
  7589. * library collation functions when locale-sensitive sorting is needed.
  7590. * - MediaWiki's Message class should be used for localization of messages
  7591. * displayed to the user.
  7592. * - MediaWiki's Language class should be used for formatting numeric and
  7593. * date/time values.
  7594. *
  7595. * @note If multiple wikis are being served from the same process (e.g. the
  7596. * same fastCGI or Apache server), this setting must be the same on all those
  7597. * wikis.
  7598. */
  7599. $wgShellLocale = 'C.UTF-8';
  7600. /**
  7601. * Method to use to restrict shell commands
  7602. *
  7603. * Supported options:
  7604. * - 'autodetect': Autodetect if any restriction methods are available
  7605. * - 'firejail': Use firejail <https://firejail.wordpress.com/>
  7606. * - false: Don't use any restrictions
  7607. *
  7608. * @note If using firejail with MediaWiki running in a home directory different
  7609. * from the webserver user, firejail 0.9.44+ is required.
  7610. *
  7611. * @since 1.31
  7612. * @var string|bool
  7613. */
  7614. $wgShellRestrictionMethod = false;
  7615. /** @} */ # End shell }
  7616. /************************************************************************//**
  7617. * @name HTTP client
  7618. * @{
  7619. */
  7620. /**
  7621. * Timeout for HTTP requests done internally, in seconds.
  7622. * @var int
  7623. */
  7624. $wgHTTPTimeout = 25;
  7625. /**
  7626. * Timeout for HTTP requests done internally for transwiki imports, in seconds.
  7627. * @since 1.29
  7628. */
  7629. $wgHTTPImportTimeout = 25;
  7630. /**
  7631. * Timeout for Asynchronous (background) HTTP requests, in seconds.
  7632. */
  7633. $wgAsyncHTTPTimeout = 25;
  7634. /**
  7635. * Proxy to use for CURL requests.
  7636. */
  7637. $wgHTTPProxy = '';
  7638. /**
  7639. * Local virtual hosts.
  7640. *
  7641. * This lists domains that are configured as virtual hosts on the same machine.
  7642. *
  7643. * This affects the following:
  7644. * - MWHttpRequest: If a request is to be made to a domain listed here, or any
  7645. * subdomain thereof, then no proxy will be used.
  7646. * Command-line scripts are not affected by this setting and will always use
  7647. * the proxy if it is configured.
  7648. *
  7649. * @since 1.25
  7650. */
  7651. $wgLocalVirtualHosts = [];
  7652. /**
  7653. * Timeout for connections done internally (in seconds)
  7654. * Only works for curl
  7655. */
  7656. $wgHTTPConnectTimeout = 5e0;
  7657. /**
  7658. * Whether to respect/honour the request ID provided by the incoming request
  7659. * via the `X-Request-Id` header. Set to `true` if the entity sitting in front
  7660. * of Mediawiki sanitises external requests. Default: `false`.
  7661. */
  7662. $wgAllowExternalReqID = false;
  7663. /** @} */ # End HTTP client }
  7664. /************************************************************************//**
  7665. * @name Job queue
  7666. * @{
  7667. */
  7668. /**
  7669. * Number of jobs to perform per request. May be less than one in which case
  7670. * jobs are performed probabalistically. If this is zero, jobs will not be done
  7671. * during ordinary apache requests. In this case, maintenance/runJobs.php should
  7672. * be run periodically.
  7673. */
  7674. $wgJobRunRate = 1;
  7675. /**
  7676. * When $wgJobRunRate > 0, try to run jobs asynchronously, spawning a new process
  7677. * to handle the job execution, instead of blocking the request until the job
  7678. * execution finishes.
  7679. *
  7680. * @since 1.23
  7681. */
  7682. $wgRunJobsAsync = false;
  7683. /**
  7684. * Number of rows to update per job
  7685. */
  7686. $wgUpdateRowsPerJob = 300;
  7687. /**
  7688. * Number of rows to update per query
  7689. */
  7690. $wgUpdateRowsPerQuery = 100;
  7691. /** @} */ # End job queue }
  7692. /************************************************************************//**
  7693. * @name Miscellaneous
  7694. * @{
  7695. */
  7696. /**
  7697. * Specify the difference engine to use.
  7698. *
  7699. * Supported values:
  7700. * - 'external': Use an external diff engine, which must be specified via $wgExternalDiffEngine
  7701. * - 'wikidiff2': Use the wikidiff2 PHP extension
  7702. * - 'php': PHP implementations included in MediaWiki
  7703. *
  7704. * The default (null) is to use the first engine that's available.
  7705. *
  7706. * @since 1.34
  7707. * @var string|null
  7708. */
  7709. $wgDiffEngine = null;
  7710. /**
  7711. * Name of the external diff engine to use.
  7712. * @var string|false Path to an external diff executable
  7713. */
  7714. $wgExternalDiffEngine = false;
  7715. /**
  7716. * wikidiff2 supports detection of changes in moved paragraphs.
  7717. * This setting controls the maximum number of paragraphs to compare before it bails out.
  7718. * Supported values:
  7719. * * 0: detection of moved paragraphs is disabled
  7720. * * int > 0: maximum number of paragraphs to compare
  7721. * Note: number of paragraph comparisons is in O(n^2).
  7722. * This setting is only effective if the wikidiff2 PHP/HHVM module is used as diffengine.
  7723. * See $wgExternalDiffEngine.
  7724. *
  7725. * @since 1.30
  7726. * @deprecated since 1.34
  7727. */
  7728. $wgWikiDiff2MovedParagraphDetectionCutoff = 0;
  7729. /**
  7730. * Disable redirects to special pages and interwiki redirects, which use a 302
  7731. * and have no "redirected from" link.
  7732. *
  7733. * @note This is only for articles with #REDIRECT in them. URL's containing a
  7734. * local interwiki prefix (or a non-canonical special page name) are still hard
  7735. * redirected regardless of this setting.
  7736. */
  7737. $wgDisableHardRedirects = false;
  7738. /**
  7739. * LinkHolderArray batch size
  7740. * For debugging
  7741. */
  7742. $wgLinkHolderBatchSize = 1000;
  7743. /**
  7744. * By default MediaWiki does not register links pointing to same server in
  7745. * externallinks dataset, use this value to override:
  7746. */
  7747. $wgRegisterInternalExternals = false;
  7748. /**
  7749. * Maximum number of pages to move at once when moving subpages with a page.
  7750. */
  7751. $wgMaximumMovedPages = 100;
  7752. /**
  7753. * Fix double redirects after a page move.
  7754. * Tends to conflict with page move vandalism, use only on a private wiki.
  7755. */
  7756. $wgFixDoubleRedirects = false;
  7757. /**
  7758. * Allow redirection to another page when a user logs in.
  7759. * To enable, set to a string like 'Main Page'
  7760. */
  7761. $wgRedirectOnLogin = null;
  7762. /**
  7763. * Configuration for processing pool control, for use in high-traffic wikis.
  7764. * An implementation is provided in the PoolCounter extension.
  7765. *
  7766. * This configuration array maps pool types to an associative array. The only
  7767. * defined key in the associative array is "class", which gives the class name.
  7768. * The remaining elements are passed through to the class as constructor
  7769. * parameters.
  7770. *
  7771. * @par Example using local redis instance:
  7772. * @code
  7773. * $wgPoolCounterConf = [ 'ArticleView' => [
  7774. * 'class' => PoolCounterRedis::class,
  7775. * 'timeout' => 15, // wait timeout in seconds
  7776. * 'workers' => 1, // maximum number of active threads in each pool
  7777. * 'maxqueue' => 5, // maximum number of total threads in each pool
  7778. * 'servers' => [ '127.0.0.1' ],
  7779. * 'redisConfig' => []
  7780. * ] ];
  7781. * @endcode
  7782. *
  7783. * @par Example using C daemon from https://www.mediawiki.org/wiki/Extension:PoolCounter:
  7784. * @code
  7785. * $wgPoolCounterConf = [ 'ArticleView' => [
  7786. * 'class' => PoolCounter_Client::class,
  7787. * 'timeout' => 15, // wait timeout in seconds
  7788. * 'workers' => 5, // maximum number of active threads in each pool
  7789. * 'maxqueue' => 50, // maximum number of total threads in each pool
  7790. * ... any extension-specific options...
  7791. * ] ];
  7792. * @endcode
  7793. */
  7794. $wgPoolCounterConf = null;
  7795. /**
  7796. * To disable file delete/restore temporarily
  7797. */
  7798. $wgUploadMaintenance = false;
  7799. /**
  7800. * Associative array mapping namespace IDs to the name of the content model pages in that namespace
  7801. * should have by default (use the CONTENT_MODEL_XXX constants). If no special content type is
  7802. * defined for a given namespace, pages in that namespace will use the CONTENT_MODEL_WIKITEXT
  7803. * (except for the special case of JS and CS pages).
  7804. *
  7805. * @note To determine the default model for a new page's main slot, or any slot in general,
  7806. * use SlotRoleHandler::getDefaultModel() together with SlotRoleRegistry::getRoleHandler().
  7807. *
  7808. * @since 1.21
  7809. */
  7810. $wgNamespaceContentModels = [];
  7811. /**
  7812. * How to react if a plain text version of a non-text Content object is requested using
  7813. * ContentHandler::getContentText():
  7814. *
  7815. * * 'ignore': return null
  7816. * * 'fail': throw an MWException
  7817. * * 'serialize': serialize to default format
  7818. *
  7819. * @since 1.21
  7820. */
  7821. $wgContentHandlerTextFallback = 'ignore';
  7822. /**
  7823. * Set to false to disable use of the database fields introduced by the ContentHandler facility.
  7824. * This way, the ContentHandler facility can be used without any additional information in the
  7825. * database. A page's content model is then derived solely from the page's title. This however
  7826. * means that changing a page's default model (e.g. using $wgNamespaceContentModels) will break
  7827. * the page and/or make the content inaccessible. This also means that pages can not be moved to
  7828. * a title that would default to a different content model.
  7829. *
  7830. * Overall, with $wgContentHandlerUseDB = false, no database updates are needed, but content
  7831. * handling is less robust and less flexible.
  7832. *
  7833. * @since 1.21
  7834. * @deprecated since 1.34, and should always be set true.
  7835. */
  7836. $wgContentHandlerUseDB = true;
  7837. /**
  7838. * Determines which types of text are parsed as wikitext. This does not imply that these kinds
  7839. * of texts are also rendered as wikitext, it only means that links, magic words, etc will have
  7840. * the effect on the database they would have on a wikitext page.
  7841. *
  7842. * @todo On the long run, it would be nice to put categories etc into a separate structure,
  7843. * or at least parse only the contents of comments in the scripts.
  7844. *
  7845. * @since 1.21
  7846. */
  7847. $wgTextModelsToParse = [
  7848. CONTENT_MODEL_WIKITEXT, // Just for completeness, wikitext will always be parsed.
  7849. CONTENT_MODEL_JAVASCRIPT, // Make categories etc work, people put them into comments.
  7850. CONTENT_MODEL_CSS, // Make categories etc work, people put them into comments.
  7851. ];
  7852. /**
  7853. * Register handlers for specific types of sites.
  7854. *
  7855. * @since 1.20
  7856. */
  7857. $wgSiteTypes = [
  7858. 'mediawiki' => MediaWikiSite::class,
  7859. ];
  7860. /**
  7861. * Whether the page_props table has a pp_sortkey column. Set to false in case
  7862. * the respective database schema change was not applied.
  7863. * @since 1.23
  7864. */
  7865. $wgPagePropsHaveSortkey = true;
  7866. /**
  7867. * For installations where the canonical server is HTTP but HTTPS is optionally
  7868. * supported, you can specify a non-standard HTTPS port here. $wgServer should
  7869. * be a protocol-relative URL.
  7870. *
  7871. * If HTTPS is always used, just specify the port number in $wgServer.
  7872. *
  7873. * @see https://phabricator.wikimedia.org/T67184
  7874. *
  7875. * @since 1.24
  7876. */
  7877. $wgHttpsPort = 443;
  7878. /**
  7879. * Secret for session storage.
  7880. * This should be set in LocalSettings.php, otherwise wgSecretKey will
  7881. * be used.
  7882. * @since 1.27
  7883. */
  7884. $wgSessionSecret = false;
  7885. /**
  7886. * If for some reason you can't install the PHP OpenSSL extension,
  7887. * you can set this to true to make MediaWiki work again at the cost of storing
  7888. * sensitive session data insecurely. But it would be much more secure to just
  7889. * install the OpenSSL extension.
  7890. * @since 1.27
  7891. */
  7892. $wgSessionInsecureSecrets = false;
  7893. /**
  7894. * Secret for hmac-based key derivation function (fast,
  7895. * cryptographically secure random numbers).
  7896. * This should be set in LocalSettings.php, otherwise wgSecretKey will
  7897. * be used.
  7898. * See also: $wgHKDFAlgorithm
  7899. * @since 1.24
  7900. */
  7901. $wgHKDFSecret = false;
  7902. /**
  7903. * Algorithm for hmac-based key derivation function (fast,
  7904. * cryptographically secure random numbers).
  7905. * See also: $wgHKDFSecret
  7906. * @since 1.24
  7907. */
  7908. $wgHKDFAlgorithm = 'sha256';
  7909. /**
  7910. * Enable page language feature
  7911. * Allows setting page language in database
  7912. * @var bool
  7913. * @since 1.24
  7914. */
  7915. $wgPageLanguageUseDB = false;
  7916. /**
  7917. * Global configuration variable for Virtual REST Services.
  7918. *
  7919. * Use the 'path' key to define automatically mounted services. The value for this
  7920. * key is a map of path prefixes to service configuration. The latter is an array of:
  7921. * - class : the fully qualified class name
  7922. * - options : map of arguments to the class constructor
  7923. * Such services will be available to handle queries under their path from the VRS
  7924. * singleton, e.g. MediaWikiServices::getInstance()->getVirtualRESTServiceClient();
  7925. *
  7926. * Auto-mounting example for Parsoid:
  7927. *
  7928. * $wgVirtualRestConfig['paths']['/parsoid/'] = [
  7929. * 'class' => ParsoidVirtualRESTService::class,
  7930. * 'options' => [
  7931. * 'url' => 'http://localhost:8000',
  7932. * 'prefix' => 'enwiki',
  7933. * 'domain' => 'en.wikipedia.org'
  7934. * ]
  7935. * ];
  7936. *
  7937. * Parameters for different services can also be declared inside the 'modules' value,
  7938. * which is to be treated as an associative array. The parameters in 'global' will be
  7939. * merged with service-specific ones. The result will then be passed to
  7940. * VirtualRESTService::__construct() in the module.
  7941. *
  7942. * Example config for Parsoid:
  7943. *
  7944. * $wgVirtualRestConfig['modules']['parsoid'] = [
  7945. * 'url' => 'http://localhost:8000',
  7946. * 'prefix' => 'enwiki',
  7947. * 'domain' => 'en.wikipedia.org',
  7948. * ];
  7949. *
  7950. * @var array
  7951. * @since 1.25
  7952. */
  7953. $wgVirtualRestConfig = [
  7954. 'paths' => [],
  7955. 'modules' => [],
  7956. 'global' => [
  7957. # Timeout in seconds
  7958. 'timeout' => 360,
  7959. # 'domain' is set to $wgCanonicalServer in Setup.php
  7960. 'forwardCookies' => false,
  7961. 'HTTPProxy' => null
  7962. ]
  7963. ];
  7964. /**
  7965. * Controls whether zero-result search queries with suggestions should display results for
  7966. * these suggestions.
  7967. *
  7968. * @var bool
  7969. * @since 1.26
  7970. */
  7971. $wgSearchRunSuggestedQuery = true;
  7972. /**
  7973. * Where popular password file is located.
  7974. *
  7975. * Default in core contains 10,000 most popular. This config
  7976. * allows you to change which file, in case you want to generate
  7977. * a password file with > 10000 entries in it.
  7978. *
  7979. * @see maintenance/createCommonPasswordCdb.php
  7980. * @since 1.27
  7981. * @deprecated since 1.33
  7982. * @var string path to file
  7983. */
  7984. $wgPopularPasswordFile = __DIR__ . '/password/commonpasswords.cdb';
  7985. /*
  7986. * Max time (in seconds) a user-generated transaction can spend in writes.
  7987. * If exceeded, the transaction is rolled back with an error instead of being committed.
  7988. *
  7989. * @var int|bool Disabled if false
  7990. * @since 1.27
  7991. */
  7992. $wgMaxUserDBWriteDuration = false;
  7993. /*
  7994. * Max time (in seconds) a job-generated transaction can spend in writes.
  7995. * If exceeded, the transaction is rolled back with an error instead of being committed.
  7996. *
  7997. * @var int|bool Disabled if false
  7998. * @since 1.30
  7999. */
  8000. $wgMaxJobDBWriteDuration = false;
  8001. /**
  8002. * Controls Content-Security-Policy header [Experimental]
  8003. *
  8004. * @see https://www.w3.org/TR/CSP2/
  8005. * @since 1.32
  8006. * @var bool|array true to send default version, false to not send.
  8007. * If an array, can have parameters:
  8008. * 'default-src' If true or array (of additional urls) will set a default-src
  8009. * directive, which limits what places things can load from. If false or not
  8010. * set, will send a default-src directive allowing all sources.
  8011. * 'includeCORS' If true or not set, will include urls from
  8012. * $wgCrossSiteAJAXdomains as an allowed load sources.
  8013. * 'unsafeFallback' Add unsafe-inline as a script source, as a fallback for
  8014. * browsers that do not understand nonce-sources [default on].
  8015. * 'useNonces' Require nonces on all inline scripts. If disabled and 'unsafeFallback'
  8016. * is on, then all inline scripts will be allowed [default true].
  8017. * 'script-src' Array of additional places that are allowed to have JS be loaded from.
  8018. * 'report-uri' true to use MW api [default], false to disable, string for alternate uri
  8019. * @warning May cause slowness on windows due to slow random number generator.
  8020. */
  8021. $wgCSPHeader = false;
  8022. /**
  8023. * Controls Content-Security-Policy-Report-Only header
  8024. *
  8025. * @since 1.32
  8026. * @var bool|array Same as $wgCSPHeader
  8027. */
  8028. $wgCSPReportOnlyHeader = false;
  8029. /**
  8030. * List of messages which might contain raw HTML.
  8031. * Extensions should add their messages here. The list is used for access control:
  8032. * changing messages listed here will require editsitecss and editsitejs rights.
  8033. *
  8034. * Message names must be given with underscores rather than spaces and with lowercase first letter.
  8035. *
  8036. * @since 1.32
  8037. * @var string[]
  8038. */
  8039. $wgRawHtmlMessages = [
  8040. 'copyright',
  8041. 'history_copyright',
  8042. 'googlesearch',
  8043. 'feedback-terms',
  8044. 'feedback-termsofuse',
  8045. ];
  8046. /**
  8047. * Mapping of event channels (or channel categories) to EventRelayer configuration.
  8048. *
  8049. * By setting up a PubSub system (like Kafka) and enabling a corresponding EventRelayer class
  8050. * that uses it, MediaWiki can broadcast events to all subscribers. Certain features like WAN
  8051. * cache purging and CDN cache purging will emit events to this system. Appropriate listers can
  8052. * subscribe to the channel and take actions based on the events. For example, a local daemon
  8053. * can run on each CDN cache node and perform local purges based on the URL purge channel events.
  8054. *
  8055. * Some extensions may want to use "channel categories" so that different channels can also share
  8056. * the same custom relayer instance (e.g. when it's likely to be overriden). They can use
  8057. * EventRelayerGroup::getRelayer() based on the category but call notify() on various different
  8058. * actual channels. One reason for this would be that some system have very different performance
  8059. * vs durability needs, so one system (e.g. Kafka) may not be suitable for all uses.
  8060. *
  8061. * The 'default' key is for all channels (or channel categories) without an explicit entry here.
  8062. *
  8063. * @since 1.27
  8064. */
  8065. $wgEventRelayerConfig = [
  8066. 'default' => [
  8067. 'class' => EventRelayerNull::class,
  8068. ]
  8069. ];
  8070. /**
  8071. * Share data about this installation with MediaWiki developers
  8072. *
  8073. * When set to true, MediaWiki will periodically ping https://www.mediawiki.org/ with basic
  8074. * data about this MediaWiki instance. This data includes, for example, the type of system,
  8075. * PHP version, and chosen database backend. The Wikimedia Foundation shares this data with
  8076. * MediaWiki developers to help guide future development efforts.
  8077. *
  8078. * For details about what data is sent, see: https://www.mediawiki.org/wiki/Manual:$wgPingback
  8079. *
  8080. * @var bool
  8081. * @since 1.28
  8082. */
  8083. $wgPingback = false;
  8084. /**
  8085. * List of urls which appear often to be triggering CSP reports
  8086. * but do not appear to be caused by actual content, but by client
  8087. * software inserting scripts (i.e. Ad-Ware).
  8088. * List based on results from Wikimedia logs.
  8089. *
  8090. * @since 1.28
  8091. */
  8092. $wgCSPFalsePositiveUrls = [
  8093. 'https://3hub.co' => true,
  8094. 'https://morepro.info' => true,
  8095. 'https://p.ato.mx' => true,
  8096. 'https://s.ato.mx' => true,
  8097. 'https://adserver.adtech.de' => true,
  8098. 'https://ums.adtechus.com' => true,
  8099. 'https://cas.criteo.com' => true,
  8100. 'https://cat.nl.eu.criteo.com' => true,
  8101. 'https://atpixel.alephd.com' => true,
  8102. 'https://rtb.metrigo.com' => true,
  8103. 'https://d5p.de17a.com' => true,
  8104. 'https://ad.lkqd.net/vpaid/vpaid.js' => true,
  8105. 'https://ad.lkqd.net/vpaid/vpaid.js?fusion=1.0' => true,
  8106. 'https://t.lkqd.net/t' => true,
  8107. 'chrome-extension' => true,
  8108. ];
  8109. /**
  8110. * Shortest CIDR limits that can be checked in any individual range check
  8111. * at Special:Contributions.
  8112. *
  8113. * @var array
  8114. * @since 1.30
  8115. */
  8116. $wgRangeContributionsCIDRLimit = [
  8117. 'IPv4' => 16,
  8118. 'IPv6' => 32,
  8119. ];
  8120. /**
  8121. * The following variables define 3 user experience levels:
  8122. *
  8123. * - newcomer: has not yet reached the 'learner' level
  8124. *
  8125. * - learner: has at least $wgLearnerEdits and has been
  8126. * a member for $wgLearnerMemberSince days
  8127. * but has not yet reached the 'experienced' level.
  8128. *
  8129. * - experienced: has at least $wgExperiencedUserEdits edits and
  8130. * has been a member for $wgExperiencedUserMemberSince days.
  8131. */
  8132. $wgLearnerEdits = 10;
  8133. $wgLearnerMemberSince = 4; # days
  8134. $wgExperiencedUserEdits = 500;
  8135. $wgExperiencedUserMemberSince = 30; # days
  8136. /**
  8137. * Mapping of interwiki index prefixes to descriptors that
  8138. * can be used to change the display of interwiki search results.
  8139. *
  8140. * Descriptors are appended to CSS classes of interwiki results
  8141. * which using InterwikiSearchResultWidget.
  8142. *
  8143. * Predefined descriptors include the following words:
  8144. * definition, textbook, news, quotation, book, travel, course
  8145. *
  8146. * @par Example:
  8147. * @code
  8148. * $wgInterwikiPrefixDisplayTypes = [
  8149. * 'iwprefix' => 'definition'
  8150. * ];
  8151. * @endcode
  8152. */
  8153. $wgInterwikiPrefixDisplayTypes = [];
  8154. /**
  8155. * RevisionStore table schema migration stage (content, slots, content_models & slot_roles tables).
  8156. * Use the SCHEMA_COMPAT_XXX flags. Supported values:
  8157. *
  8158. * - SCHEMA_COMPAT_OLD
  8159. * - SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
  8160. * - SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW
  8161. * - SCHEMA_COMPAT_OLD
  8162. *
  8163. * Note that reading the old and new schema at the same time is not supported.
  8164. * Attempting to set both read bits in $wgMultiContentRevisionSchemaMigrationStage
  8165. * will result in an InvalidArgumentException.
  8166. *
  8167. * @see Task: https://phabricator.wikimedia.org/T174028
  8168. * @see Commit: https://gerrit.wikimedia.org/r/#/c/378724/
  8169. *
  8170. * @since 1.32
  8171. * @var int An appropriate combination of SCHEMA_COMPAT_XXX flags.
  8172. */
  8173. $wgMultiContentRevisionSchemaMigrationStage = SCHEMA_COMPAT_NEW;
  8174. /**
  8175. * The schema to use per default when generating XML dumps. This allows sites to control
  8176. * explicitly when to make breaking changes to their export and dump format.
  8177. */
  8178. $wgXmlDumpSchemaVersion = XML_DUMP_SCHEMA_VERSION_10;
  8179. /**
  8180. * Flag to enable Partial Blocks. This allows an admin to prevent a user from editing specific pages
  8181. * or namespaces.
  8182. *
  8183. * @since 1.33
  8184. * @deprecated 1.33
  8185. * @var bool
  8186. */
  8187. $wgEnablePartialBlocks = false;
  8188. /**
  8189. * Origin Trials tokens.
  8190. *
  8191. * @since 1.33
  8192. * @var array
  8193. */
  8194. $wgOriginTrials = [];
  8195. /**
  8196. * Enable client-side Priority Hints.
  8197. *
  8198. * @warning EXPERIMENTAL!
  8199. *
  8200. * @since 1.33
  8201. * @var bool
  8202. */
  8203. $wgPriorityHints = false;
  8204. /**
  8205. * Ratio of requests that should get Priority Hints when the feature is enabled.
  8206. *
  8207. * @warning EXPERIMENTAL!
  8208. *
  8209. * @since 1.34
  8210. * @var float
  8211. */
  8212. $wgPriorityHintsRatio = 1.0;
  8213. /**
  8214. * Enable Element Timing.
  8215. *
  8216. * @warning EXPERIMENTAL!
  8217. *
  8218. * @since 1.33
  8219. * @var bool
  8220. */
  8221. $wgElementTiming = false;
  8222. /**
  8223. * Expiry of the endpoint definition for the Reporting API.
  8224. *
  8225. * @warning EXPERIMENTAL!
  8226. *
  8227. * @since 1.34
  8228. * @var int
  8229. */
  8230. $wgReportToExpiry = 86400;
  8231. /**
  8232. * List of endpoints for the Reporting API.
  8233. *
  8234. * @warning EXPERIMENTAL!
  8235. *
  8236. * @since 1.34
  8237. * @var array
  8238. */
  8239. $wgReportToEndpoints = [];
  8240. /**
  8241. * List of Feature Policy Reporting types to enable.
  8242. * Each entry is turned into a Feature-Policy-Report-Only header.
  8243. *
  8244. * @warning EXPERIMENTAL!
  8245. *
  8246. * @since 1.34
  8247. * @var array
  8248. */
  8249. $wgFeaturePolicyReportOnly = [];
  8250. /**
  8251. * Options for Special:Search completion widget form created by SearchFormWidget class.
  8252. * Settings that can be used:
  8253. * - showDescriptions: true/false - whether to show opensearch description results
  8254. * - performSearchOnClick: true/false - whether to perform search on click
  8255. * See also TitleWidget.js UI widget.
  8256. * @since 1.34
  8257. * @var array
  8258. */
  8259. $wgSpecialSearchFormOptions = [];
  8260. /**
  8261. * Toggles native image lazy loading, via the "loading" attribute.
  8262. *
  8263. * @warning EXPERIMENTAL!
  8264. *
  8265. * @since 1.34
  8266. * @var array
  8267. */
  8268. $wgNativeImageLazyLoading = false;
  8269. /**
  8270. * Option to whether serve the main page as the domain root
  8271. *
  8272. * @warning EXPERIMENTAL!
  8273. *
  8274. * @since 1.34
  8275. * @var bool
  8276. */
  8277. $wgMainPageIsDomainRoot = false;
  8278. /**
  8279. * For really cool vim folding this needs to be at the end:
  8280. * vim: foldmarker=@{,@} foldmethod=marker
  8281. * @}
  8282. */