X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/53517d3b939f85007001beb3a01a32b032a9070b..4b1444392bd5b597869029fc412618bc21268b6c:/file.php
diff --git a/file.php b/file.php
index fefeffd..d01bee6 100644
--- a/file.php
+++ b/file.php
@@ -49,10 +49,10 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
require (JIRAFEAU_ROOT.'lib/template/footer.php');
exit;
}
-
- if (!file_exists (VAR_FILES . $link['md5']))
+ $p = s2p ($link['md5']);
+ if (!file_exists (VAR_FILES . $p . $link['md5']))
{
- jirafeau_delete ($link_name);
+ jirafeau_delete_link ($link_name);
require (JIRAFEAU_ROOT.'lib/template/header.php');
echo '
'.t('File not available.').
'
';
@@ -62,7 +62,7 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
if (!empty ($delete_code) && $delete_code == $link['link_code'])
{
- jirafeau_delete ($link_name);
+ jirafeau_delete_link ($link_name);
require (JIRAFEAU_ROOT.'lib/template/header.php');
echo ''.t('File has been deleted.').
'
';
@@ -70,15 +70,15 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
exit;
}
- if ($link['time'] != JIRAFEAU_INFINITY && time ()> $link['time'])
+ if ($link['time'] != JIRAFEAU_INFINITY && time () > $link['time'])
{
- jirafeau_delete ($link_name);
+ jirafeau_delete_link ($link_name);
require (JIRAFEAU_ROOT.'lib/template/header.php');
echo ''.
t('The time limit of this file has expired.') . ' ' .
t('File has been deleted.') .
'
';
- require (JIRAFEAU_ROOT.'lib/template/footer.php');
+ require (JIRAFEAU_ROOT . 'lib/template/footer.php');
exit;
}
@@ -108,7 +108,6 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
if ($link['key'] != md5 ($_POST['key']))
{
header ("Access denied");
-
require (JIRAFEAU_ROOT.'lib/template/header.php');
echo '' . t('Access denied') .
'
';
@@ -125,10 +124,10 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
header ('Content-Disposition: attachment; filename="' .
$link['file_name'] . '"');
}
- readfile (VAR_FILES . $link['md5']);
+ readfile (VAR_FILES . $p . $link['md5']);
if ($link['onetime'] == 'O')
- jirafeau_delete ($link_name);
+ jirafeau_delete_link ($link_name);
exit;
}
else