inc_lang.php3 1.126 1.127

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

Modified Files:
  inc_lang.php3
Log Message:
warning idiot

Index: inc_lang.php3

RCS file: /home/spip-cvs/spip/ecrire/inc_lang.php3,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- inc_lang.php3 29 Oct 2004 16:57:45 -0000 1.126
+++ inc_lang.php3 31 Oct 2004 09:24:41 -0000 1.127
@@ -50,10 +50,10 @@

   if (_DIR_RESTREINT AND $fichier_lang_exists) {
     $ficher_cache = _DIR_CACHE . 'lang_'.$module.'_'.$lang.'.php3';
- $fichier_cache_time = is_readable($fichier_cache) ? filemtime($ficher_cache) : false;
+ $fichier_cache_time = @is_readable($fichier_cache) ? @filemtime($ficher_cache) : false;

     if (!$forcer AND $ficher_cache_time
- AND ($ficher_cache_time > filemtime(_DIR_LANG .$module.'_'.$lang.'.php3'))
+ AND ($ficher_cache_time > @filemtime(_DIR_LANG .$module.'_'.$lang.'.php3'))
     AND ($ficher_cache_time > @filemtime(_DIR_LANG . 'perso.php3'))) {
       $GLOBALS['idx_lang'] = 'i18n_'.$module.'_'.$lang;
       if (lire_fichier($ficher_cache, $contenu, array('phpcheck' => 'oui'))) {
@@ -431,13 +431,14 @@
     $post = $lien->getUrl();
     $cible = '';
   } else {
- if ($flag_ecrire) {
+ $site = lire_meta("adresse_site");
+ if (!_DIR_RESTREINT) {
       include_ecrire('inc_admin.php3');
- $cible = 'ecrire/'.$lien->getUrl();
- $post = "../spip_cookie.php3?id_auteur=$connect_id_auteur&valeur=".calculer_action_auteur('var_lang_ecrire', $connect_id_auteur);
+ $cible = _DIR_RESTREINT_ABS . $lien->getUrl();
+ $post = "$site/spip_cookie.php3?id_auteur=$connect_id_auteur&valeur=".calculer_action_auteur('var_lang_ecrire', $connect_id_auteur);
     } else {
       $cible = $lien->getUrl();
- $post = 'spip_cookie.php3';
+ $post = "$site/spip_cookie.php3";
     }
   }