aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-02-07 15:19:29 +0100
committerGravatar GitHub <noreply@github.com> 2021-02-07 15:19:29 +0100
commita626e5fff8d1cfcc7280396bd8b17b177b6345d2 (patch)
treef7ad919978822510c3006ad4e932f7093f351a56 /app
parentafc30cef3d8ca3728af35f2385d05e91e857ea0e (diff)
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
Diffstat (limited to 'app')
-rw-r--r--app/i18n/cz/install.php3
-rw-r--r--app/i18n/de/install.php3
-rw-r--r--app/i18n/en-us/install.php3
-rw-r--r--app/i18n/en/install.php3
-rwxr-xr-xapp/i18n/es/install.php3
-rw-r--r--app/i18n/fr/install.php3
-rw-r--r--app/i18n/he/install.php3
-rw-r--r--app/i18n/it/install.php3
-rw-r--r--app/i18n/kr/install.php3
-rw-r--r--app/i18n/nl/install.php3
-rw-r--r--app/i18n/oc/install.php3
-rw-r--r--app/i18n/pl/install.php3
-rw-r--r--app/i18n/pt-br/install.php3
-rw-r--r--app/i18n/ru/install.php3
-rw-r--r--app/i18n/sk/install.php3
-rw-r--r--app/i18n/tr/install.php3
-rw-r--r--app/i18n/zh-cn/install.php3
-rw-r--r--app/install.php18
18 files changed, 63 insertions, 6 deletions
diff --git a/app/i18n/cz/install.php b/app/i18n/cz/install.php
index 4d97a92bf..cebad4aee 100644
--- a/app/i18n/cz/install.php
+++ b/app/i18n/cz/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Nastala chyba, soubor <em>%s</em> musíte smazat ručně.',
'ok' => 'Instalace byla úspěšná.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => 'krok %d',
'steps' => 'Kroky',
'this_is_the_end' => 'Konec',
diff --git a/app/i18n/de/install.php b/app/i18n/de/install.php
index 693b0b2d7..8aad28ad2 100644
--- a/app/i18n/de/install.php
+++ b/app/i18n/de/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Etwas ist schiefgelaufen; Sie müssen die Datei <em>%s</em> manuell löschen.',
'ok' => 'Der Installationsvorgang war erfolgreich.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => 'Schritt %d',
'steps' => 'Schritte',
'this_is_the_end' => 'Das ist das Ende',
diff --git a/app/i18n/en-us/install.php b/app/i18n/en-us/install.php
index 9e8b0ff9e..6808a8c77 100644
--- a/app/i18n/en-us/install.php
+++ b/app/i18n/en-us/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Something went wrong; you must delete the file <em>%s</em> manually.',
'ok' => 'The installation process was successful.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!',
+ ),
'step' => 'step %d',
'steps' => 'Steps',
'this_is_the_end' => 'This is the end',
diff --git a/app/i18n/en/install.php b/app/i18n/en/install.php
index 9551d1d75..b06e47bb2 100644
--- a/app/i18n/en/install.php
+++ b/app/i18n/en/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Something went wrong; you must delete the file <em>%s</em> manually.',
'ok' => 'The installation process was successful.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!',
+ ),
'step' => 'step %d',
'steps' => 'Steps',
'this_is_the_end' => 'This is the end',
diff --git a/app/i18n/es/install.php b/app/i18n/es/install.php
index cbe7140b3..fe4538cb5 100755
--- a/app/i18n/es/install.php
+++ b/app/i18n/es/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Parece que ha habido un error. Debes eliminar el archivo <em>%s</em> de forma manual.',
'ok' => 'La instalación se ha completado correctamente.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => 'paso %d',
'steps' => 'Pasos',
'this_is_the_end' => '¡Terminamos!',
diff --git a/app/i18n/fr/install.php b/app/i18n/fr/install.php
index 6b36d2b7b..c92bd3ca2 100644
--- a/app/i18n/fr/install.php
+++ b/app/i18n/fr/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Quelque chose s’est mal passé, vous devez supprimer le fichier <em>%s</em> à la main.',
'ok' => 'L’installation s’est bien passée.',
+ 'session' => array(
+ 'nok' => 'Le serveur Web semble mal configué pour les cookies nécessaires aux sessions PHP!',
+ ),
'step' => 'étape %d',
'steps' => 'Étapes',
'this_is_the_end' => 'This is the end',
diff --git a/app/i18n/he/install.php b/app/i18n/he/install.php
index e36ff6226..1cc289c14 100644
--- a/app/i18n/he/install.php
+++ b/app/i18n/he/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'משהו נכשל; יש צורך למחוק את הקובץ <em>%s</em> ידנית.',
'ok' => 'The installation process was successful.', // TODO - Translation
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => 'step %d', // TODO - Translation
'steps' => 'שלבים',
'this_is_the_end' => 'סיום',
diff --git a/app/i18n/it/install.php b/app/i18n/it/install.php
index e1eab2ca4..7f5de42d8 100644
--- a/app/i18n/it/install.php
+++ b/app/i18n/it/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Qualcosa non ha funzionato; devi cancellare il file <em>%s</em> manualmente.',
'ok' => 'Processo di installazione terminato con successo.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => 'Passaggio %d',
'steps' => 'Passaggi',
'this_is_the_end' => 'Fine',
diff --git a/app/i18n/kr/install.php b/app/i18n/kr/install.php
index 64e1680a4..b0afe532c 100644
--- a/app/i18n/kr/install.php
+++ b/app/i18n/kr/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => '무언가 잘못되었습니다; <em>%s</em> 파일을 직접 삭제해주세요.',
'ok' => '설치 과정이 성공적으로 끝났습니다.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => '단계 %d',
'steps' => '단계',
'this_is_the_end' => '마침',
diff --git a/app/i18n/nl/install.php b/app/i18n/nl/install.php
index 739eb44c7..dcab37fdd 100644
--- a/app/i18n/nl/install.php
+++ b/app/i18n/nl/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Er ging iets fout! U moet het bestand <em>%s</em> handmatig verwijderen.',
'ok' => 'De installatieprocedure is geslaagd.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => 'stap %d',
'steps' => 'Stappen',
'this_is_the_end' => 'Dit is het einde',
diff --git a/app/i18n/oc/install.php b/app/i18n/oc/install.php
index 80817f808..770b1aebc 100644
--- a/app/i18n/oc/install.php
+++ b/app/i18n/oc/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Quicòm a trucat, sembla qu’avètz suprimit <em>%s</em> a la man.',
'ok' => 'L’installacion s’es corrèctament passada.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => 'etapa %d',
'steps' => 'Etapas',
'this_is_the_end' => 'Es la fin',
diff --git a/app/i18n/pl/install.php b/app/i18n/pl/install.php
index 658744453..c8f7c98e3 100644
--- a/app/i18n/pl/install.php
+++ b/app/i18n/pl/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Something went wrong; you must delete the file <em>%s</em> manually.', // TODO - Translation
'ok' => 'The installation process was successful.', // TODO - Translation
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => 'step %d', // TODO - Translation
'steps' => 'Steps', // TODO - Translation
'this_is_the_end' => 'This is the end', // TODO - Translation
diff --git a/app/i18n/pt-br/install.php b/app/i18n/pt-br/install.php
index e74add675..abb5f6982 100644
--- a/app/i18n/pt-br/install.php
+++ b/app/i18n/pt-br/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Algo deu errado; você deve deletar o arquivo <em>%s</em> manualmente.',
'ok' => 'O processo de instalação foi um sucesso.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => 'passo %d',
'steps' => 'Passos',
'this_is_the_end' => 'Este é o final',
diff --git a/app/i18n/ru/install.php b/app/i18n/ru/install.php
index 7925a609e..a8db3f436 100644
--- a/app/i18n/ru/install.php
+++ b/app/i18n/ru/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Что-то пошло не так; удалите файл <em>%s</em> вручную.',
'ok' => 'Установка успешна.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => '%d этап',
'steps' => 'Этапы',
'this_is_the_end' => 'Это конец',
diff --git a/app/i18n/sk/install.php b/app/i18n/sk/install.php
index 9cf9a7f45..998119102 100644
--- a/app/i18n/sk/install.php
+++ b/app/i18n/sk/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Niečo sa nepodarilo. Musíte ručne zmazať súbor <em>%s</em>.',
'ok' => 'Inštalácia bola úspešná.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => 'krok %d',
'steps' => 'Kroky',
'this_is_the_end' => 'Toto je koniec',
diff --git a/app/i18n/tr/install.php b/app/i18n/tr/install.php
index fe5991939..e4c9bd10d 100644
--- a/app/i18n/tr/install.php
+++ b/app/i18n/tr/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => 'Hata meydana geldi; <em>%s</em> dosyasını elle silmelisiniz.',
'ok' => 'Kurulum başarıyla tamamlandı.',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => 'adım %d',
'steps' => 'Adımlar',
'this_is_the_end' => 'Son Adım',
diff --git a/app/i18n/zh-cn/install.php b/app/i18n/zh-cn/install.php
index a06ac6e9c..fa6fd9f90 100644
--- a/app/i18n/zh-cn/install.php
+++ b/app/i18n/zh-cn/install.php
@@ -121,6 +121,9 @@ return array(
),
'not_deleted' => '出错!你必须手动删除文件 <em>%s</em>',
'ok' => '安装成功',
+ 'session' => array(
+ 'nok' => 'The web server seems to be incorrectly configured for cookies required for PHP sessions!', // TODO - Translation
+ ),
'step' => '步骤 %d',
'steps' => '步骤',
'this_is_the_end' => '最后一步',
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();
?>
- <?php $s0 = checkStep0(); if ($s0['all'] == 'ok') { ?>
+ <?php if ($s0['all'] === 'ok') { ?>
<p class="alert alert-success"><span class="alert-head"><?= _t('gen.short.ok') ?></span> <?= _t('install.language.defined') ?></p>
+ <?php } else if (!empty($_POST) && $s0['sessionWorking'] !== 'ok') { ?>
+ <p class="alert alert-error"><span class="alert-head"><?= _t('gen.short.damn') ?></span> <?= _t('install.session.nok') ?></p>
<?php } ?>
<form action="index.php?step=0" method="post">