diff --git a/editor.php b/editor.php index ea74339..49aa81d 100644 --- a/editor.php +++ b/editor.php @@ -114,7 +114,7 @@ h2 {color: rgba(0,198,255,0.7)}



-

+

diff --git a/lib/settings-common.php b/lib/settings-common.php index 845c952..d11c8bf 100644 --- a/lib/settings-common.php +++ b/lib/settings-common.php @@ -75,6 +75,17 @@ if (!file_exists(dirname(__FILE__)."/../data/backups")) { mkdir(dirname(__FILE__)."/../data/backups"); } +// Walk through possibilities in the order we'd like to determine an user IP +function getUserIP() { + return $_SERVER['HTTP_CLIENT_IP'] + ?: $_SERVER['HTTP_X_FORWARDED_FOR'] + ?: $_SERVER['HTTP_X_FORWARDED'] + ?: $_SERVER['HTTP_FORWARDED_FOR'] + ?: $_SERVER['HTTP_FORWARDED'] + ?: $_SERVER['REMOTE_ADDR'] + ?: 'Unknown'; +} + // Get data from a fopen or CURL connection function getData($url,$type='fopen',$dieMessage=false,$timeout=60) { global $context; diff --git a/lib/settings.php b/lib/settings.php index be23575..6488441 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -154,7 +154,7 @@ for ($i=0;$i