dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9648ff
)
Modification to LocalFile::getHistory for custom repos
author
Jack D. Pond
<jdpond@users.mediawiki.org>
Mon, 26 Apr 2010 14:44:54 +0000
(14:44 +0000)
committer
Jack D. Pond
<jdpond@users.mediawiki.org>
Mon, 26 Apr 2010 14:44:54 +0000
(14:44 +0000)
Hard coded OldLocalFile::getHistory now used only when oldFileFromRowFactory not declared - for backwards compatibility
includes/filerepo/LocalFile.php
patch
|
blob
|
history
diff --git
a/includes/filerepo/LocalFile.php
b/includes/filerepo/LocalFile.php
index
d7364a5
..
c321d91
100644
(file)
--- 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