MediaWiki  REL1_24
RevDelArchiveList.php
Go to the documentation of this file.
00001 <?php
00025 class RevDelArchiveList extends RevDelRevisionList {
00026     public function getType() {
00027         return 'archive';
00028     }
00029 
00030     public static function getRelationType() {
00031         return 'ar_timestamp';
00032     }
00033 
00038     public function doQuery( $db ) {
00039         $timestamps = array();
00040         foreach ( $this->ids as $id ) {
00041             $timestamps[] = $db->timestamp( $id );
00042         }
00043 
00044         return $db->select( 'archive', Revision::selectArchiveFields(),
00045                 array(
00046                     'ar_namespace' => $this->title->getNamespace(),
00047                     'ar_title' => $this->title->getDBkey(),
00048                     'ar_timestamp' => $timestamps
00049                 ),
00050                 __METHOD__,
00051                 array( 'ORDER BY' => 'ar_timestamp DESC' )
00052             );
00053     }
00054 
00055     public function newItem( $row ) {
00056         return new RevDelArchiveItem( $this, $row );
00057     }
00058 
00059     public function doPreCommitUpdates() {
00060         return Status::newGood();
00061     }
00062 
00063     public function doPostCommitUpdates() {
00064         return Status::newGood();
00065     }
00066 }