X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/f07477cb289eb839af7255b25188765d5e49ad94..0b85af176ceecbd94fad0b48977abf6eeff9c0c0:/lib/functions.php diff --git a/lib/functions.php b/lib/functions.php index 2817aa1..c234f4c 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -25,9 +25,16 @@ */ function s2p($s) { + $block_size = 8; $p = ''; for ($i = 0; $i < strlen($s); $i++) { - $p .= $s{$i} . '/'; + $p .= $s{$i}; + if (($i + 1) % $block_size == 0) { + $p .= '/'; + } + } + if (strlen($s) % $block_size != 0) { + $p .= '/'; } return $p; } @@ -560,16 +567,16 @@ function jirafeau_admin_list($name, $file_hash, $link_hash) echo t('LS_FILES'); } echo ''; - echo '
' . t('FILENAME') . ' | '; - echo '' . t('TYPE') . ' | '; - echo '' . t('SIZE') . ' | '; - echo '' . t('EXPIRE') . ' | '; - echo '' . t('ONETIME') . ' | '; - echo '' . t('UPLOAD_DATE') . ' | '; - echo '' . t('ORIGIN') . ' | '; - echo '' . t('ACTION') . ' | '; + echo '' . t('FILENAME') . ' | '; + echo '' . t('TYPE') . ' | '; + echo '' . t('SIZE') . ' | '; + echo '' . t('EXPIRE') . ' | '; + echo '' . t('ONETIME') . ' | '; + echo '' . t('UPLOAD_DATE') . ' | '; + echo '' . t('ORIGIN') . ' | '; + echo '' . t('ACTION') . ' | '; echo '
---|