aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-05-12 23:33:58 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-05-12 23:33:58 +0200
commitaf8960b8b3be3c78573d0319a8a537083fae2d4d (patch)
tree7be93d33b2f758fa910e6096d878064fdfabcc86
parent1914ce9207a95f5b5ed88e226aa8999df79f67e6 (diff)
Move default configuration files
https://github.com/FreshRSS/FreshRSS/issues/1531
-rw-r--r--README.fr.md2
-rw-r--r--README.md2
-rw-r--r--app/FreshRSS.php2
-rw-r--r--app/install.php4
-rw-r--r--cli/_cli.php2
-rw-r--r--config-user.default.php (renamed from data/users/_/config.default.php)0
-rw-r--r--config.default.php (renamed from data/config.default.php)0
-rw-r--r--lib/Minz/FrontController.php2
-rw-r--r--lib/lib_install.php4
-rw-r--r--lib/lib_rss.php2
-rw-r--r--p/api/greader.php2
-rw-r--r--p/api/index.php2
-rw-r--r--p/api/pshb.php6
13 files changed, 15 insertions, 15 deletions
diff --git a/README.fr.md b/README.fr.md
index 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
* [![DP deploy](https://raw.githubusercontent.com/DFabric/DPlatform-ShellCore/gh-pages/img/deploy.png)](https://dfabric.github.io/DPlatform-ShellCore)
diff --git a/README.md b/README.md
index 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
* [![Install on Cloudron](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=org.freshrss.cloudronapp)
diff --git a/app/FreshRSS.php b/app/FreshRSS.php
index 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.php
index ebfffa47d..9e474ca73 100644
--- a/app/install.php
+++ b/app/install.php
@@ -88,13 +88,13 @@ function saveStep1() {
// First, we try to get previous configurations
Minz_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 vars
diff --git a/cli/_cli.php b/cli/_cli.php
index 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.php
index f28ef9724..f28ef9724 100644
--- a/data/users/_/config.default.php
+++ b/config-user.default.php
diff --git a/data/config.default.php b/config.default.php
index 748df1884..748df1884 100644
--- a/data/config.default.php
+++ b/config.default.php
diff --git a/lib/Minz/FrontController.php b/lib/Minz/FrontController.php
index 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.php
index 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.php
index 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.php
index 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.php
index 3ab4e02b3..580c90255 100644
--- a/p/api/index.php
+++ b/p/api/index.php
@@ -16,7 +16,7 @@
<dd><?php
require('../../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.php
index 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/init
FreshRSS_Context::init();
list($updated_feeds, $feed, $nb_new_articles) = FreshRSS_feed_Controller::actualizeFeed(0, $self, false, $simplePie);