(bug 39680) Convert valign to CSS vertical-align
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index 611b3b9..39a8a39 100644 (file)
@@ -92,7 +92,7 @@ class PageArchive {
                                array(
                                        'ar_namespace',
                                        'ar_title',
-                                       'COUNT(*) AS count'
+                                       'count' => 'COUNT(*)'
                                ),
                                $condition,
                                __METHOD__,
@@ -120,7 +120,7 @@ class PageArchive {
                        ),
                        array( 'ar_namespace' => $this->title->getNamespace(),
                                   'ar_title' => $this->title->getDBkey() ),
-                       'PageArchive::listRevisions',
+                       __METHOD__,
                        array( 'ORDER BY' => 'ar_timestamp DESC' ) );
                $ret = $dbr->resultObject( $res );
                return $ret;
@@ -308,7 +308,9 @@ class PageArchive {
                $dbr = wfGetDB( DB_SLAVE );
                $n = $dbr->selectField( 'archive', 'COUNT(ar_title)',
                        array( 'ar_namespace' => $this->title->getNamespace(),
-                                  'ar_title' => $this->title->getDBkey() ) );
+                                  'ar_title' => $this->title->getDBkey() ),
+                       __METHOD__
+               );
                return ( $n > 0 );
        }
 
@@ -359,22 +361,21 @@ class PageArchive {
                // Touch the log!
 
                if( $textRestored && $filesRestored ) {
-                       $reason = wfMsgExt( 'undeletedrevisions-files', array( 'content', 'parsemag' ),
-                               $wgContLang->formatNum( $textRestored ),
-                               $wgContLang->formatNum( $filesRestored ) );
+                       $reason = wfMessage( 'undeletedrevisions-files' )
+                               ->numParams( $textRestored, $filesRestored )->inContentLanguage()->text();
                } elseif( $textRestored ) {
-                       $reason = wfMsgExt( 'undeletedrevisions', array( 'content', 'parsemag' ),
-                               $wgContLang->formatNum( $textRestored ) );
+                       $reason = wfMessage( 'undeletedrevisions' )->numParams( $textRestored )
+                               ->inContentLanguage()->text();
                } elseif( $filesRestored ) {
-                       $reason = wfMsgExt( 'undeletedfiles', array( 'content', 'parsemag' ),
-                               $wgContLang->formatNum( $filesRestored ) );
+                       $reason = wfMessage( 'undeletedfiles' )->numParams( $filesRestored )
+                               ->inContentLanguage()->text();
                } else {
                        wfDebug( "Undelete: nothing undeleted...\n" );
                        return false;
                }
 
                if( trim( $comment ) != '' ) {
-                       $reason .= wfMsgForContent( 'colon-separator' ) . $comment;
+                       $reason .= wfMessage( 'colon-separator' )->inContentLanguage()->text() . $comment;
                }
 
                if ( $user === null ) {
@@ -913,10 +914,10 @@ class SpecialUndelete extends SpecialPage {
                        "<col class='diff-marker' />" .
                        "<col class='diff-content' />" .
                        "<tr>" .
-                               "<td colspan='2' width='50%' align='center' class='diff-otitle'>" .
+                               "<td colspan='2' width='50%' style='text-align: center' class='diff-otitle'>" .
                                $this->diffHeader( $previousRev, 'o' ) .
                                "</td>\n" .
-                               "<td colspan='2' width='50%' align='center' class='diff-ntitle'>" .
+                               "<td colspan='2' width='50%' style='text-align: center' class='diff-ntitle'>" .
                                $this->diffHeader( $currentRev, 'n' ) .
                                "</td>\n" .
                        "</tr>" .
@@ -1083,11 +1084,13 @@ class SpecialUndelete extends SpecialPage {
                }
 
                # Show relevant lines from the deletion log:
-               $out->addHTML( Xml::element( 'h2', null, LogPage::logName( 'delete' ) ) . "\n" );
+               $deleteLogPage = new LogPage( 'delete' );
+               $out->addHTML( Xml::element( 'h2', null, $deleteLogPage->getName()->text() ) . "\n" );
                LogEventsList::showLogExtract( $out, 'delete', $this->mTargetObj );
                # Show relevant lines from the suppression log:
+               $suppressLogPage = new LogPage( 'suppress' );
                if( $this->getUser()->isAllowed( 'suppressionlog' ) ) {
-                       $out->addHTML( Xml::element( 'h2', null, LogPage::logName( 'suppress' ) ) . "\n" );
+                       $out->addHTML( Xml::element( 'h2', null, $suppressLogPage->getName()->text() ) . "\n" );
                        LogEventsList::showLogExtract( $out, 'suppress', $this->mTargetObj );
                }