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() { function advance() {
var nexturl = '<?cs var:CGI.ScriptName ?>/<?cs var:gallery.name ?>/<?cs var:photo.next ?>?generate=1'; var data = getData();
if ( nexturl != window.location.href ) if ( data.photo.name != data.gallery.last )
window.location.href = nexturl; window.location.href = '<?cs var:CGI.ScriptName ?>/<?cs var:gallery.name ?>/<?cs var:photo.next ?>?generate=1';
else else
window.location.href = '<?cs var:CGI.ScriptName ?>/<?cs var:gallery.name ?>'; window.location.href = '<?cs var:CGI.ScriptName ?>/<?cs var:gallery.name ?>';
} }