Fix for r45862, handle indefinite blocks correctly (and use a less anglo-centric...
authorAlex Z <mrzman@users.mediawiki.org>
Wed, 21 Jan 2009 03:50:08 +0000 (03:50 +0000)
committerAlex Z <mrzman@users.mediawiki.org>
Wed, 21 Jan 2009 03:50:08 +0000 (03:50 +0000)
includes/specials/SpecialBlockip.php

index 3c305ad..a83f535 100644 (file)
@@ -113,7 +113,11 @@ class IPBlockForm {
                                        $this->BlockEmail = $currentBlock->mBlockEmail;
                                        $this->BlockHideName = $currentBlock->mHideName;
                                        $this->BlockAllowUsertalk = $currentBlock->mAllowUsertalk;
-                                       $this->BlockOther = wfTimestamp( TS_RFC2822, $currentBlock->mExpiry );
+                                       if( $currentBlock->mExpiry == 'infinity' ) {
+                                               $this->BlockOther = 'indefinite';
+                                       } else {
+                                               $this->BlockOther = wfTimestamp( TS_ISO_8601, $currentBlock->mExpiry );
+                                       }
                                        $this->BlockReason = $currentBlock->mReason;
                        }
                }