Ignore:
Timestamp:
Feb 26, 2009, 9:12:27 PM (16 years ago)
Author:
plg
Message:

merge r3165 from branch 2.0 to trunk

bug 913 fixed: ability to connect with an IPv6 address was added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_session.inc.php

    r3049 r3166  
    9494function get_remote_addr_session_hash()
    9595{
    96         return vsprintf( "%02X%02X", explode('.',$_SERVER['REMOTE_ADDR']) );
     96  $separator = (FALSE === strpos($_SERVER['REMOTE_ADDR'],'.'))
     97    ? ':'
     98    : '.'
     99  ;
     100
     101  return vsprintf(
     102    "%02X%02X",
     103    explode($separator,$_SERVER['REMOTE_ADDR'])
     104  );
    97105}
    98106
Note: See TracChangeset for help on using the changeset viewer.