print_error("Error: config.php already exists in tt-rss directory; aborting.");
exit;
}
}
@ -344,34 +374,62 @@
print "<h2>Generated configuration file</h2>";
print "<p>Copy following text and save as <b>config.php</b> in tt-rss main directory. It is suggested to read through the file to the end in case you need any options changed fom default values.</p>";
print "<p>Copy following text and save as <code>config.php</code> in tt-rss main directory. It is suggested to read through the file to the end in case you need any options changed fom default values.</p>";
print "<p>After copying the file, you will be able to login with default username and password combination: <code>admin</code> and <code>password</code>. Don't forget to change the password immediately!</p>"; ?>
foreach ($data as $line) {
if (preg_match("/define\('DB_TYPE'/", $line)) {
echo "\tdefine('DB_TYPE', '$DB_TYPE');\n";
} else if (preg_match("/define\('DB_HOST'/", $line)) {
echo "\tdefine('DB_HOST', '$DB_HOST');\n";
} else if (preg_match("/define\('DB_USER'/", $line)) {
echo "\tdefine('DB_USER', '$DB_USER');\n";
} else if (preg_match("/define\('DB_NAME'/", $line)) {
echo "\tdefine('DB_NAME', '$DB_NAME');\n";
} else if (preg_match("/define\('DB_PASS'/", $line)) {
echo "\tdefine('DB_PASS', '$DB_PASS');\n";
} else if (preg_match("/define\('DB_PORT'/", $line)) {
echo "\tdefine('DB_PORT', '$DB_PORT');\n";
} else if (preg_match("/define\('SELF_URL_PATH'/", $line)) {