inc-calcul.php3 inc-chercher.php3 inc-public-global.php3 lagaffe.php3 1.113 1.5 1.145 1.7 1.114 1.6 1.146 1.8

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

Modified Files:
  inc-calcul.php3 inc-chercher.php3 inc-public-global.php3
  lagaffe.php3
Log Message:
@file_exists()

car certains hébergeurs envoient des wrning quand on teste un fichier inexistant (!!)

Index: inc-public-global.php3

RCS file: /home/spip-cvs/spip/inc-public-global.php3,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- inc-public-global.php3 21 Sep 2004 15:35:37 -0000 1.145
+++ inc-public-global.php3 22 Sep 2004 21:04:19 -0000 1.146
@@ -38,7 +38,7 @@
     // un invalideur 't' dans 1 heure
     // NB: cet invalideur connait aussi la taille du fichier
     spip_log("cache" . $page['process_ins']);
- if (file_exists($chemin_cache)) {
+ if (@file_exists($chemin_cache)) {
       $bedtime = time() + 3600;
       $taille = @filesize($chemin_cache);
       $fichier = addslashes($chemin_cache);
@@ -289,7 +289,7 @@
   $formats = array ('gif', 'jpg', 'png');
   while (list(, $format) = each($formats)) {
     $d = "$dossier/$nom.$format";
- if (file_exists($d))
+ if (@file_exists($d))
       return ($d);
   }
}

Index: lagaffe.php3

RCS file: /home/spip-cvs/spip/lagaffe.php3,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- lagaffe.php3 15 Sep 2004 20:19:29 -0000 1.7
+++ lagaffe.php3 22 Sep 2004 21:04:19 -0000 1.8
@@ -22,7 +22,7 @@

# décommenter au besoin, mais faire attention au double chargement.
-#if (file_exists("mes_fonctions.php3")) include("mes_fonctions.php3");
+#if (@file_exists("mes_fonctions.php3")) include("mes_fonctions.php3");

function dispose_boucle($nom, $corps, $criteres, $avant, $apres, $sinon)
{

Index: inc-calcul.php3

RCS file: /home/spip-cvs/spip/inc-calcul.php3,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -d -r1.113 -r1.114
--- inc-calcul.php3 22 Sep 2004 08:02:40 -0000 1.113
+++ inc-calcul.php3 22 Sep 2004 21:04:19 -0000 1.114
@@ -83,7 +83,7 @@
   // Le point 2 exige qu'il soit lu apres inc-compilo
   // (car celui-ci initialise $tables_principales) mais avant la compil
   $f = $squelette . '_fonctions.php3';
- if (file_exists($f)) include($f);
+ if (@file_exists($f)) include($f);

   // A quoi sert ce test ???
   if (function_exists($nom)) return $nom;
@@ -315,7 +315,7 @@
     if (!function_exists($f)) {
       // non, il est decrit dans le fichier ad hoc
       $d = 'inc_connect-' . $serveur .'.php3';
- if (file_exists('ecrire/' . $d))
+ if (@file_exists('ecrire/' . $d))
         include_ecrire($d);
       $f = spip_abstract_serveur($f, $serveur);
     }

Index: inc-chercher.php3

RCS file: /home/spip-cvs/spip/inc-chercher.php3,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- inc-chercher.php3 21 Sep 2004 15:35:37 -0000 1.5
+++ inc-chercher.php3 22 Sep 2004 21:04:19 -0000 1.6
@@ -23,7 +23,7 @@
     return $f;

   while ($id_rubrique) {
- if (file_exists("$d-$id_rubrique.$ext"))
+ if (@file_exists("$d-$id_rubrique.$ext"))
       return "$d-$id_rubrique";
     else
       $id_rubrique = sql_parent($id_rubrique);