Add more code to fix later

This commit is contained in:
Matteo Gheza 2021-12-29 16:48:32 +01:00
parent 71464311ad
commit 7178216dea
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,7 @@ function get_ip()
}else{
$ip = $_SERVER['REMOTE_ADDR'];
}
if(get_option("check_cf_ip", false)) {
if(get_option("check_cf_ip", false)) { //TODO: fix options not defined yet
if(!empty($_SERVER['HTTP_CF_CONNECTING_IP'])) {
$ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
}
@ -320,6 +320,7 @@ $schedules = new Schedules($db, $users);
function get_option($name, $default=null) {
global $options;
if(is_null($options)) return $default;
try {
return $options->get($name);
} catch(Exception $e) {