-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefaults.php
More file actions
135 lines (101 loc) · 3.56 KB
/
Defaults.php
File metadata and controls
135 lines (101 loc) · 3.56 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php
namespace MediaWikiConfig;
# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
# MW Defaults
## Include platform/distribution defaults
require_once "$IP/includes/PlatformSettings.php";
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
## UPO means: this is also a user preference option
$wgEnableEmail = true;
# UPO
$wgEnableUserEmail = true;
$wgEmergencyContact = "";
$wgPasswordSender = "";
# UPO
$wgEnotifUserTalk = false;
# UPO
$wgEnotifWatchlist = false;
$wgEmailAuthentication = true;
# MySQL specific settings
$wgDBprefix = "";
$wgDBssl = false;
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
# Shared database table
# This has no effect unless $wgSharedDB is also set.
$wgSharedTables[] = "actor";
## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = [];
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = false;
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
# about this MediaWiki instance. The Wikimedia Foundation shares this data
# with MediaWiki developers to help guide future development efforts.
$wgPingback = false;
# Time zone
$wgLocaltimezone = "UTC";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publicly accessible from the web.
#$wgCacheDirectory = "$IP/cache";
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
# Set to the title of a wiki page that describes your license/copyright
$wgRightsPage = "";
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
# Environment variables
$wgMwcEnv = parse_ini_file( '/srv/mediawiki-config/.env' );
$wgSecretKey = $wgMwcEnv['MW_SECRET_KEY'];
$wgUpgradeKey = $wgMwcEnv['MW_UPGRADE_KEY'];
$wgScriptPath = $wgMwcEnv['MW_SCRIPT_PATH'];
$wgResourceBasePath = $wgScriptPath;
$wgServer = $wgMwcEnv['MW_SERVER'];
$wgLogos = [
'1x' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",
'icon' => "$wgResourceBasePath/resources/assets/change-your-logo-icon.svg",
];
$wgLanguageCode = $wgMwcEnv['MW_LANG'];
$wgSitename = $wgMwcEnv['MW_SITENAME'];
$wgMetaNamespace = $wgMwcEnv['MW_META_NAMESPACE'];
## Database settings
$wgDBtype = "mysql";
$wgDBserver = $wgMwcEnv['MWC_DB_HOST'];
$wgDBname = $wgMwcEnv['MWC_DB_DATABASE'];
$wgDBuser = $wgMwcEnv['MWC_DB_USER'];
$wgDBpassword = $wgMwcEnv['MWC_DB_PASSWORD'];
# Load other configuration
require_once 'Farm/MWCFarm.php';
require_once 'MWCConfig.php';
require_once 'MWCExtensions.php';
require_once 'MWCFunctions.php';
require_once 'MWCHooks.php';
require_once 'MWCSkins.php';
require_once 'MWCUtils.php';
require_once 'MWCMocks.php';
require_once 'MWCServices.php';
require_once 'MWCProfiling.php';
// load MWCPrivate.php if available
if ( file_exists( stream_resolve_include_path( 'MWCPrivate.php' ) ) ) {
require_once 'MWCPrivate.php';
} else {
// create an empty trait so we don't get an error
// phpcs:ignore MediaWiki.Files.ClassMatchesFilename.NotMatch
trait MWCPrivate {
}
}
require_once 'MediaWikiConfig.php';
return MediaWikiConfig::getInstance();