mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX #2342: Database names with hyphens and other special characters can now be used.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69715 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
63de49eab1
commit
f28715775d
@ -124,8 +124,8 @@ class MySQLDatabase extends Database {
|
||||
}
|
||||
|
||||
public function createDatabase() {
|
||||
$this->query("CREATE DATABASE $this->database");
|
||||
$this->query("USE $this->database");
|
||||
$this->query("CREATE DATABASE `$this->database`");
|
||||
$this->query("USE `$this->database`");
|
||||
|
||||
$this->tableList = $this->fieldList = $this->indexList = null;
|
||||
|
||||
|
@ -107,7 +107,7 @@
|
||||
<label for="mysql_password">MySQL password:</label>
|
||||
<span class="middleColumn"><input id="mysql_password" class="text" type="password" name="mysql[password]" value="<?php echo $databaseConfig['password']; ?>" /></span>
|
||||
<label for="mysql_database">MySQL database:</label>
|
||||
<span class="middleColumn"><input id="mysql_database" class="text" type="text" name="mysql[database]" value="<?php echo $databaseConfig['database']; ?>" onchange="this.value = this.value.replace(/[^A-Za-z0-9_]+/g,'');" /></span>
|
||||
<span class="middleColumn"><input id="mysql_database" class="text" type="text" name="mysql[database]" value="<?php echo $databaseConfig['database']; ?>" onchange="this.value = this.value.replace(/[\/\\:*?"<>|. \t]+/g,'');" /></span>
|
||||
<input type="submit" class="action" value="Re-check requirements" />
|
||||
</p>
|
||||
<p class="mysql">SilverStripe stores its content in a MySQL database. Please provide the username and password to connect to the server here. If this account has permission to create databases, then we will create the database for you; otherwise, you must give the name of a database that already exists.</p>
|
||||
|
Loading…
Reference in New Issue
Block a user