Hide dot-hidden files
This commit is contained in:
parent
f4524fe07b
commit
e5061f2316
3 changed files with 4 additions and 3 deletions
|
@ -109,7 +109,7 @@ function getAlbumPreview($dir)
|
||||||
if (! is_dir(dirname($previewFile))) mkdir(dirname($previewFile), 0777, true);
|
if (! is_dir(dirname($previewFile))) mkdir(dirname($previewFile), 0777, true);
|
||||||
|
|
||||||
// no preview: look for a preview in current dir, write it, return it
|
// no preview: look for a preview in current dir, write it, return it
|
||||||
foreach (scandir($dir) as $file) if ($file != '.' and $file != '..') {
|
foreach (scandir($dir) as $file) if ($file[0] != '.') {
|
||||||
$ext = strtolower(substr($file, -4));
|
$ext = strtolower(substr($file, -4));
|
||||||
if ($ext == ".jpg" or $ext == ".png") {
|
if ($ext == ".jpg" or $ext == ".png") {
|
||||||
$thumb = getPreview("$dir/$file");
|
$thumb = getPreview("$dir/$file");
|
||||||
|
|
|
@ -55,7 +55,7 @@ $folders = array();
|
||||||
$imageFiles = array();
|
$imageFiles = array();
|
||||||
$otherFiles = array();
|
$otherFiles = array();
|
||||||
|
|
||||||
foreach (scandir($realDir) as $file) if ($file != '.' and $file != '..')
|
foreach (scandir($realDir) as $file) if ($file[0] != '.')
|
||||||
{
|
{
|
||||||
if (is_dir("$realDir/$file"))
|
if (is_dir("$realDir/$file"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,8 @@ if (! is_file("$bizouRootFromHere/".IMAGES_DIR.$simpleImagePath)) {
|
||||||
$images = array();
|
$images = array();
|
||||||
|
|
||||||
$files = scandir("$bizouRootFromHere/".IMAGES_DIR.dirname($simpleImagePath));
|
$files = scandir("$bizouRootFromHere/".IMAGES_DIR.dirname($simpleImagePath));
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) if ($file[0] != '.')
|
||||||
|
{
|
||||||
$ext = strtolower(substr($file, -4));
|
$ext = strtolower(substr($file, -4));
|
||||||
if ($ext == ".jpg" or $ext == ".png")
|
if ($ext == ".jpg" or $ext == ".png")
|
||||||
$images[] = $file;
|
$images[] = $file;
|
||||||
|
|
Loading…
Add table
Reference in a new issue