From 752ab3dc79da6fa2dbfd7bfba3c48a6b60c82fa5 Mon Sep 17 00:00:00 2001 From: Florian Schaal <florian@schaal-24.de> Date: Mon, 22 Sep 2014 09:14:03 -0400 Subject: [PATCH] check always $_POST --- interface/web/sites/database_edit.php | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php index 9ac47ae..22b631a 100644 --- a/interface/web/sites/database_edit.php +++ b/interface/web/sites/database_edit.php @@ -61,6 +61,9 @@ if(!$app->tform->checkResellerLimit('limit_database')) { $app->error('Reseller: '.$app->tform->wordbook["limit_database_txt"]); } + } else { + $settings = $app->getconf->get_global_config('sites'); + $app->tform->formDef['tabs']['database']['fields']['server_id']['default'] = intval($settings['default_dbserver']); } parent::onShowNew(); @@ -143,7 +146,11 @@ $app->tpl->setVar("database_name", $app->tools_sites->removePrefix($this->dataRecord['database_name'], $this->dataRecord['database_name_prefix'], $dbname_prefix)); } - $app->tpl->setVar("database_name_prefix", $app->tools_sites->getPrefix($this->dataRecord['database_name_prefix'], $dbname_prefix, $global_config['dbname_prefix'])); + if($this->dataRecord['database_name'] == "") { + $app->tpl->setVar("database_name_prefix", $dbname_prefix); + } else { + $app->tpl->setVar("database_name_prefix", $app->tools_sites->getPrefix($this->dataRecord['database_name_prefix'], $dbname_prefix, $global_config['dbname_prefix'])); + } if($this->id > 0) { //* we are editing a existing record -- Gitblit v1.9.1