Alrighty, now we properly remove old blocks before inserting the new one. (Bug 10080...
[lhc/web/wiklou.git] / includes / SpecialIpblocklist.php
index d6807d2..696c7ef 100644 (file)
@@ -249,7 +249,7 @@ class IPUnblockForm {
                        $conds['ipb_auto'] = 0;
                } else {
                        $user = User::newFromName( $this->ip );
-                       if ( $user && ( $id = $user->getID() ) != 0 ) {
+                       if ( $user && ( $id = $user->getId() ) != 0 ) {
                                $conds['ipb_user'] = $id;
                        } else {
                                // Uh...?
@@ -327,12 +327,7 @@ class IPUnblockForm {
                $formattedTime = $wgLang->timeanddate( $block->mTimestamp, true );
 
                $properties = array();
-               if ( $block->mExpiry === "" || $block->mExpiry === Block::infinity() ) {
-                       $properties[] = $msg['infiniteblock'];
-               } else {
-                       $properties[] = wfMsgReplaceArgs( $msg['expiringblock'],
-                               array( $wgLang->timeanddate( $block->mExpiry, true ) ) );
-               }
+               $properties[] = Block::formatExpiry( $block->mExpiry );
                if ( $block->mAnonOnly ) {
                        $properties[] = $msg['anononlyblock'];
                }