Branch: Tag:

1997-08-23

1997-08-23 01:32:00 by Marcus Comstedt <marcus@mc.pp.se>

Put page-counting code in a separate function.

Rev: server/base_server/wizard.pike:1.30

1: - /* $Id: wizard.pike,v 1.29 1997/08/22 19:32:47 per Exp $ + /* $Id: wizard.pike,v 1.30 1997/08/23 01:32:00 marcus Exp $    * name="Wizard generator";    * doc="This plugin generats all the nice wizards";    */
159:    return s;   }    - string parse_wizard_page(string form, object id, string wiz_name) + int num_pages(string wiz_name)   {    int max_page;    for(int i=0; i<100; i++)
168:    max_page=i-1;    break;    } +  return max_page+1; + }    -  + string parse_wizard_page(string form, object id, string wiz_name) + { +  int max_page = num_pages(wiz_name)-1;    string res;    int page = ((int)id->variables->_page);    mapping foo = ([]);