Commit Graph

39 Commits

Author SHA1 Message Date
Marien Fressinaud
6dbe33c51e Don't hide errors in configuration
Fix https://github.com/FreshRSS/FreshRSS/issues/920
2015-07-29 07:59:05 +02:00
Marien Fressinaud
c1a44a8761 Load configuration by recursion
- Remove Minz_Configuration::$data_default
- Default values are loaded first in $data
- $data values are replaced by values from config file

Fix https://github.com/FreshRSS/FreshRSS/issues/923
2015-07-27 14:46:41 +02:00
Alexandre Alapetite
12081f7ba2 Quick fix cron actualization due to problematic FreshRSS constructor/init
https://github.com/FreshRSS/FreshRSS/issues/759
Suggestion: the static objects should be user-independent (or at least
with the possibility to be re-set), while the FreshRSS object and its
attributes should be user-dependent.
2015-01-20 23:29:04 +01:00
Marien Fressinaud
73023bc12b Merge branch 'dev' into 252-extensions
Conflicts:
	app/FreshRSS.php
	app/Models/Configuration.php
	app/views/index/index.phtml
	app/views/index/normal.phtml
	lib/Minz/Configuration.php
	lib/Minz/Translate.php
	lib/lib_rss.php
2015-01-08 14:18:32 +01:00
Marien Fressinaud
fb614ab80c Change way to call configuration setter.
- Add a support($key) method which return if the given key is supported by
  the setter.
- Change handle signature by adding a $data param which must be passed by
  reference.

See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-07 17:36:29 +01:00
Marien Fressinaud
7f12058fab Add a method to change the configuration setter
See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-07 16:09:24 +01:00
Marien Fressinaud
91e2d4936d Add support of configuration_setter
A configuration setter must implement only one method: `handle($key, $value)`.
Before setting a value in configuration, the setter will be called with this
method to check its validity.
If a setter has been assigned to a configuration object, it will be called for
each of its data so be careful to always return a value (or null if you want
to delete the key).

See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-07 15:57:27 +01:00
Marien Fressinaud
bd199c6170 If a conf param doesn't exist, log and return null
See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-07 10:48:47 +01:00
Marien Fressinaud
17a280230f Change Minz_Configuration::parseFile() in load()
See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-06 21:16:33 +01:00
Marien Fressinaud
51a71ec4b9 New configuration system (not working yet)
- Use only Minz_Configuration
- register() method to load a new configuration file
- get() to get a configuration
- new exceptions related to configuration
- fix a list configuration calls to have FRSS working

Current problems to resolve:

- How to handle configuration param verifications (i.e. check auth_type
  is a value from none, http_auth, persona or form)
- We must use $conf = Minz_Configuration::get('system'); $general_conf = $conf->general;
  to access global system configuration which is quite annoying. How to change that?

See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-05 16:54:16 +01:00
Marien Fressinaud
4c888590e6 Improve system/user types for extensions
- system extensions can only be managed by an administrator
- system extensions are loaded for all users (even if not logged)
- user extensions are loaded for logged users only
- system extensions loading is saved in global config.php file

See https://github.com/FreshRSS/FreshRSS/issues/252
2014-12-06 16:41:06 +01:00
Marien Fressinaud
86f69ca396 First draft for the new extension feature
- Only system extensions can be loaded for the moment by adding them in the config.php
  file.
- Remove previous system (it will be added properly in the new system in the next step).
2014-12-04 19:33:29 +01:00
Alexandre Alapetite
9f97f7df88 Ne pas rafraîchir les flux des utilisateurs non logués depuis x jours
https://github.com/marienfressinaud/FreshRSS/issues/681
Warning: needs some testing
2014-10-29 00:45:42 +01:00
Alexandre Alapetite
2e5d4d97c9 More limit options in config.php
See e.g. https://github.com/marienfressinaud/FreshRSS/issues/681
https://github.com/marienfressinaud/FreshRSS/issues/680
https://github.com/marienfressinaud/FreshRSS/issues/656
2014-10-28 22:29:55 +01:00
Alexandre Alapetite
c6f35ef51c Global limits for number of feeds and categories
New 'limits' sub-array in config.php with 'max_feeds' and
'max_categories'. If the values are < 0, then it is the default value
(16384).
https://github.com/marienfressinaud/FreshRSS/issues/680
2014-10-27 21:45:30 +01:00
Marien Fressinaud
6009990935 Introduce FreshRSS_Auth::hasAccess('admin')
Replace Minz_Configuration::isAdmin($user). FreshRSS_Auth::hasAccess() could
be extended to others scopes later.

See https://github.com/marienfressinaud/FreshRSS/issues/655
2014-10-07 10:16:38 +02:00
Alexandre Alapetite
d6f4141086 Preparation for SQLite
https://github.com/marienfressinaud/FreshRSS/issues/100
2014-07-03 21:26:30 +02:00
Alexandre Alapetite
c8aa451c76 Minz: remove url_rewriting
As suggested
https://github.com/marienfressinaud/FreshRSS/issues/163#issuecomment-38478669

At the same time, removes a bunch of (almost) dead code such as
Minz_Router (the few remaining lines being moved to Minz_FrontController
to avoid a class)

Contributes to https://github.com/marienfressinaud/FreshRSS/issues/303
2014-03-24 20:55:18 +01:00
Alexandre Alapetite
72ae58d455 Minz: remove Minz_Cache
https://github.com/marienfressinaud/FreshRSS/issues/163#issuecomment-37990319
https://github.com/marienfressinaud/FreshRSS/issues/303
2014-03-22 13:20:49 +01:00
Alexandre Alapetite
b07f9157b1 New unsafe autologin mode
https://github.com/marienfressinaud/FreshRSS/issues/440
2014-03-02 13:35:09 +01:00
Alexandre Alapetite
6dffb8706f Alpha version of Google Reader compatible API
https://github.com/marienfressinaud/FreshRSS/issues/13
Hardcoded passwords, no possibility to add/delete feeds or edit
categories yet.
2014-02-27 22:48:11 +01:00
Marien Fressinaud
4dd673157b Add possibility to anonymous to refresh feeds
Obviously, it's optional! (and deactivate by default)
Need some more tests?
See #351
2014-02-13 21:45:25 +01:00
Marien Fressinaud
a46ee26e35 Fallback config pour 0.7-beta 2014-01-25 23:03:53 +01:00
Marien Fressinaud
84c30445d4 Corrige bug initialisation environnement
L'environnement était toujours à SILENT et plus rien n'était loggué.
2014-01-25 22:50:38 +01:00
Alexandre Alapetite
41033768c3 Mode anonyme pour connexion avec formulaire
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/361
2014-01-18 01:00:17 +01:00
Alexandre Alapetite
d58886a937 Implémentation de l'indentification par mot de passe
Implémentation de
https://github.com/marienfressinaud/FreshRSS/issues/104
2014-01-12 03:10:31 +01:00
Alexandre Alapetite
8beb15460a Sauvegardes avec extension .bak.php pour plus de sécurité
Évite le téléchargement
2014-01-01 05:06:36 +01:00
Alexandre Alapetite
66229a5d71 Minz : bug avec OPcache de PHP 5.5+
Minz ne prenait pas en charge OPcache (cache PHP) http://php.net/opcache
activé par défaut depuis PHP5.5.
Ce fut un peu dur d'isoler ce bug :-/
Il faut penser à appeler opcache_invalidate avant de ré-utiliser un
fichier par include().
Aussi, le mécanisme de lock() n'est plus approprié ni nécessaire.
Pour FreshRSS, évite l'utilisation de ModelArray car il ne restait que
quelques lignes d'utiles, et évite un héritage + appel de classe, ce qui
est toujours ça de gagné.
2014-01-01 04:39:39 +01:00
Alexandre Alapetite
1ac09e7fe4 Multi-utilisateur fonctionnel en HTTP Auth
+ Possibilité d'ajout / suppression d'utilisateur (seulement par
l'administrateur)
+ Divers changements pour le mode multi-utilisateur
https://github.com/marienfressinaud/FreshRSS/issues/126
+ Minz : Renomme "sel_application" en "salt'
2013-12-31 02:59:07 +01:00
Alexandre Alapetite
bd5d7a7bcb Cache HTTP compatible multi-utilisateur
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126
2013-12-30 15:00:41 +01:00
Alexandre Alapetite
92efd68a3a Début de mode multi-utilisateur avec http_auth
+ Légère optimisation de Minz_View.
+ Encore plus de tests de bibliothèques dans install.php
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126 et
https://github.com/marienfressinaud/FreshRSS/issues/303
2013-12-30 01:03:32 +01:00
Alexandre Alapetite
220341b406 Implémente sélecteur de méthode d’authentification
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126
2013-12-29 02:12:46 +01:00
Alexandre Alapetite
96bdbafcea Refactorisation FreshRSS_Configuration
Implémente https://github.com/marienfressinaud/FreshRSS/issues/260
(évite les comparaisons de chaînes au profit des vrais booléens et
entiers)
Grosse simplification et réduction du code relatif à la configuration.
Supprime ConfigurationDAO.
Permet de simplifier considérablement configureController.
Évite de multiples copies des mêmes données en mémoire.
Évite de garder plusieurs versions de la configuration en mémoire
(auparavant : dans un tableau au niveau de ModelArray + au niveau de
FreshRSS_Configuration + en Session + des copies temporaires comme
ConfigurationDAO).
Ne stocke plus 'conf' en Session (n'était presque pas utilisé).
Évite de recharger plusieurs fois Translate inutilement.
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/303
2013-12-28 23:09:39 +01:00
Alexandre Alapetite
856d2c125b Suite nettoyage des types et chaînes
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/260
2013-12-28 18:07:16 +01:00
Alexandre Alapetite
9ac1496d63 Bouge anon_access dans config.php
L'accès anonyme n'est pas au niveau utilisateur mais au niveau global.
Bouge FreshRSS_Configuration::conf->anonAccess() qui était stocké dans
*_user.php vers Minz_Configuration::allowAnonymous() stocké dans
config.php
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126
+ autres optimisations
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/260
2013-12-28 13:54:52 +01:00
Alexandre Alapetite
3273fee15e Un peu de configuration utilisateur
Continue https://github.com/marienfressinaud/FreshRSS/issues/126
2013-12-28 00:04:34 +01:00
Alexandre Alapetite
574d37bddc Favicons compatibles multi-utilisateurs
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126
2013-12-26 19:58:17 +01:00
Alexandre Alapetite
415d7a5a71 config.php plutôt que application.ini
Implémente https://github.com/marienfressinaud/FreshRSS/issues/272
2013-12-22 16:08:24 +01:00
Alexandre Alapetite
4ee4f16ffe Problème de casse renommage répertoire 2013-12-15 11:24:14 +01:00