Improved photos

This commit is contained in:
Keplyx 2018-11-08 14:19:21 +01:00
parent 7df489185d
commit 3b0c15e6ca
2 changed files with 6 additions and 5 deletions

View file

@ -181,15 +181,16 @@ function timerIncrement() {
* Control images with keyboard arrows
*/
$(document).keydown(function (e) {
switch (e.which) {
switch (e.keyCode) {
case 37: // left
displayNext(-1);
break;
case 39: // right
displayNext(1);
break;
case 27:
closeBig();
break;
default:
return; // exit this handler for other keys
}

View file

@ -192,7 +192,7 @@ function isValidImage($imagePath)
*/
function isValidDirectory($directoryPath, $directory)
{
return is_dir($directoryPath) && $directory != "." && $directory != "..";
return is_dir($directoryPath) && $directory != "." && $directory != ".." && substr($directory, 0, 1 ) !== ".";
}
@ -265,7 +265,7 @@ function generatePath($path)
<?php endif; ?>
<?php if (isAlbumAvailable(getActivePath())): ?>
<a download=""
href="photos<?php echo getActivePath() . DIRECTORY_SEPARATOR . GetActiveFolder(getActivePath()) ?>.zip"
href="photos_folders/photos<?php echo getActivePath() . DIRECTORY_SEPARATOR . GetActiveFolder(getActivePath()) ?>.zip"
id="download-album">
<span id="download-text"><i class="fas fa-download"></i>Télécharger l'album</span>
<span id="album-photo-count"><?php echo getPhotoCount(photoRoot . getActivePath()) ?> photos</span>