X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/4823b32b6ce68f7a6a0949c225c808da4979506f..d476bcd5e359b590b36e7372833e0e6ebd419587:/lib/functions.php?ds=inline
diff --git a/lib/functions.php b/lib/functions.php
index ebfffd4..cf89593 100644
--- a/lib/functions.php
+++ b/lib/functions.php
@@ -101,10 +101,8 @@ function jirafeau_gen_random($l)
return $code;
}
-function jirafeau_gen_download_pass()
+function jirafeau_gen_download_pass($length, $allowed_chars)
{
- $length = $cfg['download_password_gen_len'];
- $allowed_chars = $cfg['download_password_gen_chars'];
if ($length <= 0) {
return false;
}
@@ -163,6 +161,9 @@ function jirafeau_clean_rm_link($link)
if (file_exists(VAR_LINKS . $p . $link)) {
unlink(VAR_LINKS . $p . $link);
}
+ if (file_exists(VAR_LINKS . $p . $link . '_download')) {
+ unlink(VAR_LINKS . $p . $link . '_download');
+ }
$parse = VAR_LINKS . $p;
$scan = array();
while (file_exists($parse)
@@ -708,6 +709,7 @@ function jirafeau_admin_list($name, $file_hash, $link_hash)
if (!count($l)) {
continue;
}
+ $ld = jirafeau_get_download_stats($node);
/* Filter. */
if (!empty($name) && !@preg_match("/$name/i", jirafeau_escape($l['file_name']))) {
@@ -732,6 +734,11 @@ function jirafeau_admin_list($name, $file_hash, $link_hash)
if (strlen($l['ip']) > 0) {
echo t('ORIGIN') . ': ' . $l['ip'] . '
';
}
+ echo t('DOWNLOAD_COUNT') . ': ' . $ld['count'] . '
';
+ if ($ld['count'] > 0) {
+ echo t('DOWNLOAD_DATE') . ': ' . jirafeau_get_datetimefield($ld['date']) . '
';
+ echo t('DOWNLOAD_IP') . ': ' . $ld['ip'] . '
';
+ }
echo '