Branch: Tag:

1997-08-22

1997-08-22 19:16:40 by Per Hedbor <ph@opera.com>

Verify

Rev: server/base_server/wizard.pike:1.27

1: - /* $Id: wizard.pike,v 1.26 1997/08/21 21:06:57 thomas Exp $ + /* $Id: wizard.pike,v 1.27 1997/08/22 19:16:40 per Exp $    * name="Wizard generator";    * doc="This plugin generats all the nice wizards";    */
234:    int offset = 1;    mapping v=id->variables;    string wiz_name = "page_"; +     if(v->next_page) -  +  { +  function c; +  if(functionp(c=this_object()["verify_"+v->_page])) +  if(!c( id, @args ))    v->_page = PAGE(1); -  +  }    else if(v->prev_page)    { -  +  function c; +  if(functionp(c=this_object()["verify_"+v->_page])) +  if(!c( id, @args ))    v->_page = PAGE(-1);    offset=-1;    }    else if(v->ok) -  return (this_object()->wizard_done(id,@args) +  { +  function c; +  if(functionp(c=this_object()["verify_"+v->_page])) +  if(!c( id, @args )) +  v->_page = PAGE(-1); +  return (((c=this_object()->wizard_done)?c(id,@args):0)    || http_redirect(cancel||id->not_query, @(id->conf?({id}):({})))); -  +  }    else if(v["help.x"])    {    m_delete(v, "help.x");    m_delete(v, "help.y");    v->help="1"; -  } else if(v->cancel) +  } else if(v->cancel) {    return http_redirect(cancel||id->not_query, @(id->conf?({id}):({}))); -  +  }    mapping s = decompress_state(v->_state);    foreach(indices(s), string q)    v[q] = v[q]||s[q];
288:      object get_wizard(string act, string dir, mixed ... args)   { +  act-="/";    if(!wizards[dir+act]) wizards[dir+act]=compile_file(dir+act)(@args);    return wizards[dir+act];   } -  +    int zonk=time();   mapping get_actions(string base,string dir, array args)   {