Merge "mw.Upload.Dialog: Make the dialog higher (600px)"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 14 Dec 2015 20:21:01 +0000 (20:21 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 14 Dec 2015 20:21:01 +0000 (20:21 +0000)
includes/Preferences.php
includes/WebStart.php
includes/specials/SpecialChangeEmail.php
languages/i18n/en.json
languages/i18n/qqq.json
maintenance/convertExtensionToRegistration.php
resources/Resources.php
resources/src/mediawiki.special/mediawiki.special.changeemail.css [deleted file]
resources/src/mediawiki.special/mediawiki.special.changeemail.js [deleted file]
resources/src/mediawiki.special/mediawiki.special.preferences.styles.css
tests/phpunit/includes/PreferencesTest.php

index c7ab9cd..327d19a 100644 (file)
@@ -508,7 +508,6 @@ class Preferences {
                                                # Apply the same CSS class used on the input to the message:
                                                'cssclass' => $emailauthenticationclass,
                                        );
-                                       $defaultPreferences['emailaddress']['cssclass'] = $emailauthenticationclass;
                                }
                        }
 
index 82d3955..c5e7457 100644 (file)
@@ -103,8 +103,11 @@ if ( is_readable( "$IP/vendor/autoload.php" ) ) {
        require_once "$IP/vendor/autoload.php";
 }
 
-# assert that composer dependencies were successfully loaded
-if ( !interface_exists( '\Psr\Log\LoggerInterface' ) ) {
+# Assert that composer dependencies were successfully loaded
+# Purposely no leading \ due to it breaking HHVM RepoAuthorative mode
+# PHP works fine with both versions
+# See https://github.com/facebook/hhvm/issues/5833
+if ( !interface_exists( 'Psr\Log\LoggerInterface' ) ) {
        $message = (
                'MediaWiki requires the <a href="https://github.com/php-fig/log">PSR-3 logging ' .
                "library</a> to be present. This library is not embedded directly in MediaWiki's " .
index 361b7b1..51b08f9 100644 (file)
@@ -52,7 +52,6 @@ class SpecialChangeEmail extends FormSpecialPage {
        function execute( $par ) {
                $out = $this->getOutput();
                $out->disallowUserJs();
-               $out->addModules( 'mediawiki.special.changeemail' );
 
                parent::execute( $par );
        }
index 38347bf..62405c8 100644 (file)
        "prefs-help-prefershttps": "This preference will take effect on your next login.",
        "prefswarning-warning": "You've made changes to your preferences that have not been saved yet.\nIf you leave this page without clicking \"$1\" your preferences will not be updated.",
        "prefs-tabs-navigation-hint": "Tip: You can use the left and right arrow keys to navigate between the tabs in the tabs list.",
-       "email-address-validity-valid": "Email address appears valid",
-       "email-address-validity-invalid": "Enter a valid email address",
        "userrights": "User rights management",
        "userrights-summary": "",
        "userrights-lookup-user": "Manage user groups",
index 061b248..837c75f 100644 (file)
        "prefs-help-prefershttps": "Used as help text for the checkbox in [[Special:Preferences]].\n\nThe checkbox has the label {{msg-mw|Tog-prefershttps}}.\n\nSee example: [[mw:Special:Preferences]].",
        "prefswarning-warning": "Warning shown (except in Firefox) when attempting to leave [[Special:Preferences]] with unsaved changes.\n\nParameters:\n* $1 - Text of {{msg-mw|saveprefs}}, as <nowiki>{{int:saveprefs}}</nowiki> cannot be used directly.",
        "prefs-tabs-navigation-hint": "Hint message that explains the arrow key navigation for the tabs on [[Special:Preferences]] to screenreader users.",
-       "email-address-validity-valid": "Used as hint for {{msg-mw|changeemail-newemail}} field in [[Special:ChangeEmail]], when the provided E-mail address is valid.",
-       "email-address-validity-invalid": "Used as warning for {{msg-mw|changeemail-newemail}} field in [[Special:ChangeEmail]], when the provided E-mail address is invalid.",
        "userrights": "Page title of [[Special:UserRights]].",
        "userrights-summary": "{{doc-specialpagesummary|userrights}}",
        "userrights-lookup-user": "Label text when managing user rights ([[Special:UserRights]])",
index 828507b..608605c 100644 (file)
@@ -41,12 +41,12 @@ class ConvertExtensionToRegistration extends Maintenance {
         */
        protected $promote = array(
                'name',
+               'namemsg',
                'version',
                'author',
                'url',
                'description',
                'descriptionmsg',
-               'namemsg',
                'license-name',
                'type',
        );
index d7320f5..3d5a563 100644 (file)
@@ -1662,15 +1662,6 @@ return array(
                'styles' => 'resources/src/mediawiki.special/mediawiki.special.block.css',
                'dependencies' => 'mediawiki.util',
        ),
-       'mediawiki.special.changeemail' => array(
-               'scripts' => 'resources/src/mediawiki.special/mediawiki.special.changeemail.js',
-               'styles' => 'resources/src/mediawiki.special/mediawiki.special.changeemail.css',
-               'dependencies' => 'mediawiki.util',
-               'messages' => array(
-                       'email-address-validity-valid',
-                       'email-address-validity-invalid',
-               ),
-       ),
        'mediawiki.special.changeslist' => array(
                'position' => 'top',
                'styles' => 'resources/src/mediawiki.special/mediawiki.special.changeslist.css',
diff --git a/resources/src/mediawiki.special/mediawiki.special.changeemail.css b/resources/src/mediawiki.special/mediawiki.special.changeemail.css
deleted file mode 100644 (file)
index 92983df..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#mw-emailaddress-validity {
-       padding: 2px 1em;
-}
-#mw-emailaddress-validity {
-       border-bottom-right-radius: 0.8em;
-       border-top-right-radius: 0.8em;
-}
-
-/* Colors also used in mediawiki.special.preferences.css */
-#mw-emailaddress-validity.valid {
-       border: 1px solid #80FF80;
-       background-color: #C0FFC0;
-       color: black;
-}
-#mw-emailaddress-validity.invalid {
-       border: 1px solid #FF8080;
-       background-color: #FFC0C0;
-       color: black;
-}
diff --git a/resources/src/mediawiki.special/mediawiki.special.changeemail.js b/resources/src/mediawiki.special/mediawiki.special.changeemail.js
deleted file mode 100644 (file)
index 06851b9..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*!
- * JavaScript for Special:ChangeEmail
- */
-( function ( mw, $ ) {
-       /**
-        * Given an email validity status (true, false, null) update the label CSS class
-        *
-        * @ignore
-        */
-       function updateMailValidityLabel( mail ) {
-               var isValid = mw.util.validateEmail( mail ),
-                       $label = $( '#mw-emailaddress-validity' );
-
-               // Set up the validity notice if it doesn't already exist
-               if ( $label.length === 0 ) {
-                       $label = $( '<label for="wpNewEmail" id="mw-emailaddress-validity"></label>' )
-                               .insertAfter( '#wpNewEmail' );
-               }
-
-               // We allow empty address
-               if ( isValid === null ) {
-                       $label.text( '' ).removeClass( 'valid invalid' );
-
-               // Valid
-               } else if ( isValid ) {
-                       $label.text( mw.msg( 'email-address-validity-valid' ) ).addClass( 'valid' ).removeClass( 'invalid' );
-
-               // Not valid
-               } else {
-                       $label.text( mw.msg( 'email-address-validity-invalid' ) ).addClass( 'invalid' ).removeClass( 'valid' );
-               }
-       }
-
-       $( function () {
-               $( '#wpNewEmail' )
-                       // Lame tip to let user know if its email is valid. See bug 22449.
-                       // Only bind once for 'blur' so that the user can fill it in without errors;
-                       // after that, look at every keypress for immediate feedback.
-                       .one( 'blur', function () {
-                               var $this = $( this );
-                               updateMailValidityLabel( $this.val() );
-                               $this.keyup( function () {
-                                       updateMailValidityLabel( $this.val() );
-                               } );
-                       } )
-                       // Supress built-in validation notice and just call updateMailValidityLabel(),
-                       // to avoid double notice. See bug 40909.
-                       .on( 'invalid', function ( e ) {
-                               e.preventDefault();
-                               updateMailValidityLabel( $( this ).val() );
-                       } );
-       } );
-}( mediaWiki, jQuery ) );
index 5b76712..4a797a6 100644 (file)
@@ -1,9 +1,9 @@
-/* Reuses colors from mediawiki.special.changeemail.css */
+/* Reuses colors from mediawiki.legacy/shared.css */
 .mw-email-not-authenticated .mw-input,
 .mw-email-none .mw-input{
-       border: 1px solid #FF8080;
-       background-color: #FFC0C0;
-       color: black;
+       border: 1px solid #fde29b;
+       background-color: #fdf1d1;
+       color: #000000;
 }
 /* Authenticated email field has its own class too. Unstyled by default */
 /*
index 5841bb6..fe431b6 100644 (file)
@@ -45,36 +45,36 @@ class PreferencesTest extends MediaWikiTestCase {
         * Placeholder to verify bug 34302
         * @covers Preferences::profilePreferences
         */
-       public function testEmailFieldsWhenUserHasNoEmail() {
+       public function testEmailAuthenticationFieldWhenUserHasNoEmail() {
                $prefs = $this->prefsFor( 'noemail' );
                $this->assertArrayHasKey( 'cssclass',
-                       $prefs['emailaddress']
+                       $prefs['emailauthentication']
                );
-               $this->assertEquals( 'mw-email-none', $prefs['emailaddress']['cssclass'] );
+               $this->assertEquals( 'mw-email-none', $prefs['emailauthentication']['cssclass'] );
        }
 
        /**
         * Placeholder to verify bug 34302
         * @covers Preferences::profilePreferences
         */
-       public function testEmailFieldsWhenUserEmailNotAuthenticated() {
+       public function testEmailAuthenticationFieldWhenUserEmailNotAuthenticated() {
                $prefs = $this->prefsFor( 'notauth' );
                $this->assertArrayHasKey( 'cssclass',
-                       $prefs['emailaddress']
+                       $prefs['emailauthentication']
                );
-               $this->assertEquals( 'mw-email-not-authenticated', $prefs['emailaddress']['cssclass'] );
+               $this->assertEquals( 'mw-email-not-authenticated', $prefs['emailauthentication']['cssclass'] );
        }
 
        /**
         * Placeholder to verify bug 34302
         * @covers Preferences::profilePreferences
         */
-       public function testEmailFieldsWhenUserEmailIsAuthenticated() {
+       public function testEmailAuthenticationFieldWhenUserEmailIsAuthenticated() {
                $prefs = $this->prefsFor( 'auth' );
                $this->assertArrayHasKey( 'cssclass',
-                       $prefs['emailaddress']
+                       $prefs['emailauthentication']
                );
-               $this->assertEquals( 'mw-email-authenticated', $prefs['emailaddress']['cssclass'] );
+               $this->assertEquals( 'mw-email-authenticated', $prefs['emailauthentication']['cssclass'] );
        }
 
        /** Helper */