Changeset 3165 for branches


Ignore:
Timestamp:
Feb 26, 2009, 9:09:26 PM (15 years ago)
Author:
plg
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/include/functions_session.inc.php

    r3046 r3165  
    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.