CVS: spip inc-stats.php3,1.56,1.57

Update of /home/spip-cvs/spip
In directory miel:/tmp/cvs-serv14451

Modified Files:
  inc-stats.php3
Log Message:
stats & proxys

Index: inc-stats.php3

RCS file: /home/spip-cvs/spip/inc-stats.php3,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- inc-stats.php3 10 Oct 2003 22:50:40 -0000 1.56
+++ inc-stats.php3 21 Oct 2003 16:43:38 -0000 1.57
@@ -8,7 +8,10 @@
function ecrire_stats() {
   global $id_article, $id_breve, $id_rubrique;

- $log_ip = $GLOBALS['REMOTE_ADDR'];
+ if ($GLOBALS['HTTP_X_FORWARDED_FOR'])
+ $log_ip = $GLOBALS['HTTP_X_FORWARDED_FOR'];
+ else
+ $log_ip = $GLOBALS['REMOTE_ADDR'];
   if ($id_rubrique > 0) {
     $log_type = "rubrique";
     $log_id_num = $id_rubrique;