protected $htmlErrors;
/** @var string */
protected $delimiter = ';';
+ /** @var DatabaseDomain */
+ protected $currentDomain;
/**
* Either 1 if a transaction is active or 0 otherwise.
if ( $user ) {
$this->open( $server, $user, $password, $dbName );
}
+
+ $this->currentDomain = ( $this->mDBname != '' )
+ ? new DatabaseDomain( $this->mDBname, null, $this->mTablePrefix )
+ : DatabaseDomain::newUnspecified();
}
/**
$old = $this->mTablePrefix;
if ( $prefix !== null ) {
$this->mTablePrefix = $prefix;
+ $this->currentDomain = ( $this->mDBname != '' )
+ ? new DatabaseDomain( $this->mDBname, null, $this->mTablePrefix )
+ : DatabaseDomain::newUnspecified();
}
return $old;
}
public function getDomainID() {
- if ( $this->mTablePrefix != '' ) {
- return "{$this->mDBname}-{$this->mTablePrefix}";
- } else {
- return $this->mDBname;
- }
+ return $this->currentDomain->getId();
}
final public function getWikiID() {