03-19-2008, 12:28 AM
Bolty may have a solution in hand, we'll find out soon enough. In the process of looking, though, I found a curious story I'd like to share. It's called working code isn't always good code.
Seems the media extension Bolty's using has had some other bugs in it before. The most common with uploading happens to be permissions issues, where they aren't initialized properly and so access is denied. Here is one poster's suggestion on how to fix the issue:
Now, said user is probably right in that $my->gid isn't set properly. But checks like these exist for a reason. "|| 1" translates to "or 1". In an if clause, 0 is false and everything else is true. So the if statement now reads "If the variable is set, or true" -> always true. Congratulations, your access is now granted. So is everyone's, whether they are supposed to have access or not.
The only reply after that was a thank you posted two years later. Argh.
Seems the media extension Bolty's using has had some other bugs in it before. The most common with uploading happens to be permissions issues, where they aren't initialized properly and so access is denied. Here is one poster's suggestion on how to fix the issue:
Quote:There is a bug in BETA 3 of Zoom Gallery 2.5 - regards user upload.
Filename: zoom.class.php
Line: 207
There is:
if (!isset($my->gid)) {
Should be:
if (!isset($my->gid) || 1) {
This is beacause $my-gid is set but to wrong value so it shuold be recalculated.
Now, said user is probably right in that $my->gid isn't set properly. But checks like these exist for a reason. "|| 1" translates to "or 1". In an if clause, 0 is false and everything else is true. So the if statement now reads "If the variable is set, or true" -> always true. Congratulations, your access is now granted. So is everyone's, whether they are supposed to have access or not.
The only reply after that was a thank you posted two years later. Argh.
Trade yourself in for the perfect one. No one needs to know that you feel you've been ruined!