From db94da3a7d9adb717c6bad8cf8ca0b22bf640bae Mon Sep 17 00:00:00 2001 From: Fomafix Date: Sun, 18 Nov 2018 18:33:45 +0100 Subject: [PATCH] WebInstallerUpgrade: Simplify return paths * Avoid else after return. * Combine redundant return values. Change-Id: If87f5b2163abc7867ce83081aa6ab9e358869060 --- includes/installer/WebInstallerUpgrade.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/includes/installer/WebInstallerUpgrade.php b/includes/installer/WebInstallerUpgrade.php index a6157b554e..46efc404bd 100644 --- a/includes/installer/WebInstallerUpgrade.php +++ b/includes/installer/WebInstallerUpgrade.php @@ -39,14 +39,13 @@ class WebInstallerUpgrade extends WebInstallerPage { if ( $this->parent->request->wasPosted() && !$this->getVar( '_ExistingDBSettings' ) ) { // Done message acknowledged return 'continue'; - } else { - // Back button click - // Show the done message again - // Make them click back again if they want to do the upgrade again - $this->showDoneMessage(); - - return 'output'; } + // Back button click + // Show the done message again + // Make them click back again if they want to do the upgrade again + $this->showDoneMessage(); + + return 'output'; } // wgDBtype is generally valid here because otherwise the previous page @@ -73,15 +72,13 @@ class WebInstallerUpgrade extends WebInstallerPage { } $this->setVar( '_UpgradeDone', true ); $this->showDoneMessage(); - - return 'output'; } else { $this->startForm(); $this->parent->showError( 'config-upgrade-error' ); $this->endForm(); - - return 'output'; } + + return 'output'; } $this->startForm(); -- 2.20.1