Add platform stats to user page

Re-add user gravatars
Some error catching
Some code clean-up
This commit is contained in:
Tim 2015-06-21 17:19:19 +02:00
parent ba18c5b96e
commit 9364b06c99
12 changed files with 275 additions and 76 deletions

View file

@ -210,13 +210,17 @@ function getPlatformImagePath(platformName) {
}
function isPrivateIP(ip_address) {
var parts = ip_address.split('.');
if (parts[0] === '10' ||
(parts[0] === '172' && (parseInt(parts[1], 10) >= 16 && parseInt(parts[1], 10) <= 31)) ||
(parts[0] === '192' && parts[1] === '168')) {
if (ip_address.indexOf(".") > -1) {
var parts = ip_address.split('.');
if (parts[0] === '10' ||
(parts[0] === '172' && (parseInt(parts[1], 10) >= 16 && parseInt(parts[1], 10) <= 31)) ||
(parts[0] === '192' && parts[1] === '168')) {
return true;
}
return false;
} else {
return true;
}
return false;
}
function humanTime(seconds) {