Skip to content

Commit

Permalink
! While I no longer use a proxy, I've established that the most usefu…
Browse files Browse the repository at this point in the history
…l IP data to be recorded is the one discovered through the proxy's special headers. If nothing was found (e.g. no proxy), that data will be the same as usual anyway... Way, way more useful for most tasks. (Class-System.php)
  • Loading branch information
Nao committed Jul 22, 2017
1 parent 8d4d155 commit cee6d78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/app/Class-System.php
Expand Up @@ -279,8 +279,8 @@ protected static function init_user()
'language' => self::get_preferred_language(isset($user_settings['lngfile']) ? $user_settings['lngfile'] : ''),
'skin' => $_SESSION['is_mobile'] ? (empty($user_settings['skin_mobile']) ? '' : $user_settings['skin_mobile']) : (empty($user_settings['skin']) ? '' : $user_settings['skin']),
'last_login' => empty($user_settings['last_login']) ? 0 : $user_settings['last_login'],
'ip' => $_SERVER['REMOTE_ADDR'],
'ip2' => $_SERVER['BAN_CHECK_IP'],
'ip' => $_SERVER['BAN_CHECK_IP'],
'ip2' => $_SERVER['REMOTE_ADDR'],
'posts' => empty($user_settings['posts']) ? 0 : $user_settings['posts'],
'time_format' => empty($user_settings['time_format']) ? '' : $user_settings['time_format'],
'time_offset' => isset($offset) ? $offset : (empty($user_settings['time_offset']) ? 0 : $user_settings['time_offset']),
Expand Down Expand Up @@ -640,11 +640,11 @@ protected static function init_browser()
{
global $context;

// The following determines the user agent (browser) as best it can.
// The following determines the user agent (browser) as well as it can.
$ua = self::$ua;
$browser['opera'] = strpos($ua, 'Opera') !== false;

// Detect Webkit and related
// Detect Webkit and related, such as Opera 12+
$browser['webkit'] = $is_webkit = strpos($ua, 'AppleWebKit') !== false;
$browser['chrome'] = $is_webkit && strhas($ua, array('Chrome', 'CriOS'));
$browser['safari'] = $is_webkit && !$browser['chrome'] && strpos($ua, 'Safari') !== false;
Expand Down

0 comments on commit cee6d78

Please sign in to comment.