Update of /home/spip-cvs/spip/ecrire
In directory alan:/tmp/cvs-serv22078/ecrire
Modified Files:
controle_petition.php3 inc_cron.php3
Log Message:
- bug sur les squelettes sans boucles (Pierre Andrews)
- controle_petition invalide les pages des articles correspondant
- loger la taille du cache meme sans quota
Index: controle_petition.php3
RCS file: /home/spip-cvs/spip/ecrire/controle_petition.php3,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- controle_petition.php3 3 Dec 2003 23:04:04 -0000 1.18
+++ controle_petition.php3 22 Aug 2004 21:03:04 -0000 1.19
@@ -98,6 +98,14 @@
$result_forum = spip_query($query_forum);
}
+ // Invalider les articles correspondant
+ if ($id_signature = ($add_petition?$add_petition:$supp_petition)) {
+ include_ecrire('inc_invalideur.php3');
+ list ($id_article) = spip_fetch_array(spip_query("SELECT id_article
+ FROM spip_signatures WHERE id_signature=$id_signature"));
+ suivre_invalideur("id='id_article/$id_article'");
+ }
+
if (!$debut) $debut = 0;
if ($id_article) {
Index: inc_cron.php3
RCS file: /home/spip-cvs/spip/ecrire/inc_cron.php3,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- inc_cron.php3 22 Aug 2004 19:45:45 -0000 1.13
+++ inc_cron.php3 22 Aug 2004 21:03:04 -0000 1.14
@@ -152,16 +152,18 @@
//
// En cas de quota sur le CACHE/, nettoyer les fichiers les plus vieux
//
- global $quota_cache;
- if ($quota_cache > 0)
- if ($t - lire_meta('quota_cache_vider') > 3600) {
+ if (($t - lire_meta('quota_cache_vider') > 3600)
+ AND timeout('quota_cache_vider')) {
ecrire_meta('quota_cache_vider', $t);
ecrire_metas();
- if ($q = spip_query("SELECT SUM(taille) FROM spip_caches WHERE type='t'"))
- list ($total_cache) = spip_fetch_array($q);
+ list ($total_cache) = spip_fetch_array(spip_query("SELECT SUM(taille)
+ FROM spip_caches WHERE type='t'"));
+ spip_log("Taille du CACHE: $total_cache octets");
+
+ global $quota_cache;
$total_cache -= $quota_cache*1024*1024;
- if ($total_cache > 0) {
+ if ($quota_cache > 0 AND $total_cache > 0) {
$q = spip_query("SELECT id, taille FROM spip_caches ORDER BY id");
while ($r = spip_fetch_array($q)
AND ($total_cache > $taille_supprimee)) {