X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/6d4142df4e30e1f46cfa5b377bf2db0323e59479..dd3bb52ddcfed99d4c8e6e3736ae58e1c6ed4ece:/lib/functions.php?ds=inline
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));
}
}
|