#!/usr/bin/php generateSalt(), 'db' => FreshRSS_Context::$system_conf->db, ); foreach ($params as $param) { $param = rtrim($param, ':'); if (isset($options[$param])) { $config[$param] = $options[$param] === false ? true : $options[$param]; } } if ((!empty($config['base_url'])) && server_is_public($config['base_url'])) { $config['pubsubhubbub_enabled'] = true; } foreach ($dBparams as $dBparam) { $dBparam = rtrim($dBparam, ':'); if (isset($options[$dBparam])) { $param = substr($dBparam, strlen('db-')); $config['db'][$param] = $options[$dBparam]; } } $requirements = checkRequirements($config['db']['type']); if ($requirements['all'] !== 'ok') { $message = 'FreshRSS install failed requirements:' . "\n"; foreach ($requirements as $requirement => $check) { if ($check !== 'ok' && !in_array($requirement, array('all', 'pdo', 'message'))) { $message .= '• ' . $requirement . "\n"; } } if (!empty($requirements['message'])) { $message .= '• ' . $requirements['message'] . "\n"; } fail($message); } if (!FreshRSS_user_Controller::checkUsername($options['default_user'])) { fail('FreshRSS invalid default username (must be ASCII alphanumeric): ' . $options['default_user']); } if (isset($options['auth_type']) && !in_array($options['auth_type'], array('form', 'http_auth', 'none'))) { fail('FreshRSS invalid authentication method (auth_type must be one of { form, http_auth, none }: ' . $options['auth_type']); } if (file_put_contents(join_path(DATA_PATH, 'config.php'), "