From 8f416baead93a48e5799e44b8bd2e2c4859f4e04 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 14 Sep 2007 13:18:58 +0200 Subject: auf Version 1.11 aktualisiert; Login-Bug behoben --- includes/filerepo/ForeignDBRepo.php | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 includes/filerepo/ForeignDBRepo.php (limited to 'includes/filerepo/ForeignDBRepo.php') diff --git a/includes/filerepo/ForeignDBRepo.php b/includes/filerepo/ForeignDBRepo.php new file mode 100644 index 00000000..13dcd029 --- /dev/null +++ b/includes/filerepo/ForeignDBRepo.php @@ -0,0 +1,57 @@ +dbType = $info['dbType']; + $this->dbServer = $info['dbServer']; + $this->dbUser = $info['dbUser']; + $this->dbPassword = $info['dbPassword']; + $this->dbName = $info['dbName']; + $this->dbFlags = $info['dbFlags']; + $this->tablePrefix = $info['tablePrefix']; + $this->hasSharedCache = $info['hasSharedCache']; + } + + function getMasterDB() { + if ( !isset( $this->dbConn ) ) { + $class = 'Database' . ucfirst( $this->dbType ); + $this->dbConn = new $class( $this->dbServer, $this->dbUser, + $this->dbPassword, $this->dbName, false, $this->dbFlags, + $this->tablePrefix ); + } + return $this->dbConn; + } + + function getSlaveDB() { + return $this->getMasterDB(); + } + + function hasSharedCache() { + return $this->hasSharedCache; + } + + function store( $srcPath, $dstZone, $dstRel, $flags = 0 ) { + throw new MWException( get_class($this) . ': write operations are not supported' ); + } + function publish( $srcPath, $dstRel, $archiveRel, $flags = 0 ) { + throw new MWException( get_class($this) . ': write operations are not supported' ); + } + function deleteBatch( $fileMap ) { + throw new MWException( get_class($this) . ': write operations are not supported' ); + } +} + + -- cgit v1.2.3-54-g00ecf