$data['phpversion'] = PHP_VERSION;
$data['phpsapi'] = PHP_SAPI;
+ if ( defined( 'HHVM_VERSION' ) ) {
+ $data['hhvmversion'] = HHVM_VERSION;
+ }
$data['dbtype'] = $config->get( 'DBtype' );
$data['dbversion'] = $this->getDB()->getServerVersion();
if ( $wgContLang->linkPrefixExtension() ) {
$linkPrefixCharset = $wgContLang->linkPrefixCharset();
$data['linkprefixcharset'] = $linkPrefixCharset;
- // For backwards compatability
+ // For backwards compatibility
$data['linkprefix'] = "/^((?>.*[^$linkPrefixCharset]|))(.+)$/sDu";
} else {
$data['linkprefixcharset'] = '';
$prefix = $row['iw_prefix'];
$val = array();
$val['prefix'] = $prefix;
- if ( $row['iw_local'] == '1' ) {
+ if ( isset( $row['iw_local'] ) && $row['iw_local'] == '1' ) {
$val['local'] = '';
}
if ( $row['iw_trans'] == '1' ) {
return 'Return general information about the site.';
}
- public function getPossibleErrors() {
- return array_merge( parent::getPossibleErrors(), array( array(
- 'code' => 'includeAllDenied',
- 'info' => 'Cannot view all servers info unless $wgShowHostnames is true'
- ), ) );
- }
-
public function getExamples() {
return array(
'api.php?action=query&meta=siteinfo&siprop=general|namespaces|namespacealiases|statistics',
* @param int $callerOffset How far up the callstack is the original
* caller. 2 = function that called the function that called
* MWDebug::deprecated() (Added in 1.20).
- * @return mixed
*/
public static function deprecated( $function, $version = false,
$component = false, $callerOffset = 2
return array(
'mwVersion' => $wgVersion,
- 'phpVersion' => PHP_VERSION,
+ 'phpEngine' => wfIsHHVM() ? 'HHVM' : 'PHP',
+ 'phpVersion' => wfIsHHVM() ? HHVM_VERSION : PHP_VERSION,
'gitRevision' => GitInfo::headSHA1(),
'gitBranch' => GitInfo::currentBranch(),
'gitViewUrl' => GitInfo::headViewUrl(),
public function doEnvironmentChecks() {
// Php version has already been checked by entry scripts
// Show message here for information purposes
- $this->showMessage( 'config-env-php', PHP_VERSION );
+ if ( wfIsHHVM() ) {
+ $this->showMessage( 'config-env-hhvm', HHVM_VERSION );
+ } else {
+ $this->showMessage( 'config-env-php', PHP_VERSION );
+ }
$good = true;
// Must go here because an old version of PCRE can prevent other checks from completing
// registration out of the global scope and into a real format.
// @see https://bugzilla.wikimedia.org/67440
global $wgAutoloadClasses;
+ $wgAutoloadClasses = array();
wfSuppressWarnings();
$_lsExists = file_exists( "$IP/LocalSettings.php" );
/**
* Environment check for register_globals.
* Prevent installation if enabled
+ * @return bool
*/
protected function envCheckRegisterGlobals() {
if ( wfIniGetBool( 'register_globals' ) ) {
array( 'name' => 'interwiki', 'callback' => array( $installer, 'populateInterwikiTable' ) ),
array( 'name' => 'stats', 'callback' => array( $this, 'populateSiteStats' ) ),
array( 'name' => 'keys', 'callback' => array( $this, 'generateKeys' ) ),
+ array( 'name' => 'updates', 'callback' => array( $installer, 'insertUpdateKeys' ) ),
array( 'name' => 'sysop', 'callback' => array( $this, 'createSysop' ) ),
array( 'name' => 'mainpage', 'callback' => array( $this, 'createMainpage' ) ),
);
"config-env-good": "The environment has been checked.\nYou can install MediaWiki.",
"config-env-bad": "The environment has been checked.\nYou cannot install MediaWiki.",
"config-env-php": "PHP $1 is installed.",
+ "config-env-hhvm": "HHVM $1 is installed.",
"config-unicode-using-utf8": "Using Brion Vibber's utf8_normalize.so for Unicode normalization.",
"config-unicode-using-intl": "Using the [http://pecl.php.net/intl intl PECL extension] for Unicode normalization.",
"config-unicode-pure-php-warning": "<strong>Warning:</strong> The [http://pecl.php.net/intl intl PECL extension] is not available to handle Unicode normalization, falling back to slow pure-PHP implementation.\nIf you run a high-traffic site, you should read a little on [//www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations Unicode normalization].",
"config-install-stats": "Initializing statistics",
"config-install-keys": "Generating secret keys",
"config-insecure-keys": "<strong>Warning:</strong> {{PLURAL:$2|A secure key|Secure keys}} ($1) generated during installation {{PLURAL:$2|is|are}} not completely safe. Consider changing {{PLURAL:$2|it|them}} manually.",
+ "config-install-updates": "Prevent running unneeded updates",
+ "config-install-updates-failed": "<strong>Error:</strong> Inserting update keys into tables failed with the following error: $1",
"config-install-sysop": "Creating administrator user account",
"config-install-subscribe-fail": "Unable to subscribe to mediawiki-announce: $1",
"config-install-subscribe-notpossible": "cURL is not installed and <code>allow_url_fopen</code> is not available.",
"config-env-good": "See also:\n* {{msg-mw|Config-env-bad}}",
"config-env-bad": "See also:\n* {{msg-mw|Config-env-good}}",
"config-env-php": "Parameters:\n* $1 - the version of PHP that has been installed\nSee also:\n* {{msg-mw|config-env-php-toolow}}",
+ "config-env-hhvm": "Parameters:\n* $1 - the version of HHVM that has been installed",
"config-unicode-using-utf8": "Status message in the MediaWiki installer environment checks.",
"config-unicode-using-intl": "Status message in the MediaWiki installer environment checks.",
"config-unicode-pure-php-warning": "PECL is the name of a group producing standard pieces of software for PHP, and intl is the name of their library handling some aspects of internationalization.",
"config-install-step-done": "{{Identical|Done}}",
"config-install-step-failed": "{{Identical|Failed}}",
"config-install-extensions": "Notice shown to the user during the install about progress when extensions are being installed.",
- "config-install-database": "*{{msg-mw|Config-install-database}}\n*{{msg-mw|Config-install-tables}}\n*{{msg-mw|Config-install-schema}}\n*{{msg-mw|Config-install-user}}\n*{{msg-mw|Config-install-interwiki}}\n*{{msg-mw|Config-install-stats}}\n*{{msg-mw|Config-install-keys}}\n*{{msg-mw|Config-install-sysop}}\n*{{msg-mw|Config-install-mainpage}}",
+ "config-install-database": "Message indicates the database is being set up\n\nSee also:\n*{{msg-mw|Config-install-database}}\n*{{msg-mw|Config-install-tables}}\n*{{msg-mw|Config-install-interwiki}}\n*{{msg-mw|Config-install-stats}}\n*{{msg-mw|Config-install-keys}}\n*{{msg-mw|Config-install-updates}}\n*{{msg-mw|Config-install-schema}}\n*{{msg-mw|Config-install-user}}\n*{{msg-mw|Config-install-sysop}}\n*{{msg-mw|Config-install-mainpage}}",
"config-install-schema": "*{{msg-mw|Config-install-database}}\n*{{msg-mw|Config-install-tables}}\n*{{msg-mw|Config-install-schema}}\n*{{msg-mw|Config-install-user}}\n*{{msg-mw|Config-install-interwiki}}\n*{{msg-mw|Config-install-stats}}\n*{{msg-mw|Config-install-keys}}\n*{{msg-mw|Config-install-sysop}}\n*{{msg-mw|Config-install-mainpage}}",
"config-install-pg-schema-not-exist": "Error message shown to users picking PostgreSQL.",
"config-install-pg-schema-failed": "Parameters:\n* $1 = database user name (usernames in the database are unrelated to wiki user names)\n* $2 =",
"config-install-user-grant-failed": "Parameters:\n* $1 is the database username for which granting rights failed\n* $2 is the error message",
"config-install-user-missing": "Used as PostgreSQL error message. Parameters:\n* $1 - database username\nSee also:\n* {{msg-mw|Config-install-user-missing-create}}",
"config-install-user-missing-create": "Used as PostgreSQL error message. Parameters:\n* $1 - database username\nSee also:\n* {{msg-mw|Config-install-user-missing}}",
- "config-install-tables": "Message indicates that the tables are being created\n\nSee also:\n*{{msg-mw|Config-install-database}}\n*{{msg-mw|Config-install-tables}}\n*{{msg-mw|Config-install-schema}}\n*{{msg-mw|Config-install-user}}\n*{{msg-mw|Config-install-interwiki}}\n*{{msg-mw|Config-install-stats}}\n*{{msg-mw|Config-install-keys}}\n*{{msg-mw|Config-install-sysop}}\n*{{msg-mw|Config-install-mainpage}}",
+ "config-install-tables": "Message indicates that the tables are being created\n\nSee also:\n*{{msg-mw|Config-install-database}}\n*{{msg-mw|Config-install-tables}}\n*{{msg-mw|Config-install-interwiki}}\n*{{msg-mw|Config-install-stats}}\n*{{msg-mw|Config-install-keys}}\n*{{msg-mw|Config-install-updates}}\n*{{msg-mw|Config-install-schema}}\n*{{msg-mw|Config-install-user}}\n*{{msg-mw|Config-install-sysop}}\n*{{msg-mw|Config-install-mainpage}}",
"config-install-tables-exist": "Error notice during the installation saying that the database already seems set up for MediaWiki, so it's continuing without taking that step.",
"config-install-tables-failed": "Used as PostgreSQL error message. Parameters:\n* $1 - detailed error message",
"config-install-interwiki": "Message indicates that the interwikitables are being populated\n\nSee also:\n*{{msg-mw|Config-install-database}}\n*{{msg-mw|Config-install-tables}}\n*{{msg-mw|Config-install-schema}}\n*{{msg-mw|Config-install-user}}\n*{{msg-mw|Config-install-interwiki}}\n*{{msg-mw|Config-install-stats}}\n*{{msg-mw|Config-install-keys}}\n*{{msg-mw|Config-install-sysop}}\n*{{msg-mw|Config-install-mainpage}}",
"config-install-stats": "*{{msg-mw|Config-install-database}}\n*{{msg-mw|Config-install-tables}}\n*{{msg-mw|Config-install-schema}}\n*{{msg-mw|Config-install-user}}\n*{{msg-mw|Config-install-interwiki}}\n*{{msg-mw|Config-install-stats}}\n*{{msg-mw|Config-install-keys}}\n*{{msg-mw|Config-install-sysop}}\n*{{msg-mw|Config-install-mainpage}}",
"config-install-keys": "*{{msg-mw|Config-install-database}}\n*{{msg-mw|Config-install-tables}}\n*{{msg-mw|Config-install-schema}}\n*{{msg-mw|Config-install-user}}\n*{{msg-mw|Config-install-interwiki}}\n*{{msg-mw|Config-install-stats}}\n*{{msg-mw|Config-install-keys}}\n*{{msg-mw|Config-install-sysop}}\n*{{msg-mw|Config-install-mainpage}}",
"config-insecure-keys": "Parameters:\n* $1 - A list of names of the secret keys that were generated.\n* $2 - the number of items in the list $1, to be used with PLURAL.",
+ "config-install-updates": "Message indicating that the updatelog table is filled with keys of updates that won't be run when running database updates.\n\nSee also:\n*{{msg-mw|Config-install-database}}\n*{{msg-mw|Config-install-tables}}\n*{{msg-mw|Config-install-interwiki}}\n*{{msg-mw|Config-install-stats}}\n*{{msg-mw|Config-install-keys}}\n*{{msg-mw|Config-install-updates}}\n*{{msg-mw|Config-install-schema}}\n*{{msg-mw|Config-install-user}}\n*{{msg-mw|Config-install-sysop}}\n*{{msg-mw|Config-install-mainpage}}",
+ "config-install-updates-failed": "Used as error message. Parameters:\n* $1 - detailed error message",
"config-install-sysop": "Message indicates that the administrator user account is being created\n\nSee also:\n*{{msg-mw|Config-install-database}}\n*{{msg-mw|Config-install-tables}}\n*{{msg-mw|Config-install-schema}}\n*{{msg-mw|Config-install-user}}\n*{{msg-mw|Config-install-interwiki}}\n*{{msg-mw|Config-install-stats}}\n*{{msg-mw|Config-install-keys}}\n*{{msg-mw|Config-install-sysop}}\n*{{msg-mw|Config-install-mainpage}}",
- "config-install-subscribe-fail": "{{doc-important|\"mediawiki-announce\" is the name of a mailing list and should not be translated.}}",
+ "config-install-subscribe-fail": "{{doc-important|\"[[m:mail:mediawiki-announce|mediawiki-announce]]\" is the name of a mailing list and should not be translated.}}\nA message displayed if the MediaWiki installer encounters an error making a request to lists.wikimedia.org which hosts the mailing list.\n* $1 - the HTTP error encountered, reproduced as is (English string)",
"config-install-subscribe-notpossible": "Error shown when automatically subscribing to the MediaWiki announcements mailing list fails.",
"config-install-mainpage": "*{{msg-mw|Config-install-database}}\n*{{msg-mw|Config-install-tables}}\n*{{msg-mw|Config-install-schema}}\n*{{msg-mw|Config-install-user}}\n*{{msg-mw|Config-install-interwiki}}\n*{{msg-mw|Config-install-stats}}\n*{{msg-mw|Config-install-keys}}\n*{{msg-mw|Config-install-sysop}}\n*{{msg-mw|Config-install-mainpage}}",
"config-install-extension-tables": "Notice shown to the user during the install about progress.",
/**
* main()
+ * @param string|null $par
*/
public function execute( $par ) {
global $IP, $wgExtensionCredits;
// wikimarkup can be used.
$software = array();
$software['[https://www.mediawiki.org/ MediaWiki]'] = self::getVersionLinked();
- $phpKey = wfIsHHVM() ? '[http://hhvm.com/ HHVM]' :
- '[https://php.net/ PHP]';
- $software[$phpKey] = PHP_VERSION . " (" . PHP_SAPI . ")";
+ if ( wfIsHHVM() ) {
+ $software['[http://hhvm.com/ HHVM]'] = HHVM_VERSION . " (" . PHP_SAPI . ")";
+ } else {
+ $software['[https://php.net/ PHP]'] = PHP_VERSION . " (" . PHP_SAPI . ")";
+ }
$software[$dbr->getSoftwareLink()] = $dbr->getServerInfo();
// Allow a hook to add/remove items.
function getExtensionCredits() {
global $wgExtensionCredits;
- if ( !count( $wgExtensionCredits ) ) {
+ if (
+ count( $wgExtensionCredits ) === 0 ||
+ // Skins are displayed separately, see getSkinCredits()
+ ( count( $wgExtensionCredits ) === 1 && isset( $wgExtensionCredits['skin'] ) )
+ ) {
return '';
}
* @return string Wikitext
*/
function getSkinCredits() {
+ global $wgExtensionCredits;
+ if ( !isset( $wgExtensionCredits['skin'] ) || count( $wgExtensionCredits['skin'] ) === 0 ) {
+ return '';
+ }
+
$out = Xml::element(
'h2',
array( 'id' => 'mw-version-skin' ),
if ( $vcsDate ) {
$vcsTimeString = Html::element( 'span',
array( 'class' => 'mw-version-ext-vcs-timestamp' ),
- $this->getLanguage()->timeanddate( $vcsDate )
+ $this->getLanguage()->timeanddate( $vcsDate, true )
);
$versionString .= " {$vcsTimeString}";
}