+ } elseif ( $this->history & WikiExporter::FULL ) {
+ # Full history dumps...
+ $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page' );
+ } elseif ( $this->history & WikiExporter::CURRENT ) {
+ # Latest revision dumps...
+ if ( $this->list_authors && $cond != '' ) { // List authors, if so desired
+ $this->do_list_authors( $cond );
+ }
+ $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' );
+ } elseif ( $this->history & WikiExporter::STABLE ) {
+ # "Stable" revision dumps...
+ # Default JOIN, to be overridden...
+ $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' );
+ # One, and only one hook should set this, and return false
+ if ( wfRunHooks( 'WikiExporter::dumpStableQuery', array( &$tables, &$opts, &$join ) ) ) {
+ wfProfileOut( __METHOD__ );
+ throw new MWException( __METHOD__ . " given invalid history dump type." );
+ }
+ } elseif ( $this->history & WikiExporter::RANGE ) {
+ # Dump of revisions within a specified range
+ $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page' );
+ $opts['ORDER BY'] = 'rev_page ASC, rev_id ASC';