Add largest allowed range as parameter to block form message
[lhc/web/wiklou.git] / includes / specials / SpecialBlock.php
index e0f35c6..b7f5e49 100644 (file)
@@ -321,7 +321,8 @@ class SpecialBlock extends FormSpecialPage {
        protected function preText() {
                $this->getOutput()->addModules( array( 'mediawiki.special.block', 'mediawiki.userSuggest' ) );
 
-               $text = $this->msg( 'blockiptext' )->parse();
+               $blockCIDRLimit = $this->getConfig()->get( 'BlockCIDRLimit' );
+               $text = $this->msg( 'blockiptext', $blockCIDRLimit['IPv4'], $blockCIDRLimit['IPv6'] )->parse();
 
                $otherBlockMessages = array();
                if ( $this->target !== null ) {
@@ -361,6 +362,8 @@ class SpecialBlock extends FormSpecialPage {
        protected function postText() {
                $links = array();
 
+               $this->getOutput()->addModuleStyles( 'mediawiki.special' );
+
                # Link to the user's contributions, if applicable
                if ( $this->target instanceof User ) {
                        $contribsPage = SpecialPage::getTitleFor( 'Contributions', $this->target->getName() );
@@ -662,8 +665,8 @@ class SpecialBlock extends FormSpecialPage {
                if ( $data['HideUser'] ) {
                        if ( !$performer->isAllowed( 'hideuser' ) ) {
                                # this codepath is unreachable except by a malicious user spoofing forms,
-                               # or by race conditions (user has oversight and sysop, loads block form,
-                               # and is de-oversighted before submission); so need to fail completely
+                               # or by race conditions (user has hideuser and block rights, loads block form,
+                               # and loses hideuser rights before submission); so need to fail completely
                                # rather than just silently disable hiding
                                return array( 'badaccess-group0' );
                        }
@@ -787,7 +790,7 @@ class SpecialBlock extends FormSpecialPage {
                $logParams['5::duration'] = $data['Expiry'];
                $logParams['6::flags'] = self::blockLogFlags( $data, $type );
 
-               # Make log entry, if the name is hidden, put it in the oversight log
+               # Make log entry, if the name is hidden, put it in the suppression log
                $log_type = $data['HideUser'] ? 'suppress' : 'block';
                $logEntry = new ManualLogEntry( $log_type, $logaction );
                $logEntry->setTarget( Title::makeTitle( NS_USER, $target ) );