Hello,
Hope this is the right place to post this and I hope it can help with the development of CPG 1.5
In 1.5, when I searched a non-existant image, it did not give me the "No image to display" anymore. I know this has been discussed and fixed in this thread: http://forum.coppermine-gallery.net/index.php/topic,63939.0.html (http://forum.coppermine-gallery.net/index.php/topic,63939.0.html)
But fort some reason the error message still did not show up. I think I fixed it but I did that by changing a few lines in functions.inc.php that was edited before in revision 6979 from the SVN. Not being a CPG developer nor an experienced programmer, I'm not sure this won't cause other problems, but if it can help development of this great product... here's what I did:
I simply added back in functions.inc.php:
default : // Invalid meta album
cpg_die(ERROR, $lang_errors['non_exist_ap']." - $album", __FILE__, __LINE__);
before:
} // switch
} // function get_pic_data
And
changed:
} elseif (is_numeric($album) || in_array($album, $valid_meta_albums)) {
to:
} else {
And it seems that the search function is working fine and giving the "No image to display" when supposed to.
Please describe what you are doing when you expect the error message. And please post a link to your gallery so we can test it on your gallery and on our testbeds.
With the changes described in the original entry, the error actually does not happen anymore. So I was basically stating the error and describing how I fixed it.
The error happened when I was doing a search on my test site http://adpharm.net/cpg15/search.php
Hope this helps...
Your fix breaks other functions (you can find them somewhere in the bugs boards, e.g. http://forum.coppermine-gallery.net/index.php/topic,63977.0.html). That's why I need to know these things and cannot blindly apply your suggestion.
That's what I figured... Would have been too easy a fix.
Should I repost my error in a new forum thread? I've re-uploaded the latest functions.inc.php from the SVN and it went back to not display "No image to display" when the search results come up empty.
To reproduce this: http://adpharm.net/cpg15/search.php (http://adpharm.net/cpg15/search.php) type in: aptamil in the search form
And you can try with a keyword such as Avamys (which gives the proper result)
Thanks!
In 1.5, when I searched a non-existant image, it does not give me the "No image to display" anymore. I know this has been discussed and fixed in this thread: http://forum.coppermine-gallery.net/index.php/topic,63939.0.html (http://forum.coppermine-gallery.net/index.php/topic,63939.0.html)
But for some reason, the error message still does not show up.
To reproduce this: http://adpharm.net/cpg15/search.php (http://adpharm.net/cpg15/search.php) type in: aptamil in the search form
And you can try with a keyword such as Avamys (which gives the proper result)
Any idea how to fix this?
Thanks in advance
Merged with existing thread. Perform a SVN checkout of the entire package.
Okay, thank you for the quick reply, I'll do that.