Topic: PHP Build script bugs
I'm working on implementing Autoviewer on my website and I'm using the PHP build script to automate gallery.xml creation as per this page:
http://www.simpleviewer.net/autoviewer/ … cript.html
I've noticed a bug, but I have a solution!
When I have a Thumbs.db file in the folder, the build script creates an entry for it in the gallery.xml, which makes the gallery display improperly. I wouldn't normally consider this a bug, but I do in this case since it looks like the author tried to prevent this with line 42:
if ($file[0] != "." && $file[0] != ".." && $file[0] != "Thumbs.db" ) {
This only affects the sorting, as best as I can tell. To ignore certain file names, you should encapsulate lines 60-71 in an if statement like this:
if ($key != "Thumbs.db") {
//lines 60 - 71 go here
}
You can block multiple filenames like this:
if ($key != "Thumbs.db" && $key != "notes.txt") {
Also, the notes on the above linked page have a mistake (outdated, I suppose). On #5 it should say gallery.xml, instead of imagedata.xml.
Thanks!