Index: trunk/phase3/includes/filerepo/LocalFile.php |
— | — | @@ -624,18 +624,18 @@ |
625 | 625 | /** purgeDescription inherited */ |
626 | 626 | /** purgeEverything inherited */ |
627 | 627 | |
628 | | - function getHistory($limit = null, $start = null, $end = null) { |
| 628 | + function getHistory($limit = null, $start = null, $end = null, $inc = true) { |
629 | 629 | $dbr = $this->repo->getSlaveDB(); |
630 | 630 | $tables = array('oldimage'); |
631 | | - $join_conds = array(); |
632 | 631 | $fields = OldLocalFile::selectFields(); |
633 | | - $conds = $opts = array(); |
| 632 | + $conds = $opts = $join_conds = array(); |
| 633 | + $eq = $inc ? "=" : ""; |
634 | 634 | $conds[] = "oi_name = " . $dbr->addQuotes( $this->title->getDBKey() ); |
635 | 635 | if( $start ) { |
636 | | - $conds[] = "oi_timestamp <= " . $dbr->addQuotes( $dbr->timestamp( $start ) ); |
| 636 | + $conds[] = "oi_timestamp <$eq " . $dbr->addQuotes( $dbr->timestamp( $start ) ); |
637 | 637 | } |
638 | 638 | if( $end ) { |
639 | | - $conds[] = "oi_timestamp >= " . $dbr->addQuotes( $dbr->timestamp( $end ) ); |
| 639 | + $conds[] = "oi_timestamp >$eq " . $dbr->addQuotes( $dbr->timestamp( $end ) ); |
640 | 640 | } |
641 | 641 | if( $limit ) { |
642 | 642 | $opts['LIMIT'] = $limit; |
Index: trunk/phase3/includes/filerepo/File.php |
— | — | @@ -683,8 +683,9 @@ |
684 | 684 | * @param $limit integer Limit of rows to return |
685 | 685 | * @param $start timestamp Only revisions older than $start will be returned |
686 | 686 | * @param $end timestamp Only revisions newer than $end will be returned |
| 687 | + * @param $inc bool Include the endpoints of the time range |
687 | 688 | */ |
688 | | - function getHistory($limit = null, $start = null, $end = null) { |
| 689 | + function getHistory($limit = null, $start = null, $end = null, $inc=true) { |
689 | 690 | return array(); |
690 | 691 | } |
691 | 692 | |