Merge "Split documentation for $wgRCLinkLimits/$wgRCLinkDays"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 23 Jan 2014 20:04:07 +0000 (20:04 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 23 Jan 2014 20:04:07 +0000 (20:04 +0000)
17 files changed:
includes/AutoLoader.php
includes/installer/Installer.i18n.php
includes/installer/Installer.php
includes/installer/PhpBugTests.php
includes/specials/SpecialChangeEmail.php
includes/specials/SpecialChangePassword.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc
maintenance/update.php
resources/mediawiki.less/mediawiki.mixins.less
resources/mediawiki/mediawiki.util.js
skins/vector/components/common.less
skins/vector/components/navigation.less
skins/vector/components/notifications.less
skins/vector/images/page-fade.png [deleted file]
skins/vector/variables.less

index a7ac139..6d65a82 100644 (file)
@@ -609,7 +609,6 @@ $wgAutoloadLocalClasses = array(
        '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',
index cbd9af2..69fd6a3 100644 (file)
@@ -115,9 +115,6 @@ This option corrupts data input unpredictably.
 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.",
@@ -163,11 +160,8 @@ Installation aborted.",
 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.
index 9fbf088..8b15f0c 100644 (file)
@@ -116,11 +116,9 @@ abstract class Installer {
                'envCheckDB',
                'envCheckRegisterGlobals',
                'envCheckBrokenXML',
-               'envCheckPHP531',
                'envCheckMagicQuotes',
                'envCheckMagicSybase',
                'envCheckMbstring',
-               'envCheckZE1',
                'envCheckSafeMode',
                'envCheckXML',
                'envCheckPCRE',
@@ -734,23 +732,6 @@ abstract class Installer {
                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
@@ -793,20 +774,6 @@ abstract class Installer {
                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
index 5471264..0460134 100644 (file)
@@ -45,29 +45,3 @@ class PhpXmlBugTester {
                $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 ) );
-       }
-}
index d9ef5d7..e678259 100644 (file)
@@ -232,7 +232,7 @@ class SpecialChangeEmail extends UnlistedSpecialPage {
                $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;
                }
index d54828a..484e00c 100644 (file)
@@ -205,7 +205,7 @@ class SpecialChangePassword extends FormSpecialPage {
                $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()
                        );
index 726b8f0..4d12683 100644 (file)
@@ -1268,6 +1268,8 @@ If you choose to provide it, this will be used for giving the user attribution f
 # 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
@@ -1338,6 +1340,8 @@ Temporary password: $2',
 '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',
index 5ab76d2..8166aeb 100644 (file)
@@ -1558,7 +1558,7 @@ Parameters:
 * $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.
 
@@ -1576,7 +1576,8 @@ Parameters:
 
 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}}.
@@ -1617,7 +1618,26 @@ Parameters:
 '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}}',
@@ -1693,7 +1713,26 @@ Parameters:
 '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.
index 8b76a6b..d51cdd0 100644 (file)
@@ -581,6 +581,7 @@ $wgMessageStructure = array(
                'retypenew',
                'resetpass_submit',
                'changepassword-success',
+               'changepassword-throttled',
                'resetpass_forbidden',
                'resetpass-no-info',
                'resetpass-submit-loggedin',
@@ -621,6 +622,7 @@ $wgMessageStructure = array(
                'changeemail-password',
                'changeemail-submit',
                'changeemail-cancel',
+               'changeemail-throttled'
        ),
        'resettokens' => array(
                'resettokens',
index ea3133c..85364ee 100644 (file)
@@ -74,22 +74,10 @@ class UpdateMediaWiki extends Maintenance {
                $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 );
                }
        }
index c55c25c..5d2c271 100644 (file)
        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);
index a178e2b..820cd0a 100644 (file)
                        } )();
 
                        // 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' ) )
index b70066a..cb89a7b 100644 (file)
@@ -23,7 +23,7 @@ body {
        font-family: @content-font-family;
 }
 body {
-       background-color: #f6f6f6;
+       background-color: @menu-background-color;
        font-size: @body-font-size;
 }
 
@@ -33,11 +33,11 @@ div#content {
        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;
 }
index 4512efa..e2942d7 100644 (file)
 /* 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 {
index 43b9882..cadb61c 100644 (file)
@@ -12,7 +12,7 @@
                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);
diff --git a/skins/vector/images/page-fade.png b/skins/vector/images/page-fade.png
deleted file mode 100644 (file)
index b4a6034..0000000
Binary files a/skins/vector/images/page-fade.png and /dev/null differ
index f818401..c2d0b92 100644 (file)
@@ -3,6 +3,8 @@
 @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;