Changeset 2945


Ignore:
Timestamp:
2002-02-04T14:44:17+13:00 (22 years ago)
Author:
sjboddie
Message:

The "l" and "w" (interface language and encoding) arguments are now
preserved when moving from one collection to another through the home
page. A nicer way to do this would be to add the ability to define
certain arguments as being "collection specific" (since there are many
arguments whose values we don't want to retain when moving between
collections) and let all the rest be retained (rather than making a
special case of "l" and "w"). For now this rather inelegant solution
will do the trick though.

Location:
trunk/gsdl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/macros/base.dm

    r2898 r2945  
    215215#_httppagehome_ {_httppagex_(home)}
    216216###_httppagehome_ {http://www.nzdl.org/cgi-bin/dblibrary?a=p&p=home}
    217 _httppagehome_ {_gwcgi_?a=p&p=home}
     217_httppagehome_ {_gwcgi_?a=p&p=home&l=_cgiargl_&w=_cgiargw_}
    218218_httppagehelp_ {_httppagex_(help)}
    219219_httppagepref_ {_httppagex_(preferences)}
  • trunk/gsdl/src/recpt/pageaction.cpp

    r2785 r2945  
    104104
    105105void pageaction::set_homeextra_macro (displayclass &disp, recptprotolistclass *protos,
    106                       ostream &logout) {
     106                      cgiargsclass &args, ostream &logout) {
    107107  text_t homeextra = "<center><table width=_pagewidth_><tr valign=top>\n";
    108108  bool found_valid_col = false;
     
    194194          if (!site_name.empty()) { optsite = "site="+site_name+"&"; }
    195195
    196           text_t link = "<a href=\"_gwcgi_?"+optsite+"a=p&p=about&c=" + *collist_here + coll_type+"\">";
     196          text_t link = "<a href=\"_gwcgi_?"+optsite+"a=p&p=about&c=" + *collist_here + coll_type;
     197          link += "&l=" + args["l"] + "&w=" + args["w"] + "\">";
    197198
    198199          if (!cinfo->receptionist.empty())
     
    457458
    458459  if (arg_p == "home") {
    459     set_homeextra_macro (disp, protos, logout);
     460    set_homeextra_macro (disp, protos, args, logout);
    460461    if (status_disabled) disp.setmacro ("textgoadmin", "home", "");
    461462    if (collector_disabled) disp.setmacro ("textgocollector", "home", "");
  • trunk/gsdl/src/recpt/pageaction.h

    r2785 r2945  
    6868protected:
    6969  void set_homeextra_macro (displayclass &disp, recptprotolistclass *protos,
    70                 ostream &logout);
     70                cgiargsclass &args, ostream &logout);
    7171
    7272  void set_collectionlist_macro (displayclass &disp, recptprotolistclass *protos,
Note: See TracChangeset for help on using the changeset viewer.