&& $this->mHideName == $block->mHideName
&& $this->mBlockEmail == $block->mBlockEmail
&& $this->mAllowUsertalk == $block->mAllowUsertalk
+ && $this->mReason == $block->mReason
);
}
# Unset ipb_enable_autoblock for IP blocks, makes no sense
if ( !$this->mUser ) {
$this->mEnableAutoblock = 0;
- $this->mBlockEmail = 0; //Same goes for email...
+
+ }
+ # bug 18860: non-anon-only IP blocks should be allowed to block email
+ if ( !$this->mUser && $this->mAnonOnly ) {
+ $this->mBlockEmail = 0;
}
-
if( !$this->mByName ) {
if( $this->mBy ) {
$this->mByName = User::whoIs( $this->mBy );
* Convert a DB-encoded expiry into a real string that humans can read.
*
* @param $encoded_expiry String: Database encoded expiry time
- * @return String
+ * @return Html-escaped String
*/
public static function formatExpiry( $encoded_expiry ) {
static $msg = null;
$expirystr = $msg['infiniteblock'];
} else {
global $wgLang;
- $expiretimestr = $wgLang->timeanddate( $expiry, true );
- $expirystr = wfMsgReplaceArgs( $msg['expiringblock'], array($expiretimestr) );
+ $expiredatestr = htmlspecialchars($wgLang->date( $expiry, true ));
+ $expiretimestr = htmlspecialchars($wgLang->time( $expiry, true ));
+ $expirystr = wfMsgReplaceArgs( $msg['expiringblock'], array( $expiredatestr, $expiretimestr ) );
}
return $expirystr;
}