MediaWiki
REL1_39
Maintenance.php
Go to the documentation of this file.
1
<?php
28
if
( !defined(
'RUN_MAINTENANCE_IF_MAIN'
) ) {
29
// Define this so scripts can easily find doMaintenance.php
30
define(
'RUN_MAINTENANCE_IF_MAIN'
, __DIR__ .
'/doMaintenance.php'
);
31
32
// Original name for compat, harmless
33
// Support: MediaWiki < 1.31
34
define(
'DO_MAINTENANCE'
, RUN_MAINTENANCE_IF_MAIN );
35
}
36
37
if
( defined(
'MEDIAWIKI'
) ) {
38
// This file is included by many autoloaded class files, and so may
39
// potentially be invoked in the context of a web request or another CLI
40
// script. It's not appropriate to run the following file-scope code in
41
// such a case.
42
return
;
43
}
44
45
define(
'MW_ENTRY_POINT'
,
'cli'
);
46
47
// Bail on old versions of PHP, or if composer has not been run yet to install
48
// dependencies.
49
require_once __DIR__ .
'/../includes/BootstrapHelperFunctions.php'
;
50
require_once __DIR__ .
'/../includes/PHPVersionCheck.php'
;
51
wfEntryPointCheck
(
'text'
);
52
57
$maintClass
=
false
;
58
59
// Some extensions rely on MW_INSTALL_PATH to find core files to include. Setting it here helps them
60
// if they're included by a core script (like DatabaseUpdater) after Maintenance.php has already
61
// been run.
62
if
( strval( getenv(
'MW_INSTALL_PATH'
) ) ===
''
) {
63
putenv(
'MW_INSTALL_PATH='
. realpath( __DIR__ .
'/..'
) );
64
}
65
66
require_once __DIR__ .
'/includes/Maintenance.php'
;
67
require_once __DIR__ .
'/includes/LoggedUpdateMaintenance.php'
;
68
require_once __DIR__ .
'/includes/FakeMaintenance.php'
;
$maintClass
string false $maintClass
Definition
Maintenance.php:57
wfEntryPointCheck
wfEntryPointCheck( $format='text', $scriptPath='/')
Check PHP version and that external dependencies are installed, and display an informative error if e...
Definition
PHPVersionCheck.php:334
maintenance
Maintenance.php
Generated on Mon Dec 16 2024 06:37:16 for MediaWiki by
1.10.0