Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauricio@fauth.dev>2020-05-28 03:46:12 +0300
committerMaurício Meneghini Fauth <mauricio@fauth.dev>2020-05-28 03:46:12 +0300
commit58eee2e3714b4035903315c1ef7b5f8ad3086c6c (patch)
tree02495753f51a1e399abab0b1d23beb3429e41da2 /setup
parent199e3d981384dc5bca52be760a3e281c6cbab32c (diff)
Use early exit when possible
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'setup')
-rw-r--r--setup/index.php36
1 files changed, 24 insertions, 12 deletions
diff --git a/setup/index.php b/setup/index.php
index 7e27682c7d..ac15543a98 100644
--- a/setup/index.php
+++ b/setup/index.php
@@ -40,31 +40,43 @@ if ($page === 'form') {
echo $controller->index([
'formset' => $_GET['formset'] ?? null,
]);
-} elseif ($page === 'config') {
+
+ return;
+}
+
+if ($page === 'config') {
$controller = new ConfigController($GLOBALS['ConfigFile'], new Template());
echo $controller->index([
'formset' => $_GET['formset'] ?? null,
'eol' => $_GET['eol'] ?? null,
]);
-} elseif ($page === 'servers') {
+
+ return;
+}
+
+if ($page === 'servers') {
$controller = new ServersController($GLOBALS['ConfigFile'], new Template());
if (isset($_GET['mode']) && $_GET['mode'] === 'remove' && $_SERVER['REQUEST_METHOD'] == 'POST') {
$controller->destroy([
'id' => $_GET['id'] ?? null,
]);
header('Location: index.php' . Url::getCommonRaw());
- } else {
- echo $controller->index([
- 'formset' => $_GET['formset'] ?? null,
- 'mode' => $_GET['mode'] ?? null,
- 'id' => $_GET['id'] ?? null,
- ]);
+
+ return;
}
-} else {
- $controller = new HomeController($GLOBALS['ConfigFile'], new Template());
+
echo $controller->index([
'formset' => $_GET['formset'] ?? null,
- 'action_done' => $_GET['action_done'] ?? null,
- 'version_check' => $_GET['version_check'] ?? null,
+ 'mode' => $_GET['mode'] ?? null,
+ 'id' => $_GET['id'] ?? null,
]);
+
+ return;
}
+
+$controller = new HomeController($GLOBALS['ConfigFile'], new Template());
+echo $controller->index([
+ 'formset' => $_GET['formset'] ?? null,
+ 'action_done' => $_GET['action_done'] ?? null,
+ 'version_check' => $_GET['version_check'] ?? null,
+]);