Index: trunk/phase3/includes/Export.php |
— | — | @@ -207,24 +207,8 @@ |
208 | 208 | $opts = array( 'ORDER BY' => 'page_id ASC' ); |
209 | 209 | $opts['USE INDEX'] = array(); |
210 | 210 | $join = array(); |
211 | | - # Latest revision dumps... |
212 | | - if( $this->history & WikiExporter::CURRENT ) { |
213 | | - if( $this->list_authors && $cond != '' ) { // List authors, if so desired |
214 | | - list($page,$revision) = $this->db->tableNamesN('page','revision'); |
215 | | - $this->do_list_authors( $page, $revision, $cond ); |
216 | | - } |
217 | | - $join['revision'] = array('INNER JOIN','page_id=rev_page AND page_latest=rev_id'); |
218 | | - # "Stable" revision dumps... |
219 | | - } elseif( $this->history & WikiExporter::STABLE ) { |
220 | | - # Default JOIN, to be overridden... |
221 | | - $join['revision'] = array('INNER JOIN','page_id=rev_page AND page_latest=rev_id'); |
222 | | - # One, and only one hook should set this, and return false |
223 | | - if( wfRunHooks( 'WikiExporter::dumpStableQuery', array(&$tables,&$opts,&$join) ) ) { |
224 | | - wfProfileOut( __METHOD__ ); |
225 | | - return new WikiError( __METHOD__." given invalid history dump type." ); |
226 | | - } |
227 | | - # Time offset/limit for all pages/history... |
228 | | - } elseif( is_array( $this->history ) ) { |
| 211 | + if( is_array( $this->history ) ) { |
| 212 | + # Time offset/limit for all pages/history... |
229 | 213 | $revJoin = 'page_id=rev_page'; |
230 | 214 | # Set time order |
231 | 215 | if( $this->history['dir'] == 'asc' ) { |
— | — | @@ -244,11 +228,27 @@ |
245 | 229 | if( !empty( $this->history['limit'] ) ) { |
246 | 230 | $opts['LIMIT'] = intval( $this->history['limit'] ); |
247 | 231 | } |
248 | | - # Full history dumps... |
249 | 232 | } elseif( $this->history & WikiExporter::FULL ) { |
| 233 | + # Full history dumps... |
250 | 234 | $join['revision'] = array('INNER JOIN','page_id=rev_page'); |
251 | | - # Uknown history specification parameter? |
| 235 | + } elseif( $this->history & WikiExporter::CURRENT ) { |
| 236 | + # Latest revision dumps... |
| 237 | + if( $this->list_authors && $cond != '' ) { // List authors, if so desired |
| 238 | + list($page,$revision) = $this->db->tableNamesN('page','revision'); |
| 239 | + $this->do_list_authors( $page, $revision, $cond ); |
| 240 | + } |
| 241 | + $join['revision'] = array('INNER JOIN','page_id=rev_page AND page_latest=rev_id'); |
| 242 | + } elseif( $this->history & WikiExporter::STABLE ) { |
| 243 | + # "Stable" revision dumps... |
| 244 | + # Default JOIN, to be overridden... |
| 245 | + $join['revision'] = array('INNER JOIN','page_id=rev_page AND page_latest=rev_id'); |
| 246 | + # One, and only one hook should set this, and return false |
| 247 | + if( wfRunHooks( 'WikiExporter::dumpStableQuery', array(&$tables,&$opts,&$join) ) ) { |
| 248 | + wfProfileOut( __METHOD__ ); |
| 249 | + return new WikiError( __METHOD__." given invalid history dump type." ); |
| 250 | + } |
252 | 251 | } else { |
| 252 | + # Uknown history specification parameter? |
253 | 253 | wfProfileOut( __METHOD__ ); |
254 | 254 | return new WikiError( __METHOD__." given invalid history dump type." ); |
255 | 255 | } |
Index: trunk/phase3/includes/specials/SpecialExport.php |
— | — | @@ -96,7 +96,7 @@ |
97 | 97 | if ( $this->curonly ) { |
98 | 98 | $history = WikiExporter::CURRENT; |
99 | 99 | } elseif ( !$historyCheck ) { |
100 | | - if ( $limit > 0 && $limit < $wgExportMaxHistory ) { |
| 100 | + if ( $limit > 0 && ($wgExportMaxHistory == 0 || $limit < $wgExportMaxHistory ) ) { |
101 | 101 | $history['limit'] = $limit; |
102 | 102 | } |
103 | 103 | if ( !is_null( $offset ) ) { |