Branch: Tag:

1998-06-29

1998-06-29 15:01:26 by Marcus Comstedt <marcus@mc.pp.se>

Fixed so that wizard_done() is called if all pages return 0.

Rev: server/base_server/wizard.pike:1.66

1: - /* $Id: wizard.pike,v 1.65 1998/06/07 18:41:12 grubba Exp $ + /* $Id: wizard.pike,v 1.66 1998/06/29 15:01:26 marcus Exp $    * name="Wizard generator";    * doc="This file generats all the nice wizards";    */
444:       for(; !data; v->_page=PAGE(offset))    { -  function pg=this_object()[wiz_name+((int)v->_page)]; +  function c, pg=this_object()[wiz_name+((int)v->_page)]; +  if(!pg && functionp(c=this_object()["wizard_done"])) { +  mixed res = c(id,@args); +  if(res != -1) +  return (res +  || http_redirect(cancel||id->not_query, +  @(id->conf?({id}):({})))); +  }    if(!pg) return "Internal error in wizard code: Invalid page ("+v->_page+")!";    if(data = pg(id,@args)) break;    }