Index: trunk/phase3/includes/specials/SpecialBlockip.php |
— | — | @@ -66,11 +66,7 @@ |
67 | 67 | $this->BlockWatchUser = $wgRequest->getBool( 'wpWatchUser', false ); |
68 | 68 | # Re-check user's rights to hide names, very serious, defaults to 0 |
69 | 69 | $this->BlockHideName = ( $wgRequest->getBool( 'wpHideName', 0 ) && $wgUser->isAllowed( 'hideuser' ) ) ? 1 : 0; |
70 | | - if($wgRequest->wasPosted()){ |
71 | | - $this->BlockAllowUsertalk = $wgRequest->getBool( 'wpAllowUsertalk', false ); |
72 | | - }else{ |
73 | | - $this->BlockAllowUsertalk = $wgBlockAllowsUTEdit; |
74 | | - } |
| 70 | + $this->BlockAllowUsertalk = ( $wgRequest->getBool( 'wpAllowUsertalk', $byDefault ) && $wgBlockAllowsUTEdit ); |
75 | 71 | } |
76 | 72 | |
77 | 73 | function showForm( $err ) { |
— | — | @@ -206,7 +202,7 @@ |
207 | 203 | </tr>" |
208 | 204 | ); |
209 | 205 | |
210 | | - global $wgSysopEmailBans; |
| 206 | + global $wgSysopEmailBans, $wgBlockAllowsUTEdit; |
211 | 207 | if ( $wgSysopEmailBans && $wgUser->isAllowed( 'blockemail' ) ) { |
212 | 208 | $wgOut->addHTML(" |
213 | 209 | <tr id='wpEnableEmailBan'> |
— | — | @@ -243,16 +239,20 @@ |
244 | 240 | 'wpWatchUser', 'wpWatchUser', $this->BlockWatchUser, |
245 | 241 | array( 'tabindex' => '11' ) ) . " |
246 | 242 | </td> |
247 | | - </tr> |
248 | | - <tr id='wpAllowUsertalkRow'> |
249 | | - <td> </td> |
250 | | - <td class='mw-input'>" . |
251 | | - Xml::checkLabel( wfMsg( 'ipballowusertalk' ), |
252 | | - 'wpAllowUsertalk', 'wpAllowUsertalk', $this->BlockAllowUsertalk, |
253 | | - array( 'tabindex' => '12' ) ) . " |
254 | | - </td> |
255 | 243 | </tr>" |
256 | 244 | ); |
| 245 | + if( $wgBlockAllowsUTEdit ){ |
| 246 | + $wgOut->addHTML(" |
| 247 | + <tr id='wpAllowUsertalkRow'> |
| 248 | + <td> </td> |
| 249 | + <td class='mw-input'>" . |
| 250 | + Xml::checkLabel( wfMsg( 'ipballowusertalk' ), |
| 251 | + 'wpAllowUsertalk', 'wpAllowUsertalk', $this->BlockAllowUsertalk, |
| 252 | + array( 'tabindex' => '12' ) ) . " |
| 253 | + </td> |
| 254 | + </tr>" |
| 255 | + ); |
| 256 | + } |
257 | 257 | |
258 | 258 | $wgOut->addHTML(" |
259 | 259 | <tr> |
— | — | @@ -455,6 +455,7 @@ |
456 | 456 | * @return array |
457 | 457 | */ |
458 | 458 | private function blockLogFlags() { |
| 459 | + global $wgBlockAllowsUTEdit; |
459 | 460 | $flags = array(); |
460 | 461 | if( $this->BlockAnonOnly && IP::isIPAddress( $this->BlockAddress ) ) |
461 | 462 | // when blocking a user the option 'anononly' is not available/has no effect -> do not write this into log |
— | — | @@ -465,7 +466,7 @@ |
466 | 467 | $flags[] = 'noautoblock'; |
467 | 468 | if ( $this->BlockEmail ) |
468 | 469 | $flags[] = 'noemail'; |
469 | | - if ( !$this->BlockAllowUsertalk ) |
| 470 | + if ( !$this->BlockAllowUsertalk && $wgBlockAllowsUTEdit ) |
470 | 471 | $flags[] = 'nousertalk'; |
471 | 472 | return implode( ',', $flags ); |
472 | 473 | } |