// 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'] ) ) {
/**
* 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)
*/
* @param array $existing
* @return array
*/
- function getPropertyDeletions( $existing ) {
+ private function getPropertyDeletions( $existing ) {
return array_diff_assoc( $existing, $this->mProperties );
}
protected function getFormFields() {
global $wgBlockAllowsUTEdit;
+ $this->getOutput()->enableOOUI();
+
$user = $this->getUser();
$suggestedDurations = self::getSuggestedDurations();
'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',
];
"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",
"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.",