From 9b4261ca365e2b3ac61aafc9f734f4201f6ca213 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 7 May 2020 21:18:19 +0200 Subject: [PATCH] refactoring --- lam/templates/config/confImportExport.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lam/templates/config/confImportExport.php b/lam/templates/config/confImportExport.php index 7e434559..57ba7fd4 100644 --- a/lam/templates/config/confImportExport.php +++ b/lam/templates/config/confImportExport.php @@ -103,13 +103,11 @@ printHeaderContents(_("Import and export configuration"), '../..'); } // check login - if (isset($_POST['submitLogin'])) { - if (!checkLogin($cfg)) { - exit(); - } + if (isset($_POST['submitLogin']) && !checkLogin($cfg)) { + exit(); } - displayImportExport($cfg); + displayImportExport(); /** * Shows the login dialog for the configuration master password. @@ -167,10 +165,8 @@ printHeaderContents(_("Import and export configuration"), '../..'); /** * Displays the import/export functions. - * - * @param LAMCfgMain $cfg main config */ - function displayImportExport($cfg) { + function displayImportExport() { $tabindex = 0; $content = new htmlResponsiveRow(); @@ -190,7 +186,6 @@ printHeaderContents(_("Import and export configuration"), '../..'); * @param htmlResponsiveRow $content content where to add import part */ function renderImportPart($content) { - $fileContent = null; $validUpload = false; $importSteps = array(); if (isset($_POST['importConfig'])) {