From 4a147c74a19012791f1bc9a62216daca82cb97f1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 13 Mar 2017 16:40:22 +0100 Subject: [PATCH] fix no longer working db-creation after 6dfe752b7fe3e1259c98067fb9046898219be3d8 allow to switch whole database readonly --- admin/inc/class.admin_cmd.inc.php | 2 ++ setup/inc/class.setup_cmd_database.inc.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/inc/class.admin_cmd.inc.php b/admin/inc/class.admin_cmd.inc.php index 15541eb35b..ff2f311a57 100644 --- a/admin/inc/class.admin_cmd.inc.php +++ b/admin/inc/class.admin_cmd.inc.php @@ -504,6 +504,8 @@ abstract class admin_cmd case 'accounts': self::_instanciate_accounts(); return self::$accounts; + case 'data': + return $this->data; } return $this->data[$property]; } diff --git a/setup/inc/class.setup_cmd_database.inc.php b/setup/inc/class.setup_cmd_database.inc.php index 24be7b8f05..a4dbb0fe6d 100644 --- a/setup/inc/class.setup_cmd_database.inc.php +++ b/setup/inc/class.setup_cmd_database.inc.php @@ -141,7 +141,7 @@ class setup_cmd_database extends setup_cmd private function connect($user=null,$pass=null,$name=null) { // propagate all db_* vars - $this->test_db = new Api\Db(get_object_vars($this)); + $this->test_db = new Api\Db($this->data); $error_rep = error_reporting(); error_reporting($error_rep & ~E_WARNING); // switch warnings off, in case they are on