if ( $time ) {
if ( $this->oldFileFactoryKey ) {
return call_user_func( $this->oldFileFactoryKey, $sha1, $this, $time );
- } else {
- return false;
}
} else {
- return call_user_func( $this->fileFactoryKey, $sha1, $this );
+ if ( $this->fileFactoryKey ) {
+ return call_user_func( $this->fileFactoryKey, $sha1, $this );
+ }
}
+ return false;
}
/**
*/
class LocalRepo extends FSRepo {
var $fileFactory = array( 'LocalFile', 'newFromTitle' );
+ var $fileFactoryKey = array( 'LocalFile', 'newFromKey' );
var $oldFileFactory = array( 'OldLocalFile', 'newFromTitle' );
+ var $oldFileFactoryKey = array( 'OldLocalFile', 'newFromKey' );
var $fileFromRowFactory = array( 'LocalFile', 'newFromRow' );
var $oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' );