Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot handle folders (= albums) on certain platforms #20

Open
EthanEsrah opened this issue Jan 19, 2019 · 0 comments
Open

Cannot handle folders (= albums) on certain platforms #20

EthanEsrah opened this issue Jan 19, 2019 · 0 comments

Comments

@EthanEsrah
Copy link

Hi,
Just started a gallery project using nanoGallery2 and nanoPhotosProvider2. Noticed that the display of albums did not work for me, only displaying the contents of a single album. After some debugging, I've found the reason: In line 111 of nano_photos_provider2.json.class.php, the following statement is used to read all picture files of a folder:
$files = glob($this->data->fullDir . $filename."/*.{".str_replace("|",",",$this->config['fileExtensions'])."}", GLOB_BRACE);
In my setup, this never returned any file names although there were plenty of files in the folder. The problem is the use of flag GLOB_BRACE. On certain platforms, this flag is not supported and GLOB will not return any file names. This is also described in the PHP documentation. I'm working on a hosted server (STRATO, a German provider) that seems to use such platforms.
As a quick workaround, I adjusted line 111 in the following way:
$files = glob($this->data->fullDir . $filename . "/*.jpg");
This only works for *.jpg picture files but since I don't use any others anyway it is OK for me. However, would be nice to have a solution in the official coding for the GLOB_BRACE problem.
Apart from that: Great application!
Best regards,
Sven

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant