From a626e5fff8d1cfcc7280396bd8b17b177b6345d2 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 7 Feb 2021 15:19:29 +0100 Subject: Check that PHP session is working during install (#3430) * Check that PHP session is working during install #fix https://github.com/FreshRSS/FreshRSS/issues/3198 * Minor whitespace * Missing he --- app/install.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'app/install.php') diff --git a/app/install.php b/app/install.php index 76183e3cc..366fa9a36 100644 --- a/app/install.php +++ b/app/install.php @@ -56,6 +56,7 @@ function saveLanguage() { } Minz_Session::_param('language', $_POST['language']); + Minz_Session::_param('sessionWorking', 'ok'); header('Location: index.php?step=1'); } @@ -242,13 +243,13 @@ function checkStep() { $s1 = checkRequirements(); $s2 = checkStep2(); $s3 = checkStep3(); - if (STEP > 0 && $s0['all'] != 'ok') { + if (STEP > 0 && $s0['all'] !== 'ok') { header('Location: index.php?step=0'); - } elseif (STEP > 1 && $s1['all'] != 'ok') { + } elseif (STEP > 1 && $s1['all'] !== 'ok') { header('Location: index.php?step=1'); - } elseif (STEP > 2 && $s2['all'] != 'ok') { + } elseif (STEP > 2 && $s2['all'] !== 'ok') { header('Location: index.php?step=2'); - } elseif (STEP > 3 && $s3['all'] != 'ok') { + } elseif (STEP > 3 && $s3['all'] !== 'ok') { header('Location: index.php?step=3'); } Minz_Session::_param('actualize_feeds', true); @@ -257,10 +258,12 @@ function checkStep() { function checkStep0() { $languages = Minz_Translate::availableLanguages(); $language = Minz_Session::param('language') != '' && in_array(Minz_Session::param('language'), $languages); + $sessionWorking = Minz_Session::param('sessionWorking') === 'ok'; return array( 'language' => $language ? 'ok' : 'ko', - 'all' => $language ? 'ok' : 'ko' + 'sessionWorking' => $sessionWorking ? 'ok' : 'ko', + 'all' => $language && $sessionWorking ? 'ok' : 'ko' ); } @@ -329,9 +332,12 @@ function checkStep3() { function printStep0() { $actual = Minz_Translate::language(); $languages = Minz_Translate::availableLanguages(); + $s0 = checkStep0(); ?> - +

+ +

-- cgit v1.2.3