Mass conversion to NamespaceInfo
[lhc/web/wiklou.git] / includes / specials / SpecialDeletedContributions.php
index 6022ff4..73b438c 100644 (file)
@@ -46,8 +46,6 @@ class DeletedContributionsPage extends SpecialPage {
                $this->outputHeader();
                $this->checkPermissions();
 
-               $user = $this->getUser();
-
                $out = $this->getOutput();
                $out->setPageTitle( $this->msg( 'deletedcontributions-title' ) );
 
@@ -101,8 +99,7 @@ class DeletedContributionsPage extends SpecialPage {
                }
 
                # Show a message about replica DB lag, if applicable
-               $lb = MediaWikiServices::getInstance()->getDBLoadBalancer();
-               $lag = $lb->safeGetLag( $pager->getDatabase() );
+               $lag = $pager->getDatabase()->getSessionLagStatus()['lag'];
                if ( $lag > 0 ) {
                        $out->showLagWarning( $lag );
                }
@@ -165,7 +162,8 @@ class DeletedContributionsPage extends SpecialPage {
                        $block = Block::newFromTarget( $userObj, $userObj );
                        if ( !is_null( $block ) && $block->getType() != Block::TYPE_AUTO ) {
                                if ( $block->getType() == Block::TYPE_RANGE ) {
-                                       $nt = MWNamespace::getCanonicalName( NS_USER ) . ':' . $block->getTarget();
+                                       $nt = MediaWikiServices::getInstance()->getNamespaceInfo()->
+                                               getCanonicalName( NS_USER ) . ':' . $block->getTarget();
                                }
 
                                // LogEventsList::showLogExtract() wants the first parameter by ref