dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use "break" instead of "continue"
[lhc/web/wiklou.git]
/
includes
/
installer
/
Installer.php
diff --git
a/includes/installer/Installer.php
b/includes/installer/Installer.php
index
1efe5d6
..
abf4de4
100644
(file)
--- a/
includes/installer/Installer.php
+++ b/
includes/installer/Installer.php
@@
-23,6
+23,8
@@
* @file
* @ingroup Deployment
*/
* @file
* @ingroup Deployment
*/
+
+use MediaWiki\Interwiki\NullInterwikiLookup;
use MediaWiki\MediaWikiServices;
use MediaWiki\Shell\Shell;
use MediaWiki\MediaWikiServices;
use MediaWiki\Shell\Shell;
@@
-404,7
+406,7
@@
abstract class Installer {
$installerConfig = self::getInstallerConfig( $defaultConfig );
// Reset all services and inject config overrides
$installerConfig = self::getInstallerConfig( $defaultConfig );
// Reset all services and inject config overrides
- MediaWiki
\MediaWiki
Services::resetGlobalInstance( $installerConfig );
+ MediaWikiServices::resetGlobalInstance( $installerConfig );
// Don't attempt to load user language options (T126177)
// This will be overridden in the web installer with the user-specified language
// Don't attempt to load user language options (T126177)
// This will be overridden in the web installer with the user-specified language
@@
-415,13
+417,19
@@
abstract class Installer {
Language::getLocalisationCache()->disableBackend();
// Disable all global services, since we don't have any configuration yet!
Language::getLocalisationCache()->disableBackend();
// Disable all global services, since we don't have any configuration yet!
- MediaWiki
\MediaWiki
Services::disableStorageBackend();
+ MediaWikiServices::disableStorageBackend();
+ $mwServices = MediaWikiServices::getInstance();
// Disable object cache (otherwise CACHE_ANYTHING will try CACHE_DB and
// SqlBagOStuff will then throw since we just disabled wfGetDB)
// Disable object cache (otherwise CACHE_ANYTHING will try CACHE_DB and
// SqlBagOStuff will then throw since we just disabled wfGetDB)
- $wgObjectCaches =
MediaWikiServices::getInstance()
->getMainConfig()->get( 'ObjectCaches' );
+ $wgObjectCaches =
$mwServices
->getMainConfig()->get( 'ObjectCaches' );
$wgMemc = ObjectCache::getInstance( CACHE_NONE );
$wgMemc = ObjectCache::getInstance( CACHE_NONE );
+ // Disable interwiki lookup, to avoid database access during parses
+ $mwServices->redefineService( 'InterwikiLookup', function () {
+ return new NullInterwikiLookup();
+ } );
+
// Having a user with id = 0 safeguards us from DB access via User::loadOptions().
$wgUser = User::newFromId( 0 );
RequestContext::getMain()->setUser( $wgUser );
// Having a user with id = 0 safeguards us from DB access via User::loadOptions().
$wgUser = User::newFromId( 0 );
RequestContext::getMain()->setUser( $wgUser );
@@
-990,6
+998,10
@@
abstract class Installer {
return true;
}
return true;
}
+ if ( Shell::isDisabled() ) {
+ return true;
+ }
+
# Get a list of available locales.
$result = Shell::command( '/usr/bin/locale', '-a' )
->execute();
# Get a list of available locales.
$result = Shell::command( '/usr/bin/locale', '-a' )
->execute();
@@
-1199,7
+1211,7
@@
abstract class Installer {
$scriptTypes = [
'php' => [
"<?php echo 'ex' . 'ec';",
$scriptTypes = [
'php' => [
"<?php echo 'ex' . 'ec';",
- "#!/var/env php
5
\n<?php echo 'ex' . 'ec';",
+ "#!/var/env php\n<?php echo 'ex' . 'ec';",
],
];
],
];