mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR dev/build now shows database name and version next to "Building database ..." text (from r111851)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112931 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
849bca4a3d
commit
4af7d7aa34
@ -161,10 +161,13 @@ class DatabaseAdmin extends Controller {
|
||||
DB::quiet();
|
||||
} else {
|
||||
$conn = DB::getConn();
|
||||
// Assumes database class is like "MySQLDatabase" or "MSSQLDatabase" (suffixed with "Database")
|
||||
$dbType = substr(get_class($conn), 0, -8);
|
||||
$dbVersion = $conn->getVersion();
|
||||
$databaseName = (method_exists($conn, 'currentDatabase')) ? $conn->currentDatabase() : "";
|
||||
|
||||
if(Director::is_cli()) echo "\n\nBuilding Database $databaseName\n\n";
|
||||
else echo "<h2>Building Database $databaseName</h2>";
|
||||
if(Director::is_cli()) echo sprintf("\n\nBuilding database %s using %s %s\n\n", $databaseName, $dbType, $dbVersion);
|
||||
else echo sprintf("<h2>Building database %s using %s %s</h2>", $databaseName, $dbType, $dbVersion);
|
||||
}
|
||||
|
||||
// Set up the initial database
|
||||
|
Loading…
x
Reference in New Issue
Block a user