hi, I have found a bug in the gallery/galleryremote code. I have a version of gallery remote downloaded from cvs on the 14th used along with gallery1.3.3. This cvs version fixes most of the bugs I saw in the version currently on the download page.
But the problem I was getting is when creating a new album, the new album would show up on the bottom of the list, rather than the top, and the album that used to be on the bottom, would be on the top.
After debugging for awhile, I found the problem is in gallery_remote2.php file included with gallery1.3.3. I found the source of the error by comparing the newalbum function to that in do_command.php.
at line 512 it has:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> } else {
/* move the album to the top if not a nested album*/
$numAlbums = $albumDB->numAlbums($gallery->user);
$albumDB->moveAlbum($gallery->user, $numAlbums, 1);
$albumDB->save();
} </TD></TR></TABLE><!-- BBCode End -->
this should be replaced with:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> } else {
/* move the album to the top if not a nested album*/
$albumDB = new AlbumDB(FALSE);
$numAlbums = $albumDB->numAlbums($gallery->user);
$albumDB->moveAlbum($gallery->user, $numAlbums, 1);
$albumDB->save();
}</TD></TR></TABLE><!-- BBCode End -->
the top way it is still working with the old database, not the new one with the new album added.
hopefully this can be/has been fixed in the releases available and will save other people the trouble of figuring out the problem,
thanks,
joel
Posts: 1479
This is no longer a problem, as gallery_remote2.php no longer implements its own method for creating a new album.