Merge "Correct check whether the e-mail field was filled in Special:Userlogin/signup"
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index 245ce20..afc41bf 100644 (file)
@@ -138,7 +138,7 @@ class PageArchive {
                $res = $dbr->select( 'archive',
                        $fields,
                        array( 'ar_namespace' => $this->title->getNamespace(),
-                                  'ar_title' => $this->title->getDBkey() ),
+                               'ar_title' => $this->title->getDBkey() ),
                        __METHOD__,
                        array( 'ORDER BY' => 'ar_timestamp DESC' ) );
                $ret = $dbr->resultObject( $res );
@@ -156,27 +156,9 @@ class PageArchive {
        function listFiles() {
                if( $this->title->getNamespace() == NS_FILE ) {
                        $dbr = wfGetDB( DB_SLAVE );
-                       $res = $dbr->select( 'filearchive',
-                               array(
-                                       'fa_id',
-                                       'fa_name',
-                                       'fa_archive_name',
-                                       'fa_storage_key',
-                                       'fa_storage_group',
-                                       'fa_size',
-                                       'fa_width',
-                                       'fa_height',
-                                       'fa_bits',
-                                       'fa_metadata',
-                                       'fa_media_type',
-                                       'fa_major_mime',
-                                       'fa_minor_mime',
-                                       'fa_description',
-                                       'fa_user',
-                                       'fa_user_text',
-                                       'fa_timestamp',
-                                       'fa_deleted',
-                                       'fa_sha1' ),
+                       $res = $dbr->select(
+                               'filearchive',
+                               ArchivedFile::selectFields(),
                                array( 'fa_name' => $this->title->getDBkey() ),
                                __METHOD__,
                                array( 'ORDER BY' => 'fa_timestamp DESC' ) );
@@ -248,9 +230,9 @@ class PageArchive {
                $row = $dbr->selectRow( 'archive',
                        'ar_timestamp',
                        array( 'ar_namespace' => $this->title->getNamespace(),
-                                  'ar_title' => $this->title->getDBkey(),
-                                  'ar_timestamp < ' .
-                                               $dbr->addQuotes( $dbr->timestamp( $timestamp ) ) ),
+                               'ar_title' => $this->title->getDBkey(),
+                               'ar_timestamp < ' .
+                                       $dbr->addQuotes( $dbr->timestamp( $timestamp ) ) ),
                        __METHOD__,
                        array(
                                'ORDER BY' => 'ar_timestamp DESC',
@@ -319,7 +301,7 @@ class PageArchive {
                $row = $dbr->selectRow( 'archive',
                        array( 'ar_text', 'ar_flags', 'ar_text_id' ),
                        array( 'ar_namespace' => $this->title->getNamespace(),
-                                  'ar_title' => $this->title->getDBkey() ),
+                               'ar_title' => $this->title->getDBkey() ),
                        __METHOD__,
                        array( 'ORDER BY' => 'ar_timestamp DESC' ) );
                if( $row ) {
@@ -338,7 +320,7 @@ 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 );
@@ -457,7 +439,7 @@ class PageArchive {
                $page = $dbw->selectRow( 'page',
                        array( 'page_id', 'page_latest' ),
                        array( 'page_namespace' => $this->title->getNamespace(),
-                                  'page_title'     => $this->title->getDBkey() ),
+                               'page_title' => $this->title->getDBkey() ),
                        __METHOD__,
                        array( 'FOR UPDATE' ) // lock page
                );