From: Jack D. Pond Date: Mon, 26 Apr 2010 14:44:54 +0000 (+0000) Subject: Modification to LocalFile::getHistory for custom repos X-Git-Tag: 1.31.0-rc.0~37009 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=b21dfac678f4fc8417cbcc74921492a3403b6e83;p=lhc%2Fweb%2Fwiklou.git Modification to LocalFile::getHistory for custom repos Hard coded OldLocalFile::getHistory now used only when oldFileFromRowFactory not declared - for backwards compatibility --- diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index d7364a537c..c321d9124d 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -661,7 +661,11 @@ class LocalFile extends File { $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $opts, $join_conds ); $r = array(); while( $row = $dbr->fetchObject( $res ) ) { - $r[] = OldLocalFile::newFromRow( $row, $this->repo ); + if ( $this->repo->oldFileFromRowFactory ) { + $r[] = call_user_func( $this->repo->oldFileFromRowFactory, $row, $this->repo ); + } else { + $r[] = OldLocalFile::newFromRow( $row, $this->repo ); + } } if( $order == 'ASC' ) { $r = array_reverse( $r ); // make sure it ends up descending