A free, self-hostable news aggregator…
Move default configuration files
Alexandre Alapetiteaf8960b8b3be
diff --git a/README.fr.md b/README.fr.mdindex 5e78ad803..b7a28fd91 100644--- a/README.fr.md+++ b/README.fr.md@@ -52,7 +52,7 @@ Nous sommes une communauté amicale.4. Accédez à FreshRSS à travers votre navigateur Web et suivez les instructions d’installation* ou utilisez [l’interface en ligne de commande](./cli/README.md)5. Tout devrait fonctionner :) En cas de problème, n’hésitez pas à [nous contacter](https://github.com/FreshRSS/FreshRSS/issues).-6. Des paramètres de configuration avancée peuvent être accédés depuis [config.php](./data/config.default.php).+6. Des paramètres de configuration avancée peuvent être vues dans [config.default.php](./config.default.php) et modifiées dans `data/config.php`.## Installation automatisée* [](https://dfabric.github.io/DPlatform-ShellCore)diff --git a/README.md b/README.mdindex 4c50acdd7..8e0d8bac9 100644--- a/README.md+++ b/README.md@@ -52,7 +52,7 @@ We are a friendly community.4. Access FreshRSS with your browser and follow the installation process* or use the [Command-Line Interface](./cli/README.md)5. Everything should be working :) If you encounter any problem, feel free [contact us](https://github.com/FreshRSS/FreshRSS/issues).-6. Advanced configuration settings can be seen in [config.php](./data/config.default.php).+6. Advanced configuration settings can be seen in [config.default.php](./config.default.php) and modified in `data/config.php`.## Automated install* [](https://cloudron.io/button.html?app=org.freshrss.cloudronapp)diff --git a/app/FreshRSS.php b/app/FreshRSS.phpindex e4caf23d1..563393c90 100644--- a/app/FreshRSS.php+++ b/app/FreshRSS.php@@ -41,7 +41,7 @@ class FreshRSS extends Minz_FrontController {$current_user = Minz_Session::param('currentUser', '_');Minz_Configuration::register('user',join_path(USERS_PATH, $current_user, 'config.php'),- join_path(USERS_PATH, '_', 'config.default.php'),+ join_path(FRESHRSS_PATH, 'config-user.default.php'),$configuration_setter);// Finish to initialize the other FreshRSS / Minz components.diff --git a/app/install.php b/app/install.phpindex ebfffa47d..9e474ca73 100644--- a/app/install.php+++ b/app/install.php@@ -88,13 +88,13 @@ function saveStep1() {// First, we try to get previous configurationsMinz_Configuration::register('system',join_path(DATA_PATH, 'config.php'),- join_path(DATA_PATH, 'config.default.php'));+ join_path(FRESHRSS_PATH, 'config.default.php'));$system_conf = Minz_Configuration::get('system');$current_user = $system_conf->default_user;Minz_Configuration::register('user',join_path(USERS_PATH, $current_user, 'config.php'),- join_path(USERS_PATH, '_', 'config.default.php'));+ join_path(FRESHRSS_PATH, 'config-user.default.php'));$user_conf = Minz_Configuration::get('user');// Then, we set $_SESSION varsdiff --git a/cli/_cli.php b/cli/_cli.phpindex f5e36eabc..1b26ea738 100644--- a/cli/_cli.php+++ b/cli/_cli.php@@ -8,7 +8,7 @@ require(LIB_PATH . '/lib_rss.php');Minz_Configuration::register('system',DATA_PATH . '/config.php',- DATA_PATH . '/config.default.php');+ FRESHRSS_PATH . '/config.default.php');FreshRSS_Context::$system_conf = Minz_Configuration::get('system');Minz_Translate::init('en');diff --git a/data/users/_/config.default.php b/config-user.default.phpsimilarity index 100%rename from data/users/_/config.default.phprename to config-user.default.phpdiff --git a/data/config.default.php b/config.default.phpsimilarity index 100%rename from data/config.default.phprename to config.default.phpdiff --git a/lib/Minz/FrontController.php b/lib/Minz/FrontController.phpindex f9eff3db6..952d983c9 100644--- a/lib/Minz/FrontController.php+++ b/lib/Minz/FrontController.php@@ -33,7 +33,7 @@ class Minz_FrontController {try {Minz_Configuration::register('system',DATA_PATH . '/config.php',- DATA_PATH . '/config.default.php');+ FRESHRSS_PATH . '/config.default.php');$this->setReporting();Minz_Request::init();diff --git a/lib/lib_install.php b/lib/lib_install.phpindex c625a670a..bf81c15b4 100644--- a/lib/lib_install.php+++ b/lib/lib_install.php@@ -2,8 +2,8 @@define('BCRYPT_COST', 9);-Minz_Configuration::register('default_system', join_path(DATA_PATH, 'config.default.php'));-Minz_Configuration::register('default_user', join_path(USERS_PATH, '_', 'config.default.php'));+Minz_Configuration::register('default_system', join_path(FRESHRSS_PATH, 'config.default.php'));+Minz_Configuration::register('default_user', join_path(FRESHRSS_PATH, 'config-user.default.php'));function checkRequirements($dbType = '') {$php = version_compare(PHP_VERSION, '5.3.3') >= 0;diff --git a/lib/lib_rss.php b/lib/lib_rss.phpindex 247cc707b..1bf387712 100644--- a/lib/lib_rss.php+++ b/lib/lib_rss.php@@ -341,7 +341,7 @@ function get_user_configuration($username) {try {Minz_Configuration::register($namespace,join_path(USERS_PATH, $username, 'config.php'),- join_path(USERS_PATH, '_', 'config.default.php'));+ join_path(FRESHRSS_PATH, 'config-user.default.php'));} catch (Minz_ConfigurationNamespaceException $e) {// namespace already exists, do nothing.} catch (Minz_FileNotExistException $e) {diff --git a/p/api/greader.php b/p/api/greader.phpindex 01eca6d4f..e1f4202a7 100644--- a/p/api/greader.php+++ b/p/api/greader.php@@ -695,7 +695,7 @@ $pathInfos = explode('/', $pathInfo);Minz_Configuration::register('system',DATA_PATH . '/config.php',- DATA_PATH . '/config.default.php');+ FRESHRSS_PATH . '/config.default.php');FreshRSS_Context::$system_conf = Minz_Configuration::get('system');if (!FreshRSS_Context::$system_conf->api_enabled) {serviceUnavailable();diff --git a/p/api/index.php b/p/api/index.phpindex 3ab4e02b3..580c90255 100644--- a/p/api/index.php+++ b/p/api/index.php@@ -16,7 +16,7 @@<dd><?phprequire('../../constants.php');require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader-Minz_Configuration::register('system', DATA_PATH . '/config.php', DATA_PATH . '/config.default.php');+Minz_Configuration::register('system', DATA_PATH . '/config.php', FRESHRSS_PATH . '/config.default.php');echo Minz_Url::display('/api/greader.php', 'html', true);?></dd></dl>diff --git a/p/api/pshb.php b/p/api/pshb.phpindex a0b64ede1..4b546908a 100644--- a/p/api/pshb.php+++ b/p/api/pshb.php@@ -60,7 +60,7 @@ if (empty($users)) {unlink('../../keys/' . $key . '.txt');Minz_Configuration::register('system',DATA_PATH . '/config.php',- DATA_PATH . '/config.default.php');+ FRESHRSS_PATH . '/config.default.php');FreshRSS_Context::$system_conf = Minz_Configuration::get('system');$feed = new FreshRSS_Feed($url);$feed->pubSubHubbubSubscribe(false);@@ -101,7 +101,7 @@ if ($ORIGINAL_INPUT == '') {die('Missing XML payload!');}-Minz_Configuration::register('system', DATA_PATH . '/config.php', DATA_PATH . '/config.default.php');+Minz_Configuration::register('system', DATA_PATH . '/config.php', FRESHRSS_PATH . '/config.default.php');$system_conf = Minz_Configuration::get('system');$system_conf->auth_type = 'none'; // avoid necessity to be logged in (not saved!)@@ -133,7 +133,7 @@ foreach ($users as $userFilename) {Minz_Session::_param('currentUser', $username);Minz_Configuration::register('user',join_path(USERS_PATH, $username, 'config.php'),- join_path(USERS_PATH, '_', 'config.default.php'));+ join_path(FRESHRSS_PATH, 'config-user.default.php'));new Minz_ModelPdo($username); //TODO: FIXME: Quick-fix while waiting for a better FreshRSS() constructor/initFreshRSS_Context::init();list($updated_feeds, $feed, $nb_new_articles) = FreshRSS_feed_Controller::actualizeFeed(0, $self, false, $simplePie);