From 86bede27704e55ab21dc019dadf0b34c2a66c098 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 17 Nov 2013 18:12:15 +0100 Subject: Corrections install.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Première version fonctionnelle https://github.com/marienfressinaud/FreshRSS/issues/273 --- public/install.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'public/install.php') diff --git a/public/install.php b/public/install.php index ba8fe3675..c35d52f29 100644 --- a/public/install.php +++ b/public/install.php @@ -159,7 +159,7 @@ function saveStep2 () { $_SESSION['old_entries'] = 3; } $_SESSION['mail_login'] = addslashes ($_POST['mail_login']); - $_SESSION['default_user'] = substr(0, 16, preg_replace ('/[^a-zA-Z0-9]/', '', $_POST['default_user'])); + $_SESSION['default_user'] = substr(preg_replace ('/[^a-zA-Z0-9]/', '', $_POST['default_user']), 0, 16); $token = ''; if ($_SESSION['mail_login']) { @@ -293,7 +293,8 @@ function checkStep2 () { isset ($_SESSION['old_entries']) && isset ($_SESSION['mail_login']) && isset ($_SESSION['default_user']); - $data = file_exists (DATA_PATH . '/' . $_SESSION['default_user'] . '_user.php'); + $defaultUser = empty($_POST['default_user']) ? $_SESSION['default_user'] : $_POST['default_user']; + $data = file_exists (DATA_PATH . '/' . $defaultUser . '_user.php'); return array ( 'conf' => $conf ? 'ok' : 'ko', @@ -561,11 +562,11 @@ function printStep3 () {
-- cgit v1.2.3