From 338f2866420427e481d4793fc2811e5da668b487 Mon Sep 17 00:00:00 2001 From: Hayden Smith Date: Wed, 7 Jan 2009 03:47:15 +0000 Subject: [PATCH] Added getter to retrieve alternative database name. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69815 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/DB.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/model/DB.php b/core/model/DB.php index b8c39bb77..19be4b36d 100755 --- a/core/model/DB.php +++ b/core/model/DB.php @@ -44,6 +44,13 @@ class DB { static function set_alternative_database_name($dbname) { $_SESSION["alternativeDatabaseName"] = $dbname; } + + /** + * Get the name of the database in use + */ + static function get_alternative_database_name() { + return $_SESSION["alternativeDatabaseName"]; + } /** * Connect to a database.