'MysqlUpdater' => 'includes/installer/MysqlUpdater.php',
'OracleInstaller' => 'includes/installer/OracleInstaller.php',
'OracleUpdater' => 'includes/installer/OracleUpdater.php',
- 'PhpRefCallBugTester' => 'includes/installer/PhpBugTests.php',
'PhpXmlBugTester' => 'includes/installer/PhpBugTests.php',
'PostgresInstaller' => 'includes/installer/PostgresInstaller.php',
'PostgresUpdater' => 'includes/installer/PostgresUpdater.php',
You cannot install or use MediaWiki unless this option is disabled.",
'config-mbstring' => "'''Fatal: [http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload] is active!'''
This option causes errors and may corrupt data unpredictably.
-You cannot install or use MediaWiki unless this option is disabled.",
- 'config-ze1' => "'''Fatal: [http://www.php.net/manual/en/ini.core.php zend.ze1_compatibility_mode] is active!'''
-This option causes horrible bugs with MediaWiki.
You cannot install or use MediaWiki unless this option is disabled.",
'config-safe-mode' => "'''Warning:''' PHP's [http://www.php.net/features.safe-mode safe mode] is active.
It may cause problems, particularly if using file uploads and <code>math</code> support.",
Although MediaWiki checks all uploaded files for security threats, it is highly recommended to [//www.mediawiki.org/wiki/Manual:Security#Upload_security close this security vulnerability] before enabling uploads.",
'config-no-cli-uploads-check' => "'''Warning:''' Your default directory for uploads (<code>$1</code>) is not checked for vulnerability
to arbitrary script execution during the CLI install.",
- 'config-brokenlibxml' => 'Your system has a combination of PHP and libxml2 versions which is buggy and can cause hidden data corruption in MediaWiki and other web applications.
-Upgrade to PHP 5.2.9 or later and libxml2 2.7.3 or later ([//bugs.php.net/bug.php?id=45996 bug filed with PHP]).
-Installation aborted.',
- 'config-using531' => 'MediaWiki cannot be used with PHP $1 due to a bug involving reference parameters to <code>__call()</code>.
-Upgrade to PHP 5.3.2 or higher, or downgrade to PHP 5.3.0 to resolve this.
+ 'config-brokenlibxml' => 'Your system has a combination of PHP and libxml2 versions that is buggy and can cause hidden data corruption in MediaWiki and other web applications.
+Upgrade to libxml2 2.7.3 or later ([https://bugs.php.net/bug.php?id=45996 bug filed with PHP]).
Installation aborted.',
'config-suhosin-max-value-length' => "Suhosin is installed and limits the GET parameter <code>length</code> to $1 bytes.
MediaWiki's ResourceLoader component will work around this limit, but that will degrade performance.
'envCheckDB',
'envCheckRegisterGlobals',
'envCheckBrokenXML',
- 'envCheckPHP531',
'envCheckMagicQuotes',
'envCheckMagicSybase',
'envCheckMbstring',
- 'envCheckZE1',
'envCheckSafeMode',
'envCheckXML',
'envCheckPCRE',
return true;
}
- /**
- * Test PHP (probably 5.3.1, but it could regress again) to make sure that
- * reference parameters to __call() are not converted to null
- * @return bool
- */
- protected function envCheckPHP531() {
- $test = new PhpRefCallBugTester;
- $test->execute();
- if ( !$test->ok ) {
- $this->showError( 'config-using531', phpversion() );
-
- return false;
- }
-
- return true;
- }
-
/**
* Environment check for magic_quotes_runtime.
* @return bool
return true;
}
- /**
- * Environment check for zend.ze1_compatibility_mode.
- * @return bool
- */
- protected function envCheckZE1() {
- if ( wfIniGetBool( 'zend.ze1_compatibility_mode' ) ) {
- $this->showError( 'config-ze1' );
-
- return false;
- }
-
- return true;
- }
-
/**
* Environment check for safe_mode.
* @return bool
$this->parsedData .= $data;
}
}
-
-/**
- * Test for PHP bug #50394 (PHP 5.3.x conversion to null only, not 5.2.x)
- * @see http://bugs.php.net/bug.php?id=50394
- * @ingroup PHPBugTests
- */
-class PhpRefCallBugTester {
- public $ok = false;
-
- function __call( $name, $args ) {
- $old = error_reporting( E_ALL & ~E_WARNING );
- call_user_func_array( array( $this, 'checkForBrokenRef' ), $args );
- error_reporting( $old );
- }
-
- function checkForBrokenRef( &$var ) {
- if ( $var ) {
- $this->ok = true;
- }
- }
-
- function execute() {
- $var = true;
- call_user_func_array( array( $this, 'foo' ), array( &$var ) );
- }
-}
$throttleCount = LoginForm::incLoginThrottle( $user->getName() );
if ( $throttleCount === true ) {
$lang = $this->getLanguage();
- $this->error( array( 'login-throttled', $lang->formatDuration( $wgPasswordAttemptThrottle['seconds'] ) ) );
+ $this->error( array( 'changeemail-throttled', $lang->formatDuration( $wgPasswordAttemptThrottle['seconds'] ) ) );
return false;
}
$throttleCount = LoginForm::incLoginThrottle( $this->mUserName );
if ( $throttleCount === true ) {
$lang = $this->getLanguage();
- throw new PasswordError( $this->msg( 'login-throttled' )
+ throw new PasswordError( $this->msg( 'changepassword-throttled' )
->params( $lang->formatDuration( $wgPasswordAttemptThrottle['seconds'] ) )
->text()
);
# Change password dialog
'changepassword' => 'Change password',
'changepassword-summary' => '', # do not translate or duplicate this message to other languages
+'changepassword-throttled' => 'You have made too many recent login attempts.
+Please wait $1 before trying again.',
'resetpass_announce' => 'You logged in with a temporary emailed code.
To finish logging in, you must set a new password here:',
'resetpass_text' => '<!-- Add text here -->', # only translate this message to other languages if you have to change it
'changeemail-password' => 'Your {{SITENAME}} password:',
'changeemail-submit' => 'Change email',
'changeemail-cancel' => 'Cancel',
+'changeemail-throttled' => 'You have made too many login attempts.
+Please wait $1 before trying again.',
# Special:ResetTokens
'resettokens' => 'Reset tokens',
* $3 - a password (randomly generated)
* $4 - a URL to the wiki ('<' + server name + script name + '>')
* $5 - (Unused) number of days to password expiry date",
-'login-throttled' => 'Error message shown at [[Special:UserLogin]] after the user has tried to login with incorrect password too many times; also used by [[Special:ChangeEmail]] and [[Special:ChangePassword]].
+'login-throttled' => 'Error message shown at [[Special:UserLogin]] after the user has tried to login with incorrect password too many times.
The user has to wait a certain time before trying to log in again.
This is a protection against robots trying to find the password by trying lots of them.
The number of attempts and waiting time are configured via [[mw:Manual:$wgPasswordAttemptThrottle|$wgPasswordAttemptThrottle]].
-This message is used in html.',
+This message is used in html.
+{{identical|Login throttled}}',
'login-abort-generic' => 'The generic unsuccessful login message is used unless otherwise specified by hook writers',
'loginlanguagelabel' => 'Used on [[Special:UserLogin]] if $wgLoginLanguageSelector is true. Parameters:
* $1 - a pipe-separated list built from the names that appear in the message {{msg-mw|Loginlanguagelinks}}.
'resetpass-wrong-oldpass' => 'Error message shown on [[Special:ChangePassword]] when the old password is not valid.',
'resetpass-temp-password' => 'The label of the input box for the temporary password (received by email) on the form displayed after logging in with a temporary password.',
'resetpass-abort-generic' => 'Generic error message shown on [[Special:ChangePassword]] when an extension aborts a password change from a hook.',
+'changepassword-throttled' => 'Error message shown at [[Special:ChangePassword]] after the user has tried to login with incorrect password too many times.
+
+The user has to wait a certain time before trying to log in again.
+
+Parameters:
+* $1 - the time to wait before the next login attempt. Automatically formatted using the following duration messages:
+** {{msg-mw|Duration-millennia}}
+** {{msg-mw|Duration-centuries}}
+** {{msg-mw|Duration-decades}}
+** {{msg-mw|Duration-years}}
+** {{msg-mw|Duration-weeks}}
+** {{msg-mw|Duration-days}}
+** {{msg-mw|Duration-hours}}
+** {{msg-mw|Duration-minutes}}
+** {{msg-mw|Duration-seconds}}
+This is a protection against robots trying to find the password by trying lots of them.
+The number of attempts and waiting time are configured via [[mw:Manual:$wgPasswordAttemptThrottle|$wgPasswordAttemptThrottle]].
+This message is used in html.
+{{identical|Login throttled}}',
# Special:PasswordReset
'passwordreset' => 'Title of [[Special:PasswordReset]].
{{Identical|Reset password}}',
'changeemail-cancel' => 'Cancel button on [[Special:ChangeEmail]]
{{Identical|Cancel}}',
+'changeemail-throttled' => 'Error message shown at [[Special:ChangeEmail]] after the user has tried to login with incorrect password too many times.
+The user has to wait a certain time before trying to log in again.
+
+Parameters:
+* $1 - the time to wait before the next login attempt. Automatically formatted using the following duration messages:
+** {{msg-mw|Duration-millennia}}
+** {{msg-mw|Duration-centuries}}
+** {{msg-mw|Duration-decades}}
+** {{msg-mw|Duration-years}}
+** {{msg-mw|Duration-weeks}}
+** {{msg-mw|Duration-days}}
+** {{msg-mw|Duration-hours}}
+** {{msg-mw|Duration-minutes}}
+** {{msg-mw|Duration-seconds}}
+
+This is a protection against robots trying to find the password by trying lots of them.
+The number of attempts and waiting time are configured via [[mw:Manual:$wgPasswordAttemptThrottle|$wgPasswordAttemptThrottle]].
+This message is used in html.
+{{identical|Login throttled}}',
# Special:ResetTokens
'resettokens' => '{{doc-special|ResetTokens}}
In this case "token" may be translated as "key", or similar.
'retypenew',
'resetpass_submit',
'changepassword-success',
+ 'changepassword-throttled',
'resetpass_forbidden',
'resetpass-no-info',
'resetpass-submit-loggedin',
'changeemail-password',
'changeemail-submit',
'changeemail-cancel',
+ 'changeemail-throttled'
),
'resettokens' => array(
'resettokens',
$test = new PhpXmlBugTester();
if ( !$test->ok ) {
$this->error(
- "Your system has a combination of PHP and libxml2 versions which is buggy\n" .
+ "Your system has a combination of PHP and libxml2 versions that is buggy\n" .
"and can cause hidden data corruption in MediaWiki and other web apps.\n" .
- "Upgrade to PHP 5.2.9 or later and libxml2 2.7.3 or later!\n" .
- "ABORTING (see http://bugs.php.net/bug.php?id=45996).\n",
- true );
- }
-
- $test = new PhpRefCallBugTester;
- $test->execute();
- if ( !$test->ok ) {
- $ver = phpversion();
- $this->error(
- "PHP $ver is not compatible with MediaWiki due to a bug involving\n" .
- "reference parameters to __call. Upgrade to PHP 5.3.2 or higher, or \n" .
- "downgrade to PHP 5.3.0 to fix this.\n" .
- "ABORTING (see http://bugs.php.net/bug.php?id=50394 for details)\n",
+ "Upgrade to libxml2 2.7.3 or later.\n" .
+ "ABORTING (see https://bugs.php.net/bug.php?id=45996).\n",
true );
}
}
background-image: url(@url);
}
+.vertical-gradient ( @startColor: gray, @endColor: white, @startPos: 0, @endPos: 100% ) {
+ background-color: @endColor;
+ background-image: -moz-linear-gradient( top, @startColor @startPos, @endColor @endPos ); // Firefox 3.6+
+ background-image: -webkit-gradient( linear, left top, left bottom, color-stop( @startPos, @startColor ), color-stop( @endPos, @endColor ) ); // Safari 4+, Chrome 2+
+ background-image: -webkit-linear-gradient( top, @startColor @startPos, @endColor @endPos ); // Safari 5.1+, Chrome 10+
+ background-image: linear-gradient( @startColor @startPos, @endColor @endPos ); // Standard
+}
+
/* Note gzip compression means that it is okay to embed twice */
.background-image-svg(@svg, @fallback) {
background-image: url(@fallback);
} )();
// Table of contents toggle
- mw.hook( 'wikipage.content' ).add( function () {
+ mw.hook( 'wikipage.content' ).add( function ( $content ) {
var $tocTitle, $tocToggleLink, hideTocCookie;
- $tocTitle = $( '#toctitle' );
- $tocToggleLink = $( '#togglelink' );
+ $tocTitle = $content.find( '#toctitle' );
+ $tocToggleLink = $content.find( '#togglelink' );
// Only add it if there is a TOC and there is no toggle added already
- if ( $( '#toc' ).length && $tocTitle.length && !$tocToggleLink.length ) {
+ if ( $content.find( '#toc' ).length && $tocTitle.length && !$tocToggleLink.length ) {
hideTocCookie = $.cookie( 'mw_hidetoc' );
$tocToggleLink = $( '<a href="#" class="internal" id="togglelink"></a>' )
.text( mw.msg( 'hidetoc' ) )
font-family: @content-font-family;
}
body {
- background-color: #f6f6f6;
+ background-color: @menu-background-color;
font-size: @body-font-size;
}
margin-left: 10em;
padding: @content-padding;
/* Border on top, left, and bottom side */
- border: 1px solid #a7d7f9;
+ border: 1px solid @content-border-color;
border-right-width: 0;
/* Merge the border with tabs' one (in their background image) */
margin-top: -1px;
- background-color: white;
+ background-color: @body-background-color;
color: @content-font-color;
direction: ltr;
}
/* Head */
#mw-page-base {
height: 5em;
- background-color: white;
- .background-image('images/page-fade.png');
background-position: bottom left;
background-repeat: repeat-x;
+ .vertical-gradient(@body-background-color, @menu-background-color, 40%, 100%);
}
#mw-head-base {
background-color: #fff;
background-color: rgba(255, 255, 255, 0.93);
padding: 0.75em 1.5em;
- border: solid 1px #a7d7f9;
+ border: solid 1px @content-border-color;
border-radius: 0.75em;
-webkit-box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125);
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125);
@body-font-size: 1em;
// Page content
+// FIXME: Use global variable since Echo and CentralNotice use this variable
+@content-border-color: #a7d7f9;
@content-font-family: sans-serif;
@content-font-color: black;
@content-font-size: 0.8em;
@content-padding: 1.25em 1.5em 1.5em 1.5em;
@content-heading-font-size: 1.6em;
@content-heading-font-family: sans-serif;
+@body-background-color: #fff;
+
+// Navigation
+@menu-background-color: #f6f6f6;
// Common menu
@menu-link-color: #0645ad;