Merge "SI standards for time units"
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index 1ef1124..4c38a78 100644 (file)
@@ -121,7 +121,7 @@ class PageArchive {
         * @return ResultWrapper
         */
        function listRevisions() {
-               global $wgContentHandlerNoDB;
+               global $wgContentHandlerUseDB;
 
                $dbr = wfGetDB( DB_SLAVE );
 
@@ -130,7 +130,7 @@ class PageArchive {
                        'ar_comment', 'ar_len', 'ar_deleted', 'ar_rev_id', 'ar_sha1',
                );
 
-               if ( !$wgContentHandlerNoDB ) {
+               if ( $wgContentHandlerUseDB ) {
                        $fields[] = 'ar_content_format';
                        $fields[] = 'ar_content_model';
                }
@@ -175,7 +175,8 @@ class PageArchive {
                                        'fa_user',
                                        'fa_user_text',
                                        'fa_timestamp',
-                                       'fa_deleted' ),
+                                       'fa_deleted',
+                                       'fa_sha1' ),
                                array( 'fa_name' => $this->title->getDBkey() ),
                                __METHOD__,
                                array( 'ORDER BY' => 'fa_timestamp DESC' ) );
@@ -193,7 +194,7 @@ class PageArchive {
         * @return Revision
         */
        function getRevision( $timestamp ) {
-               global $wgContentHandlerNoDB;
+               global $wgContentHandlerUseDB;
 
                $dbr = wfGetDB( DB_SLAVE );
 
@@ -212,7 +213,7 @@ class PageArchive {
                        'ar_sha1',
                );
 
-               if ( !$wgContentHandlerNoDB ) {
+               if ( $wgContentHandlerUseDB ) {
                        $fields[] = 'ar_content_format';
                        $fields[] = 'ar_content_model';
                }
@@ -358,8 +359,6 @@ class PageArchive {
         * on success, false on failure
         */
        function undelete( $timestamps, $comment = '', $fileVersions = array(), $unsuppress = false, User $user = null ) {
-               global $wgUser;
-
                // If both the set of text revisions and file revisions are empty,
                // restore everything. Otherwise, just restore the requested items.
                $restoreAll = empty( $timestamps ) && empty( $fileVersions );
@@ -410,6 +409,7 @@ class PageArchive {
                }
 
                if ( $user === null ) {
+                       global $wgUser;
                        $user = $wgUser;
                }
 
@@ -435,7 +435,7 @@ class PageArchive {
         * @return Status, containing the number of revisions restored on success
         */
        private function undeleteRevisions( $timestamps, $unsuppress = false, $comment = '' ) {
-               global $wgContentHandlerNoDB;
+               global $wgContentHandlerUseDB;
 
                if ( wfReadOnly() ) {
                        throw new ReadOnlyError();
@@ -510,7 +510,7 @@ class PageArchive {
                        'ar_len',
                        'ar_sha1');
 
-               if ( !$wgContentHandlerNoDB ) {
+               if ( $wgContentHandlerUseDB ) {
                        $fields[] = 'ar_content_format';
                        $fields[] = 'ar_content_model';
                }
@@ -1008,16 +1008,16 @@ class SpecialUndelete extends SpecialPage {
                $diffEngine->showDiffStyle();
                $this->getOutput()->addHTML(
                        "<div>" .
-                       "<table width='98%' cellpadding='0' cellspacing='4' class='diff'>" .
+                       "<table style='width: 98%;' cellpadding='0' cellspacing='4' class='diff'>" .
                        "<col class='diff-marker' />" .
                        "<col class='diff-content' />" .
                        "<col class='diff-marker' />" .
                        "<col class='diff-content' />" .
                        "<tr>" .
-                               "<td colspan='2' width='50%' style='text-align: center' class='diff-otitle'>" .
+                               "<td colspan='2' style='width: 50%; text-align: center' class='diff-otitle'>" .
                                $this->diffHeader( $previousRev, 'o' ) .
                                "</td>\n" .
-                               "<td colspan='2' width='50%' style='text-align: center' class='diff-ntitle'>" .
+                               "<td colspan='2' style='width: 50%;  text-align: center' class='diff-ntitle'>" .
                                $this->diffHeader( $currentRev, 'n' ) .
                                "</td>\n" .
                        "</tr>" .