X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/68892c7ee6ea5f3f30d1e5d1051cd7029b2cbd41..35db486e4e0bfd5dfb0af1188e2e4622873562be:/f.php?ds=sidebyside diff --git a/f.php b/f.php index 31b5d06..0218602 100644 --- a/f.php +++ b/f.php @@ -49,6 +49,13 @@ if (!preg_match ('/[0-9a-zA-Z_-]+$/', $link_name)) $link = jirafeau_get_link ($link_name); if (count ($link) == 0) +{ + /* Try alias. */ + $alias = jirafeau_get_alias (md5 ($link_name)); + if (count ($alias) > 0) + $link = jirafeau_get_link ($alias["destination"]); +} +if (count ($link) == 0) { require (JIRAFEAU_ROOT.'lib/template/header.php'); echo '

' . t('Sorry, the requested file is not found') . @@ -152,7 +159,7 @@ if (!empty ($link['key'])) echo '&k=' . urlencode($crypt_key); ?>'; document.getElementById('submit_download').submit ();"/>

' . t('Access denied') . '

'; @@ -182,7 +190,7 @@ if (!empty ($link['key'])) } } -if ($cfg['download_page'] && !$password_challenged && !$do_download && !$do_preview) +if (!$password_challenged && !$do_download && !$do_preview) { require (JIRAFEAU_ROOT.'lib/template/header.php'); echo '
' . @@ -191,9 +199,9 @@ if ($cfg['download_page'] && !$password_challenged && !$do_download && !$do_prev echo '" ' . 'method = "post" id = "submit_post">'; ?> ' . $link['file_name'] . '' . + echo '
' . htmlspecialchars($link['file_name']) . '
' . '' . '
' . - t('You are about to download') . ' "' . $link['file_name'] . '" (' . jirafeau_human_size($link['file_size']) . ')' . + t('You are about to download') . ' "' . htmlspecialchars($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ')' . '
' . t('By using our services, you accept our'). ' ' . t('Term Of Service') . '' . @@ -216,7 +224,7 @@ if ($cfg['download_page'] && !$password_challenged && !$do_download && !$do_prev ?>'; document.getElementById('submit_post').submit ();"/>