aboutsummaryrefslogtreecommitdiff
path: root/app/install.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/install.php')
-rw-r--r--app/install.php45
1 files changed, 4 insertions, 41 deletions
diff --git a/app/install.php b/app/install.php
index 062f66814..e73bc9972 100644
--- a/app/install.php
+++ b/app/install.php
@@ -103,7 +103,6 @@ function saveStep1() {
$_SESSION['title'] = $system_conf->title;
$_SESSION['auth_type'] = $system_conf->auth_type;
$_SESSION['old_entries'] = $user_conf->old_entries;
- $_SESSION['mail_login'] = $user_conf->mail_login;
$_SESSION['default_user'] = $current_user;
$_SESSION['passwordHash'] = $user_conf->passwordHash;
@@ -128,7 +127,6 @@ function saveStep2() {
$_SESSION['old_entries'] = param('old_entries', $user_default_config->old_entries);
$_SESSION['auth_type'] = param('auth_type', 'form');
$_SESSION['default_user'] = substr(preg_replace('/[^a-zA-Z0-9]/', '', param('default_user', '')), 0, 16);
- $_SESSION['mail_login'] = filter_var(param('mail_login', ''), FILTER_VALIDATE_EMAIL);
$password_plain = param('passwordPlain', false);
if ($password_plain !== false && cryptAvailable()) {
@@ -146,8 +144,7 @@ function saveStep2() {
return false;
}
- if (($_SESSION['auth_type'] === 'form' && empty($_SESSION['passwordHash'])) ||
- ($_SESSION['auth_type'] === 'persona' && empty($_SESSION['mail_login']))) {
+ if ($_SESSION['auth_type'] === 'form' && empty($_SESSION['passwordHash'])) {
return false;
}
@@ -157,15 +154,11 @@ function saveStep2() {
}
$token = '';
- if ($_SESSION['mail_login']) {
- $token = sha1($_SESSION['salt'] . $_SESSION['mail_login']);
- }
$config_array = array(
'language' => $_SESSION['language'],
'theme' => $user_default_config->theme,
'old_entries' => $_SESSION['old_entries'],
- 'mail_login' => $_SESSION['mail_login'],
'passwordHash' => $_SESSION['passwordHash'],
'token' => $token,
);
@@ -179,12 +172,6 @@ function saveStep2() {
mkdir($user_dir);
file_put_contents($user_config_path, "<?php\n return " . var_export($config_array, true) . ';');
- if ($_SESSION['mail_login'] != '') {
- $personaFile = join_path(DATA_PATH, 'persona', $_SESSION['mail_login'] . '.txt');
- @unlink($personaFile);
- file_put_contents($personaFile, $_SESSION['default_user']);
- }
-
header('Location: index.php?step=3');
}
}
@@ -324,7 +311,6 @@ function checkStep1() {
$cache = CACHE_PATH && is_writable(CACHE_PATH);
$users = USERS_PATH && is_writable(USERS_PATH);
$favicons = is_writable(join_path(DATA_PATH, 'favicons'));
- $persona = is_writable(join_path(DATA_PATH, 'persona'));
$http_referer = is_referer_from_same_domain();
return array(
@@ -343,10 +329,9 @@ function checkStep1() {
'cache' => $cache ? 'ok' : 'ko',
'users' => $users ? 'ok' : 'ko',
'favicons' => $favicons ? 'ok' : 'ko',
- 'persona' => $persona ? 'ok' : 'ko',
'http_referer' => $http_referer ? 'ok' : 'ko',
'all' => $php && $minz && $curl && $pdo && $pcre && $ctype && $dom && $xml &&
- $data && $cache && $users && $favicons && $persona && $http_referer ?
+ $data && $cache && $users && $favicons && $http_referer ?
'ok' : 'ko'
);
}
@@ -380,7 +365,6 @@ function freshrss_already_installed() {
function checkStep2() {
$conf = !empty($_SESSION['old_entries']) &&
- isset($_SESSION['mail_login']) &&
!empty($_SESSION['default_user']);
$form = (
@@ -388,11 +372,6 @@ function checkStep2() {
($_SESSION['auth_type'] != 'form' || !empty($_SESSION['passwordHash']))
);
- $persona = (
- isset($_SESSION['auth_type']) &&
- ($_SESSION['auth_type'] != 'persona' || !empty($_SESSION['mail_login']))
- );
-
$defaultUser = empty($_POST['default_user']) ? null : $_POST['default_user'];
if ($defaultUser === null) {
$defaultUser = empty($_SESSION['default_user']) ? '' : $_SESSION['default_user'];
@@ -402,9 +381,8 @@ function checkStep2() {
return array(
'conf' => $conf ? 'ok' : 'ko',
'form' => $form ? 'ok' : 'ko',
- 'persona' => $persona ? 'ok' : 'ko',
'data' => $data ? 'ok' : 'ko',
- 'all' => $conf && $form && $persona && $data ? 'ok' : 'ko'
+ 'all' => $conf && $form && $data ? 'ok' : 'ko'
);
}
@@ -612,12 +590,6 @@ function printStep1() {
<p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?></span> <?php echo _t('install.check.favicons.nok', DATA_PATH . '/favicons'); ?></p>
<?php } ?>
- <?php if ($res['persona'] == 'ok') { ?>
- <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?></span> <?php echo _t('install.check.persona.ok'); ?></p>
- <?php } else { ?>
- <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?></span> <?php echo _t('install.check.persona.nok', DATA_PATH . '/persona'); ?></p>
- <?php } ?>
-
<?php if ($res['http_referer'] == 'ok') { ?>
<p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?></span> <?php echo _t('install.check.http_referer.ok'); ?></p>
<?php } else { ?>
@@ -673,12 +645,11 @@ function printStep2() {
<select id="auth_type" name="auth_type" required="required" tabindex="4">
<?php
function no_auth($auth_type) {
- return !in_array($auth_type, array('form', 'persona', 'http_auth', 'none'));
+ return !in_array($auth_type, array('form', 'http_auth', 'none'));
}
$auth_type = isset($_SESSION['auth_type']) ? $_SESSION['auth_type'] : '';
?>
<option value="form"<?php echo $auth_type === 'form' || (no_auth($auth_type) && cryptAvailable()) ? ' selected="selected"' : '', cryptAvailable() ? '' : ' disabled="disabled"'; ?>><?php echo _t('install.auth.form'); ?></option>
- <option value="persona"<?php echo $auth_type === 'persona' ? ' selected="selected"' : ''; ?>><?php echo _t('install.auth.persona'); ?></option>
<option value="http_auth"<?php echo $auth_type === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : ''; ?>><?php echo _t('install.auth.http'); ?>(REMOTE_USER = '<?php echo httpAuthUser(); ?>')</option>
<option value="none"<?php echo $auth_type === 'none' || (no_auth($auth_type) && !cryptAvailable()) ? ' selected="selected"' : ''; ?>><?php echo _t('install.auth.none'); ?></option>
</select>
@@ -697,14 +668,6 @@ function printStep2() {
</div>
</div>
- <div class="form-group">
- <label class="group-name" for="mail_login"><?php echo _t('install.auth.email_persona'); ?></label>
- <div class="group-controls">
- <input type="email" id="mail_login" name="mail_login" value="<?php echo isset($_SESSION['mail_login']) ? $_SESSION['mail_login'] : ''; ?>" placeholder="alice@example.net" <?php echo $auth_type === 'persona' ? ' required="required"' : ''; ?> tabindex="6"/>
- <noscript><b><?php echo _t('gen.js.should_be_activated'); ?></b></noscript>
- </div>
- </div>
-
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important" tabindex="7" ><?php echo _t('gen.action.submit'); ?></button>