$this->getVar( '_InstallUser' ),
$this->getVar( '_InstallPassword' ),
false,
- false,
0,
$this->getVar( 'wgDBprefix' )
);
$s .= Xml::openElement( 'div', array(
'id' => 'dbMyisamWarning'
));
- $s .= $this->parent->getWarningBox( wfMessage( 'config-mysql-myisam-dep' )->text() );
+ $myisamWarning = 'config-mysql-myisam-dep';
+ if ( count( $engines ) === 1 ) {
+ $myisamWarning = 'config-mysql-only-myisam-dep';
+ }
+ $s .= $this->parent->getWarningBox( wfMessage( $myisamWarning )->text() );
$s .= Xml::closeElement( 'div' );
if ( $this->getVar( '_MysqlEngine' ) != 'MyISAM' ) {
$this->getVar( 'wgDBuser' ),
$this->getVar( 'wgDBpassword' ),
false,
- false,
0,
$this->getVar( 'wgDBprefix' )
);
$dbUser,
$password,
false,
- false,
0,
$this->getVar( 'wgDBprefix' )
);
foreach ( $createHostList as $host ) {
$fullName = $this->buildFullUserName( $dbUser, $host );
if ( !$this->userDefinitelyExists( $dbUser, $host ) ) {
- try{
+ try {
$this->db->begin( __METHOD__ );
$this->db->query( "CREATE USER $fullName IDENTIFIED BY $escPass", __METHOD__ );
$this->db->commit( __METHOD__ );
$grantableNames[] = $fullName;
- } catch( DBQueryError $dqe ) {
+ } catch ( DBQueryError $dqe ) {
if ( $this->db->lastErrno() == 1396 /* ER_CANNOT_USER */ ) {
// User (probably) already exists
$this->db->rollback( __METHOD__ );
$this->db->begin( __METHOD__ );
$this->db->query( "GRANT ALL PRIVILEGES ON $dbAllTables TO $name", __METHOD__ );
$this->db->commit( __METHOD__ );
- } catch( DBQueryError $dqe ) {
+ } catch ( DBQueryError $dqe ) {
$this->db->rollback( __METHOD__ );
$status->fatal( 'config-install-user-grant-failed', $dbUser, $dqe->getText() );
}
$res = $this->db->selectRow( 'mysql.user', array( 'Host', 'User' ),
array( 'Host' => $host, 'User' => $user ), __METHOD__ );
return (bool)$res;
- } catch( DBQueryError $dqe ) {
+ } catch ( DBQueryError $dqe ) {
return false;
}