X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/6d4142df4e30e1f46cfa5b377bf2db0323e59479..84a4575bf1b0c6709f71b3c5a862c17d21747569:/lib/functions.php
diff --git a/lib/functions.php b/lib/functions.php
index 83fdaf1..592e841 100644
--- a/lib/functions.php
+++ b/lib/functions.php
@@ -623,7 +623,12 @@ jirafeau_admin_list ($name, $file_hash, $link_hash)
echo '
' . jirafeau_human_size ($l['file_size']) . ' | ';
echo '' . ($l['time'] == -1 ? '' : strftime ('%c', $l['time'])) .
' | ';
- echo '' . $l['onetime'] . ' | ';
+ echo '';
+ if ($l['onetime'] == 'O')
+ echo 'Y';
+ else
+ echo 'N';
+ echo ' | ';
echo '' . strftime ('%c', $l['upload_date']) . ' | ';
echo '' . $l['ip'] . ' | ';
echo '' .
@@ -1121,6 +1126,8 @@ get_ip_list_http_forwarded()
if (!empty ($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$l = explode (',', $_SERVER['HTTP_X_FORWARDED_FOR']);
+ if ($l === FALSE)
+ return array();
foreach ($l as $ip)
array_push ($ip_list, preg_replace ('/\s+/', '', $ip));
}
@@ -1130,7 +1137,10 @@ get_ip_list_http_forwarded()
foreach ($l as $ip)
{
// Separate IP from port
- $ip = explode (':', $ip)[0];
+ $ipa = explode (':', $ip);
+ if ($ipa === FALSE)
+ continue;
+ $ip = $ipa[0];
array_push ($ip_list, preg_replace ('/\s+/', '', $ip));
}
}
|