From acb88a5c685db42c1017ab928fd316b507f02093 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 20 Apr 2017 15:33:14 +0200 Subject: [locationinfo] Set default options properly when adding new server --- modules-available/locationinfo/page.inc.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'modules-available/locationinfo/page.inc.php') diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php index a03d6f1c..209de473 100644 --- a/modules-available/locationinfo/page.inc.php +++ b/modules-available/locationinfo/page.inc.php @@ -481,12 +481,10 @@ class Page_LocationInfo extends Page } } - if ($backend['typ'] == $dbresult['servertype']) { - if (isset($dbcredentials[$cred->property])) { - $credential['value'] = $dbcredentials[$cred->property]; - } else { - $credential['value'] = $cred->default; - } + if ($backend['typ'] == $dbresult['servertype'] && isset($dbcredentials[$cred->property])) { + $credential['value'] = $dbcredentials[$cred->property]; + } else { + $credential['value'] = $cred->default; } $selection = array(); -- cgit v1.2.3-55-g7522