X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/261af8ac3be2c4d9fbdae0f25c036440833d746c..5545d874624b35a364e26e140a9538450ed6709f:/lib/functions.php?ds=sidebyside
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));
}
}
|