Fixed a bug in the generator template.

This commit is contained in:
Stuart Longland 2009-01-26 19:34:17 +10:00
parent f1a9142335
commit 0d96ee0104

View File

@ -46,9 +46,9 @@ body {
}
function advance() {
var nexturl = '<?cs var:CGI.ScriptName ?>/<?cs var:gallery.name ?>/<?cs var:photo.next ?>?generate=1';
if ( nexturl != window.location.href )
window.location.href = nexturl;
var data = getData();
if ( data.photo.name != data.gallery.last )
window.location.href = '<?cs var:CGI.ScriptName ?>/<?cs var:gallery.name ?>/<?cs var:photo.next ?>?generate=1';
else
window.location.href = '<?cs var:CGI.ScriptName ?>/<?cs var:gallery.name ?>';
}