if ( !$status->isOK() ) {
return false;
}
- /**
- * @var $conn DatabaseBase
- */
+ /** @var $conn DatabaseBase */
$conn = $status->value;
// Get current account name
if ( !$create ) {
// Test the web account
try {
- $db = DatabaseBase::factory( 'mysql', array(
+ DatabaseBase::factory( 'mysql', array(
'host' => $this->getVar( 'wgDBserver' ),
'user' => $this->getVar( 'wgDBuser' ),
'password' => $this->getVar( 'wgDBpassword' ),
'dbname' => false,
'flags' => 0,
- 'tablePrefix' => $this->getVar( 'wgDBprefix' ) ) );
+ 'tablePrefix' => $this->getVar( 'wgDBprefix' )
+ ) );
} catch ( DBConnectionError $e ) {
return Status::newFatal( 'config-connection-error', $e->getMessage() );
}
if ( !$status->isOK() ) {
return $status;
}
+ /** @var DatabaseBase $conn */
$conn = $status->value;
$dbName = $this->getVar( 'wgDBname' );
if ( !$conn->selectDB( $dbName ) ) {
if ( $this->getVar( '_CreateDBAccount' ) ) {
// Before we blindly try to create a user that already has access,
try { // first attempt to connect to the database
- $db = DatabaseBase::factory( 'mysql', array(
+ DatabaseBase::factory( 'mysql', array(
'host' => $server,
'user' => $dbUser,
'password' => $password,
'dbname' => false,
'flags' => 0,
- 'tablePrefix' => $this->getVar( 'wgDBprefix' ) ) );
+ 'tablePrefix' => $this->getVar( 'wgDBprefix' )
+ ) );
$grantableNames[] = $this->buildFullUserName( $dbUser, $server );
$tryToCreate = false;
} catch ( DBConnectionError $e ) {