Merge "resourceloader: Use local var for getConfig() calls in StartUpModule"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 6 Mar 2019 18:13:59 +0000 (18:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 6 Mar 2019 18:13:59 +0000 (18:13 +0000)
includes/HeaderCallback.php
includes/deferred/DeferredUpdates.php
includes/deferred/LinksUpdate.php
includes/specials/SpecialBlock.php
languages/i18n/en.json
languages/i18n/qqq.json

index b2ca673..650a3a8 100644 (file)
@@ -22,8 +22,12 @@ class HeaderCallback {
                // Prevent caching of responses with cookies (T127993)
                $headers = [];
                foreach ( headers_list() as $header ) {
-                       list( $name, $value ) = explode( ':', $header, 2 );
-                       $headers[strtolower( trim( $name ) )][] = trim( $value );
+                       $header = explode( ':', $header, 2 );
+
+                       // Note: The code below (currently) does not care about value-less headers
+                       if ( isset( $header[1] ) ) {
+                               $headers[ strtolower( trim( $header[0] ) ) ][] = trim( $header[1] );
+                       }
                }
 
                if ( isset( $headers['set-cookie'] ) ) {
index b97bd21..67b5490 100644 (file)
@@ -124,6 +124,9 @@ class DeferredUpdates {
        /**
         * Do any deferred updates and clear the list
         *
+        * If $stage is self::ALL then the queue of PRESEND updates will be resolved,
+        * followed by the queue of POSTSEND updates
+        *
         * @param string $mode Use "enqueue" to use the job queue when possible [Default: "run"]
         * @param int $stage DeferredUpdates constant (PRESEND, POSTSEND, or ALL) (since 1.27)
         */
index 7c7cabd..7a31e26 100644 (file)
@@ -832,7 +832,7 @@ class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
         * @param array $existing
         * @return array
         */
-       function getPropertyDeletions( $existing ) {
+       private function getPropertyDeletions( $existing ) {
                return array_diff_assoc( $existing, $this->mProperties );
        }
 
index a816edc..7330e77 100644 (file)
@@ -143,6 +143,8 @@ class SpecialBlock extends FormSpecialPage {
        protected function getFormFields() {
                global $wgBlockAllowsUTEdit;
 
+               $this->getOutput()->enableOOUI();
+
                $user = $this->getUser();
 
                $suggestedDurations = self::getSuggestedDurations();
@@ -177,8 +179,16 @@ class SpecialBlock extends FormSpecialPage {
                                'type' => 'radio',
                                'cssclass' => 'mw-block-editing-restriction',
                                'options' => [
-                                       $this->msg( 'ipb-sitewide' )->escaped() => 'sitewide',
-                                       $this->msg( 'ipb-partial' )->escaped() => 'partial',
+                                       $this->msg( 'ipb-sitewide' )->escaped() .
+                                               new \OOUI\LabelWidget( [
+                                                       'classes' => [ 'oo-ui-inline-help' ],
+                                                       'label' => $this->msg( 'ipb-sitewide-help' )->text(),
+                                               ] ) => 'sitewide',
+                                       $this->msg( 'ipb-partial' )->escaped() .
+                                               new \OOUI\LabelWidget( [
+                                                       'classes' => [ 'oo-ui-inline-help' ],
+                                                       'label' => $this->msg( 'ipb-partial-help' )->text(),
+                                               ] ) => 'partial',
                                ],
                                'section' => 'actions',
                        ];
index 68fce22..54ce65e 100644 (file)
        "ipb-confirm": "Confirm block",
        "ipb-sitewide": "Sitewide",
        "ipb-partial": "Partial",
+       "ipb-sitewide-help": "Every page on the wiki and all other contribution actions.",
+       "ipb-partial-help": "Specific pages or namespaces.",
        "ipb-pages-label": "Pages",
        "ipb-namespaces-label": "Namespaces",
        "badipaddress": "Invalid IP address",
index 7807d55..383857e 100644 (file)
        "ipb-confirm": "Used as hidden field in the form on [[Special:Block]].",
        "ipb-sitewide": "A type of block the user can select from on [[Special:Block]].",
        "ipb-partial": "A type of block the user can select from on [[Special:Block]].",
+       "ipb-sitewide-help": "Help text describing the effects of a sitewide block on [[Special:Block]]",
+       "ipb-partial-help": "Help text describing the effects of a partial block on  [[Special:Block]]",
        "ipb-pages-label": "The label for an autocomplete text field to specify pages to block a user from editing on [[Special:Block]].",
        "ipb-namespaces-label": "The label for an autocomplete text field to specify namespaces to block a user from editing on [[Special:Block]].",
        "badipaddress": "An error message shown when one entered an invalid IP address in blocking page.",