Branch: Tag:

1998-07-22

1998-07-22 00:05:30 by Johan Schön <js@opera.com>

Added <done> [rxml] </done>.

Rev: server/modules/tags/wizard_tag.pike:1.12

3:    * made by Per Hedbor    */    - constant cvs_version = "$Id: wizard_tag.pike,v 1.11 1998/07/19 17:16:38 grubba Exp $"; + constant cvs_version = "$Id: wizard_tag.pike,v 1.12 1998/07/22 00:05:30 js Exp $";   constant thread_safe=1;   #include <module.h>   inherit "module";
22:    f->pages +=({({contents,ol+l})});   }    + string internal_done(string t, mapping args, string contents, int l, int ol, +  mapping f) + { +  f->done=contents; + } +    string fix_relative(string file, object id)   {    if(file != "" && file[0] == '/') return file;
88:    "}\n\n");   #endif /* __VERSION__ >= 0.6 */    } -  parse_html_lines(contents, ([]), (["page":internal_page]), +  +  parse_html_lines(contents, +  ([]), +  ([ "page":internal_page, +  "done":internal_done ]),    (int)defines->line,f); -  +  if(f->done&&!args->ok); +  pike += ("mixed wizard_done(object id)\n" +  "{\n" +  " return parse_rxml(\""+replace(f->done, +  ({"\"","\n","\r", "\\"}), +  ({"\\\"", "\\n", "\\r", "\\\\"}))+ +  "\",id);\n" +  "}\n");    foreach(f->pages, array q)    {   #if __VERSION__ >= 0.6
115:    }       -  mixed res = w->wizard_for(id,fix_relative(args->cancel||args->done,id)); +  mixed res = w->wizard_for(id,fix_relative(args->cancel||args->done||"",id));       if(mappingp(res))    {