62d937d90fc102f99a3c128425a5adffc2c9837f
3 * A repository that stores files in the local filesystem and registers them
4 * in the wiki's own database. This is the most commonly used repository class.
6 class LocalRepo
extends FSRepo
{
7 var $fileFactory = array( 'LocalFile', 'newFromTitle' );
9 function getSlaveDB() {
10 return wfGetDB( DB_SLAVE
);
13 function getMasterDB() {
14 return wfGetDB( DB_MASTER
);
17 function newFileFromRow( $row ) {
18 if ( isset( $row->img_name
) ) {
19 return LocalFile
::newFromRow( $row, $this );
20 } elseif ( isset( $row->oi_name
) ) {
21 return OldLocalFile
::newFromRow( $row, $this );
23 throw new MWException( __METHOD__
.': invalid row' );