inc_version.php3 spip_style.php3 1.392 1.99 1.393 1.100

Update of /home/spip-cvs/spip/ecrire
In directory alan:/tmp/cvs-serv9340/ecrire

Modified Files:
  inc_version.php3 spip_style.php3
Log Message:
amélioration des entetes et déclenchement par spip_style.php3 des taches de fond

Index: spip_style.php3

RCS file: /home/spip-cvs/spip/ecrire/spip_style.php3,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- spip_style.php3 20 Oct 2004 22:16:22 -0000 1.99
+++ spip_style.php3 24 Oct 2004 20:07:37 -0000 1.100
@@ -1,6 +1,13 @@
<?php
   include("inc_version.php3");

+ // En-tetes
+ $lastmodified = @filemtime("spip_style.php3");
+ $headers_only = http_last_modified($lastmodified, time() + 24 * 3600);
+ @Header ("Content-Type: text/css");
+
+if (!$headers_only) {
+
   // parano XSS
   eregi("^([#0-9a-z]*).*-([#0-9a-z]*).*-([0-9a-z]*).*-([0-9a-z]*).*", "$couleur_claire-$couleur_foncee-$left-$right", $regs);
   list (,$couleur_claire,$couleur_foncee,$left,$right) = $regs;
@@ -10,13 +17,6 @@
   if ($left == 'left') $_rtl = "";
   else $_rtl = "_rtl";
   
- // En-tetes
- $lastmodified = @filemtime("spip_style.php3");
- $headers_only = http_last_modified($lastmodified, time() + 24 * 3600);
- @Header ("Content-Type: text/css");
-
- if ($headers_only) exit;
-
   // Envoyer la feuille de style
   if (!isset($couleur_claire))
     $couleur_claire = "#EDF3FE";
@@ -70,8 +70,11 @@
   background-position: center bottom;
   float: none;
}
-.fondo { background-color: <?php echo $couleur_foncee; ?>; background-position: center bottom; float: none; color: #FFFFFF; }
-.fondf { background-color: #FFFFFF; border-style: solid ; border-width: 1; border-color: #E86519; color: #E86519; }
+.fondo { background-color: <?php echo $couleur_foncee; ?>;
+ background-position: center bottom; float: none; color: #FFFFFF;
+}
+.fondf { background-color: #FFFFFF; border-style: solid ; border-width: 1; border-color: #E86519; color: #E86519;
+}
.maj-debut:first-letter { text-transform: uppercase; }

@@ -550,8 +553,12 @@
  */

.fondgris { cursor: pointer; padding: 4px; margin: 1px; }
-.fondgrison { cursor: pointer; padding: 3px; margin: 1px; border: 1px dashed #999999; background-color: #e4e4e4; }
-.fondgrison2 { cursor: pointer; padding: 3px; margin: 1px; border: 1px dashed #999999; background-color: white; }
+.fondgrison {
+ cursor: pointer; padding: 3px; margin: 1px; border: 1px dashed #999999; background-color: #e4e4e4;
+}
+.fondgrison2 {
+ cursor: pointer; padding: 3px; margin: 1px; border: 1px dashed #999999; background-color: white;
+}
.bouton36gris {
   padding: 6px;
   margin-top: 2px;
@@ -625,7 +632,9 @@
.iconeoff {
   padding: 3px; margin: 1px; border: 1px dashed #aaaaaa; background-color: #f0f0f0;
}
-.iconeon { cursor: pointer; padding: 3px; margin: 1px; border-right: solid 1px white; border-bottom: solid 1px white; border-left: solid 1px #666666; border-top: solid 1px #666666; background-color: #eeeeee; }
+.iconeon {
+ cursor: pointer; padding: 3px; margin: 1px; border-right: solid 1px white; border-bottom: solid 1px white; border-left: solid 1px #666666; border-top: solid 1px #666666; background-color: #eeeeee;
+}
.iconedanger { padding: 3px; margin: 1px; border: 1px dashed black; background: url(img_pack/rayures-sup.gif);}

/* Raccourcis pour les polices (utile pour les tableaux) */
@@ -1251,7 +1260,9 @@
   padding-<?php echo $right; ?>: 10px;
   border-bottom: 1px solid;
}
-a.spip_note {background-color:#eeeeee;}
+a.spip_note {
+ background-color:#eeeeee;
+}
a.spip_url {}
a.spip_glossaire:hover {text-decoration: underline overline;}

@@ -1305,8 +1316,12 @@
   font-weight: bold;
   font-size: 9px;
}
-a.boutonlien:hover {color:#454545; text-decoration: none;}
-a.boutonlien {color:#808080; text-decoration: none;}
+a.boutonlien:hover {
+ color:#454545; text-decoration: none;
+}
+a.boutonlien {
+ color:#808080; text-decoration: none;
+}

a.triangle_block {
   margin-top: -3px;
@@ -1345,5 +1360,7 @@
   padding: 1px;
   text-align: left;
   vertical-align: center;
-}
-
+ }
+<?php }
+taches_de_fond();
+?>

Index: inc_version.php3

RCS file: /home/spip-cvs/spip/ecrire/inc_version.php3,v
retrieving revision 1.392
retrieving revision 1.393
diff -u -d -r1.392 -r1.393
--- inc_version.php3 23 Oct 2004 10:12:42 -0000 1.392
+++ inc_version.php3 24 Oct 2004 20:07:37 -0000 1.393
@@ -1141,17 +1141,16 @@
   }
}

-// Gestion des taches de fond ? toutes les 5 secondes
-// (on mettra 30 s quand on aura prevu la preemption par une image-cron)
function taches_de_fond() {
   verifier_htaccess(_DIR_SESSIONS);
   if (!@file_exists(_FILE_CRON_LOCK)
- OR (time() - @filemtime(_FILE_CRON_LOCK) > 5)) {
+ OR (time() - @filemtime(_FILE_CRON_LOCK) > 30)) {

     // Si MySQL est out, laisser souffler
     if (!@file_exists(_FILE_MYSQL_OUT)
     OR (time() - @filemtime(_FILE_MYSQL_OUT) > 300)) {
       include_ecrire('inc_cron.php3');
+# spip_log($GLOBALS['PHP_SELF'] . ": taches de fond");
       spip_cron();
     }
   }
@@ -1176,7 +1175,6 @@
// '<object id="mathplayer" classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987">'."\n".'</object>'."\n";
// '<'.'?import namespace="m" implementation="#mathplayer"?'.'>'."\n";

- $dir = ($GLOBALS[‹ spip_lang_rtl ›] ? ‹ rtl › : ‹ ltr ›);
   $base=lire_meta(« adresse_site »);
   if (!$base)
     $base = dirname($GLOBALS[‹ HTTP_SERVERS_VARS ›][‹ SCRIPT_NAME ›]);
@@ -1185,8 +1183,8 @@
   if (!$charset = lire_meta(‹ charset ›)) $charset = ‹ utf-8 ›;
   @Header(« Content-Type: text/html; charset=$charset »);
   return « <!DOCTYPE HTML PUBLIC ‹ -//W3C//DTD HTML 4.01 Transitional//EN › ‹ http://www.w3.org/TR/html4/loose.dtd ›>\n » .
- « <html dir=’$dir’>\n » .
- « <head dir=’$dir’>\n » .
+ « <html lang=’ ».$GLOBALS[‹ spip_lang ›]."’ dir=’".($GLOBALS[‹ spip_lang_rtl ›] ? ‹ rtl › : ‹ ltr ›)."’>\n" .
+ « <head>\n » .
# « <base href=’$base’ />\n » . # + tard
     « <title>$title</title>\n » .
     « <meta http-equiv=‹ Content-Type › content=‹ text/html; charset=$charset ›>\n »;