From: Fomafix Date: Sun, 18 Nov 2018 17:33:45 +0000 (+0100) Subject: WebInstallerUpgrade: Simplify return paths X-Git-Tag: 1.34.0-rc.0~3392 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=db94da3a7d9adb717c6bad8cf8ca0b22bf640bae;p=lhc%2Fweb%2Fwiklou.git WebInstallerUpgrade: Simplify return paths * Avoid else after return. * Combine redundant return values. Change-Id: If87f5b2163abc7867ce83081aa6ab9e358869060 --- 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();