X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUndelete.php;h=afc41bf451583d37eff3ad4c741812fde772aecd;hb=82f2fcfb125a091cf97ead05bb0e7c485c559ec5;hp=1ea6e463e4d78fee5b857af1b576903946399244;hpb=b5f6fcb087098ac6f5e2f80c0e84b790bc44da16;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 1ea6e463e4..afc41bf451 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -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 ); @@ -474,7 +456,7 @@ class PageArchive { __METHOD__ ); if( $previousTimestamp === false ) { - wfDebug( __METHOD__.": existing page refers to a page_latest that does not exist\n" ); + wfDebug( __METHOD__ . ": existing page refers to a page_latest that does not exist\n" ); $status = Status::newGood( 0 ); $status->warning( 'undeleterevision-missing' ); @@ -512,7 +494,8 @@ class PageArchive { 'ar_deleted', 'ar_page_id', 'ar_len', - 'ar_sha1'); + 'ar_sha1' + ); if ( $wgContentHandlerUseDB ) { $fields[] = 'ar_content_format'; @@ -1075,10 +1058,10 @@ class SpecialUndelete extends SpecialPage { $targetQuery ) . '' . - '