From a76e5bd1c65354dbdc9793179369ef0903d03762 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 1 Feb 2014 14:07:23 +0100 Subject: C'est parti pour la 0.8-dev --- constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'constants.php') diff --git a/constants.php b/constants.php index 2eba868b2..a7c96f47b 100644 --- a/constants.php +++ b/constants.php @@ -1,5 +1,5 @@ Date: Tue, 11 Feb 2014 21:48:10 +0100 Subject: Mutex par flux pour les actualisations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contribue à https://github.com/marienfressinaud/FreshRSS/issues/351 Nouvelle constante TMP_PATH comme répertoire pour stocker des fichiers temporaires (si possible en mémoire et non sur disque, tel tmpfs pour /tmp sur certaines distributions Linux) Requiert PHP 5.2.1+ (contre 5.2.0 auparavant) pour le `sys_get_temp_dir()` --- README.md | 2 +- app/Controllers/feedController.php | 5 +++++ app/Models/Feed.php | 18 ++++++++++++++++++ app/actualize_script.php | 19 ------------------- constants.php | 2 ++ p/i/install.php | 5 +++-- 6 files changed, 29 insertions(+), 22 deletions(-) (limited to 'constants.php') diff --git a/README.md b/README.md index 247d08799..1ed6d8f82 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Privilégiez pour cela des demandes sur GitHub * Serveur modeste, par exemple sous Linux ou Windows * Fonctionne même sur un Raspberry Pi avec des temps de réponse < 1s (testé sur 150 flux, 22k articles, soit 32Mo de données partiellement compressées) * Serveur Web Apache2 ou Nginx (non testé sur les autres) -* PHP 5.2+ (PHP 5.3.7+ recommandé) +* PHP 5.2.1+ (PHP 5.3.7+ recommandé) * Requis : [PDO_MySQL](http://php.net/pdo-mysql), [cURL](http://php.net/curl), [LibXML](http://php.net/xml), [PCRE](http://php.net/pcre), [ctype](http://php.net/ctype) * Recommandés : [JSON](http://php.net/json), [zlib](http://php.net/zlib), [mbstring](http://php.net/mbstring), [iconv](http://php.net/iconv) * MySQL 5.0.3+ (ou SQLite 3.7.4+ à venir) diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 55e8f76cf..61bfc5919 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -189,6 +189,10 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $flux_update = 0; $is_read = $this->view->conf->mark_when['reception'] ? 1 : 0; foreach ($feeds as $feed) { + if (!$feed->lock()) { + Minz_Log::record('Feed already being actualized: ' . $feed->url(), Minz_Log::NOTICE); + continue; + } try { $url = $feed->url(); $feedHistory = $feed->keepHistory(); @@ -251,6 +255,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $feedDAO->updateLastUpdate ($feed->id (), 1); } + $feed->unlock(); unset($feed); // On arrête à 10 flux pour ne pas surcharger le serveur diff --git a/app/Models/Feed.php b/app/Models/Feed.php index e94ae2b3a..73f9c32fb 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -281,4 +281,22 @@ class FreshRSS_Feed extends Minz_Model { $this->entries = $entries; } + + function lock() { + $lock = TMP_PATH . '/' . md5(Minz_Configuration::salt() . $this->url) . '.freshrss.lock'; + if (file_exists($lock) && ((time() - @filemtime($lock)) > 3600)) { + @unlink($lock); + } + if (($handle = @fopen($lock, 'x')) === false) { + return false; + } + //register_shutdown_function('unlink', $lock); + @fclose($handle); + return true; + } + + function unlock() { + $lock = TMP_PATH . '/' . md5(Minz_Configuration::salt() . $this->url) . '.freshrss.lock'; + @unlink($lock); + } } diff --git a/app/actualize_script.php b/app/actualize_script.php index bef9bd218..8d81e0189 100755 --- a/app/actualize_script.php +++ b/app/actualize_script.php @@ -1,24 +1,5 @@ -$lock = DATA_PATH . '/actualize.lock.txt'; -if (file_exists($lock) && ((time() - @filemtime($lock)) > 3600)) { - @unlink($lock); -} -if (($handle = @fopen($lock, 'x')) === false) { - syslog(LOG_NOTICE, 'FreshRSS actualize already running?'); - if (defined('STDERR')) { - fwrite(STDERR, 'FreshRSS actualize already running?' . "\n"); - } - echo 'FreshRSS actualize already running?', "\n"; - return; -} -register_shutdown_function('unlink', $lock); -//Could use http://php.net/function.pcntl-signal.php to catch interruptions -@fclose($handle); -// - require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader session_cache_limiter(''); diff --git a/constants.php b/constants.php index a7c96f47b..4818f1565 100644 --- a/constants.php +++ b/constants.php @@ -15,3 +15,5 @@ define('FRESHRSS_PATH', dirname(__FILE__)); define('LIB_PATH', FRESHRSS_PATH . '/lib'); define('APP_PATH', FRESHRSS_PATH . '/app'); + +define('TMP_PATH', sys_get_temp_dir()); diff --git a/p/i/install.php b/p/i/install.php index bb49e3fdb..4b0b1d194 100644 --- a/p/i/install.php +++ b/p/i/install.php @@ -548,8 +548,9 @@ function checkStep0 () { 'all' => $language ? 'ok' : 'ko' ); } + function checkStep1 () { - $php = version_compare (PHP_VERSION, '5.2.0') >= 0; + $php = version_compare (PHP_VERSION, '5.2.1') >= 0; $minz = file_exists (LIB_PATH . '/Minz'); $curl = extension_loaded ('curl'); $pdo = extension_loaded ('pdo_mysql'); @@ -721,7 +722,7 @@ function printStep1 () {

-

+

-- cgit v1.2.3 From 04da549e2e52980ccc72689c32793222be76279d Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 19 Feb 2014 19:54:50 +0100 Subject: Switch TMP_PATH to DATA_PATH for the 0.7.1 See https://github.com/marienfressinaud/FreshRSS/issues/420#issuecomment-35423003 --- constants.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'constants.php') diff --git a/constants.php b/constants.php index 4818f1565..a140d0e74 100644 --- a/constants.php +++ b/constants.php @@ -16,4 +16,5 @@ define('FRESHRSS_PATH', dirname(__FILE__)); define('LIB_PATH', FRESHRSS_PATH . '/lib'); define('APP_PATH', FRESHRSS_PATH . '/app'); -define('TMP_PATH', sys_get_temp_dir()); +//define('TMP_PATH', sys_get_temp_dir()); // need more tests so... +define('TMP_PATH', DATA_PATH); // ... we use DATA_PATH for the 0.7.1 -- cgit v1.2.3 From 7e949d50320317b5c3b5a2da2bdaf324e794b2f7 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 19 Feb 2014 20:50:27 +0100 Subject: Version 0.7.1 --- CHANGELOG | 26 +++++++++++++++++++++++++- README.md | 4 ++-- constants.php | 2 +- 3 files changed, 28 insertions(+), 4 deletions(-) (limited to 'constants.php') diff --git a/CHANGELOG b/CHANGELOG index 138f7be21..5be992da5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,9 +1,33 @@ # Journal des modifications -## 2014-0x-xx FreshRSS 0.8 +## 2014-02-19 FreshRSS 0.7.1 * Mise à jour des flux plus rapide grâce à une meilleure utilisation du cache * Utilisation d’une signature MD5 du contenu intéressant pour les flux n’implémentant pas les requêtes conditionnelles +* Modification des raccourcis + * "s" partage directement si un seul moyen de partage + * Moyens de partage accessibles par "1", "2", "3", etc. + * Premier article : Home ; Dernier article : End + * Ajout du déplacement au sein des catégories / flux (via modificateurs shift et alt) +* UI + * Séparation des descriptions des raccourcis par groupes + * Revue rapide de la page de connexion + * Amélioration de l'affichage des notifications sur mobile +* Revue du système de rafraîchissement des flux + * Meilleure gestion de la file de flux à rafraîchir en JSON + * Rafraîchissement uniquement pour les flux non rafraîchis récemment + * Possibilité donnée aux anonymes de rafraîchir les flux +* SimplePie + * Mise à jour de la lib + * Corrige fuite de mémoire + * Meilleure tolérance aux flux invalides +* Corrections divers + * Ne déplie plus l'article lors du clic sur l'icône lien externe + * Ne boucle plus à la fin de la navigation dans les articles + * Suppression du champ category.color inutile + * Corrige bug redirection infinie (Persona) + * Amélioration vérification de la requête POST + * Ajout d'un verrou lorsqu'une action mark_read ou mark_favorite est en cours ## 2014-01-29 FreshRSS 0.7 diff --git a/README.md b/README.md index 1ed6d8f82..fb950da14 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ Il permet de gérer plusieurs utilisateurs, et dispose d’un mode de lecture an * Site officiel : http://freshrss.org * Démo : http://demo.freshrss.org/ * Développeur : Marien Fressinaud -* Version actuelle : 0.8-dev -* Date de publication 2014-0x-xx +* Version actuelle : 0.7.1 +* Date de publication 2014-02-19 * License [GNU AGPL 3](http://www.gnu.org/licenses/agpl-3.0.html) ![Logo de FreshRSS](http://marienfressinaud.fr/data/images/freshrss/freshrss_title.png) diff --git a/constants.php b/constants.php index a140d0e74..6af1c5738 100644 --- a/constants.php +++ b/constants.php @@ -1,5 +1,5 @@ Date: Fri, 21 Feb 2014 10:01:40 +0100 Subject: CHANGELOG 0.7.1 + TMP_PATH 0.8 --- CHANGELOG | 27 +++++++++++++++++++++++++++ constants.php | 3 +-- 2 files changed, 28 insertions(+), 2 deletions(-) (limited to 'constants.php') diff --git a/CHANGELOG b/CHANGELOG index 138f7be21..73a8a16c6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,8 +2,35 @@ ## 2014-0x-xx FreshRSS 0.8 + +## 2014-02-19 FreshRSS 0.7.1 + * Mise à jour des flux plus rapide grâce à une meilleure utilisation du cache * Utilisation d’une signature MD5 du contenu intéressant pour les flux n’implémentant pas les requêtes conditionnelles +* Modification des raccourcis + * "s" partage directement si un seul moyen de partage + * Moyens de partage accessibles par "1", "2", "3", etc. + * Premier article : Home ; Dernier article : End + * Ajout du déplacement au sein des catégories / flux (via modificateurs shift et alt) +* UI + * Séparation des descriptions des raccourcis par groupes + * Revue rapide de la page de connexion + * Amélioration de l'affichage des notifications sur mobile +* Revue du système de rafraîchissement des flux + * Meilleure gestion de la file de flux à rafraîchir en JSON + * Rafraîchissement uniquement pour les flux non rafraîchis récemment + * Possibilité donnée aux anonymes de rafraîchir les flux +* SimplePie + * Mise à jour de la lib + * Corrige fuite de mémoire + * Meilleure tolérance aux flux invalides +* Corrections divers + * Ne déplie plus l'article lors du clic sur l'icône lien externe + * Ne boucle plus à la fin de la navigation dans les articles + * Suppression du champ category.color inutile + * Corrige bug redirection infinie (Persona) + * Amélioration vérification de la requête POST + * Ajout d'un verrou lorsqu'une action mark_read ou mark_favorite est en cours ## 2014-01-29 FreshRSS 0.7 diff --git a/constants.php b/constants.php index a140d0e74..4818f1565 100644 --- a/constants.php +++ b/constants.php @@ -16,5 +16,4 @@ define('FRESHRSS_PATH', dirname(__FILE__)); define('LIB_PATH', FRESHRSS_PATH . '/lib'); define('APP_PATH', FRESHRSS_PATH . '/app'); -//define('TMP_PATH', sys_get_temp_dir()); // need more tests so... -define('TMP_PATH', DATA_PATH); // ... we use DATA_PATH for the 0.7.1 +define('TMP_PATH', sys_get_temp_dir()); -- cgit v1.2.3 From fd829d75676a07a13a635db037efa92e364026a7 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 24 Mar 2014 19:16:09 +0100 Subject: Constant to enable PHP compression https://github.com/marienfressinaud/FreshRSS/issues/303#issuecomment-38477994 --- constants.php | 3 +++ p/i/index.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'constants.php') diff --git a/constants.php b/constants.php index 4818f1565..e32b8cbc3 100644 --- a/constants.php +++ b/constants.php @@ -2,6 +2,9 @@ define('FRESHRSS_VERSION', '0.8-dev'); define('FRESHRSS_WEBSITE', 'http://freshrss.org'); +// PHP text output compression http://php.net/ob_gzhandler (better to do it at Web server level) +define('PHP_COMPRESSION', false); + // Constantes de chemins define('FRESHRSS_PATH', dirname(__FILE__)); diff --git a/p/i/index.php b/p/i/index.php index 187bbabe8..4afffb3dd 100755 --- a/p/i/index.php +++ b/p/i/index.php @@ -35,7 +35,7 @@ if (file_exists ('install.php')) { @filemtime(LOG_PATH . '/' . $currentUser . '.log'), @filemtime(DATA_PATH . '/config.php') ); - if (httpConditional($dateLastModification, 0, 0, false, false, true)) { + if (httpConditional($dateLastModification, 0, 0, false, PHP_COMPRESSION, true)) { exit(); //No need to send anything } } -- cgit v1.2.3 From 4580e177e1986f50c71abb26e90800dc46028693 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Tue, 13 May 2014 19:33:01 +0200 Subject: Fix version numbers Due to the last pull request --- CHANGELOG | 2 +- README.md | 4 ++-- constants.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'constants.php') diff --git a/CHANGELOG b/CHANGELOG index 372ec4b8d..0893283a5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,6 @@ # Journal des modifications -## 2014-02-19 FreshRSS 0.7.1 +## 2014-0x-xx FreshRSS 0.8 * API compatible with Google Reader API level 2 * FreshRSS can now be used from e.g.: diff --git a/README.md b/README.md index a1889bf5d..2003b6a9d 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ Il permet de gérer plusieurs utilisateurs, et dispose d’un mode de lecture an * Site officiel : http://freshrss.org * Démo : http://demo.freshrss.org/ * Développeur : Marien Fressinaud -* Version actuelle : 0.7.1 -* Date de publication 2014-02-19 +* Version actuelle : 0.8-dev +* Date de publication 2014-0x-xx * License [GNU AGPL 3](http://www.gnu.org/licenses/agpl-3.0.html) ![Logo de FreshRSS](http://marienfressinaud.fr/data/images/freshrss/freshrss_title.png) diff --git a/constants.php b/constants.php index 849a5ada3..e32b8cbc3 100644 --- a/constants.php +++ b/constants.php @@ -1,5 +1,5 @@