Changeset 764


Ignore:
Timestamp:
1999-11-02T11:03:35+13:00 (25 years ago)
Author:
sjboddie
Message:

Added ability to handle multiple arguments with the same name (as
is the case with multiple checkboxes using the same name). I'm not
sure this is the best way to do it but it does the trick for what
I currently need.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/cgiutils.cpp

    r614 r764  
    2828/*
    2929   $Log$
     30   Revision 1.11  1999/11/01 22:03:35  sjboddie
     31   Added ability to handle multiple arguments with the same name (as
     32   is the case with multiple checkboxes using the same name). I'm not
     33   sure this is the best way to do it but it does the trick for what
     34   I currently need.
     35
    3036   Revision 1.10  1999/09/21 21:41:17  sjboddie
    3137   fixed a couple of problems in what I committed last
     
    155161    value.setencoding(1); // other encoding
    156162    // store this key=value pair
    157     if (!key.empty()) args.setarg (key, value, cgiarg_t::cgi_arg);
     163    if (!key.empty()) {
     164      // if arg occurs multiple times (as is the case with
     165      // multiple checkboxes using the same name) we'll
     166      // create a comma separated list of all the values
     167      if (!args[key].empty())
     168    args[key] += "," + value;
     169      else
     170    args.setarg (key, value, cgiarg_t::cgi_arg);
     171    }
    158172  }
    159173}
Note: See TracChangeset for help on using the changeset viewer.