forked from miraheze/mw-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLocalExtensions.php
72 lines (60 loc) · 1.91 KB
/
LocalExtensions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
if ( $wmgUseCentralAuth ) {
wfLoadExtension( 'CentralAuth' );
}
if ( $wmgUseChameleon ) {
wfLoadExtension( 'Bootstrap' );
}
if ( $wmgUseCollection ) {
wfLoadExtension( 'ElectronPdfService' );
}
if ( $wgMirahezeCommons && !$cwPrivate ) {
wfLoadExtension( 'GlobalUsage' );
}
if ( $wmgUseGlobalWatchlist ) {
wfLoadExtension( 'GlobalWatchlist' );
}
if ( $wmgUseLdap ) {
wfLoadExtension( 'LdapAuthentication' );
$wgAuthManagerAutoConfig['primaryauth'] += [
LdapPrimaryAuthenticationProvider::class => [
'class' => LdapPrimaryAuthenticationProvider::class,
'args' => [ [
'authoritative' => true, // don't allow local non-LDAP accounts
] ],
'sort' => 50, // must be smaller than local pw provider
],
];
}
if ( $wmgUseMultimediaViewer ) {
if ( $wmgUse3D ) {
$wgMediaViewerExtensions['stl'] = 'mmv.3d';
}
}
if ( $wmgUsePopups ) {
if ( $wmgShowPopupsByDefault ) {
$wgPopupsHideOptInOnPreferencesPage = true;
$wgPopupsOptInDefaultState = '1';
$wgPopupsOptInStateForNewAccounts = '1';
$wgPopupsReferencePreviewsBetaFeature = false;
}
}
if ( $wmgUseSocialProfile ) {
require_once "$IP/extensions/SocialProfile/SocialProfile.php";
}
if ( $wmgUseVisualEditor ) {
if ( $wmgVisualEditorEnableDefault ) {
$wi->config->settings['+wmgDefaultUserOptions']['default']['visualeditor-enable'] = 1;
$wi->config->settings['+wmgDefaultUserOptions']['default']['visualeditor-editor'] = 'visualeditor';
} else {
$wi->config->settings['+wmgDefaultUserOptions']['default']['visualeditor-enable'] = 0;
}
}
if ( $wmgUseWikibaseRepository || $wmgUseWikibaseClient ) {
// Includes Wikibase Configuration. There is a global and per-wiki system here.
require_once '/srv/mediawiki/config/Wikibase.php';
}
// If Flow, VisualEditor, or Linter is used, use the Parsoid php extension
if ( $wmgUseFlow || $wmgUseVisualEditor || $wmgUseLinter ) {
wfLoadExtension( 'Parsoid', "$IP/vendor/wikimedia/parsoid/extension.json" );
}