Changeset 281 for trunk/gsdl/src/recpt


Ignore:
Timestamp:
1999-06-17T11:53:15+12:00 (25 years ago)
Author:
sjboddie
Message:

tidied a few things up. documentaction::define_external_macros now
resets the "c" arg if it's set to something stupid by the .xx suffixes

Location:
trunk/gsdl/src/recpt
Files:
2 edited

Legend:

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

    r279 r281  
    1212/*
    1313   $Log$
     14   Revision 1.7  1999/06/16 23:53:14  sjboddie
     15   tidied a few things up. documentaction::define_external_macros now
     16   resets the "c" arg if it's set to something stupid by the .xx suffixes
     17
    1418   Revision 1.6  1999/06/16 04:03:47  sjboddie
    1519   Now sets "cl" arg to "search" when going to a document from a search
     
    132136      textout << outconvert << "<h4><i>" << author << "</i></h4>\n";
    133137
    134     textout << "</td></tr></table>\n";
     138    textout << "</td></tr></table></center>\n";
    135139    textout << "\n<!-- end of Table of Contents -->\n";
    136140
     
    269273  text_tarray metadata;
    270274  FilterResponse_t response;
    271   text_t doclink = "<a href=\"_httpdocument_&cl=" + args["cl"] + "&d=";
     275  text_t &arg_cl = args["cl"];
     276  text_t doclink = "<a href=\"_httpdocument_&cl=" + arg_cl + "&d=";
    272277  bool iscreator = false;
    273278  if (classifytitle == "Creator") iscreator = true;
     
    275280  metadata.push_back ("Title");
    276281  metadata.push_back ("Creator");
    277   if (get_children (args["cl"], args["c"], metadata, collectproto, response, logout)) {
     282  if (get_children (arg_cl, args["c"], metadata, collectproto, response, logout)) {
    278283
    279284    textout
     
    286291    while (sechere != secend) {
    287292
     293      const text_t &title = (*sechere).metadata[0].values[0];
     294      const text_t &creator = (*sechere).metadata[1].values[0];
     295
    288296      if (iscreator) {
    289     if (!((*sechere).metadata[1].values[0].empty())) {
     297    if (!creator.empty()) {
    290298      textout << outconvert << disp << "<tr><td valign=top>" << doclink << (*sechere).OID
    291299          << "\">_iconclosedbook_</a></td><td>"
    292           << (*sechere).metadata[1].values[0] << "</td><td>";
    293 
    294       if (!((*sechere).metadata[0].values[0].empty()))
    295         textout << outconvert << "&nbsp;&nbsp;" << (*sechere).metadata[0].values[0];
     300          << creator << "</td><td>";
     301
     302      if (!title.empty())
     303        textout << outconvert << "&nbsp;&nbsp;" << title;
    296304    }
    297305      } else {
    298     if (!((*sechere).metadata[0].values[0].empty())) {
     306    if (!title.empty()) {
    299307      textout << outconvert << disp << "<tr><td valign=top>" << doclink << (*sechere).OID
    300           << "\">_iconclosedbook_</a></td><td>"
    301           << (*sechere).metadata[0].values[0] << "</td><td>";
    302 
    303       if (!((*sechere).metadata[1].values[0].empty()))
    304         textout << outconvert << "&nbsp;&nbsp;" << (*sechere).metadata[1].values[0];
     308          << "\">_iconclosedbook_</a></td><td>" << title << "</td><td>";
     309
     310      if (!creator.empty())
     311        textout << outconvert << "&nbsp;&nbsp;" << creator;
    305312    }
    306313      }
  • trunk/gsdl/src/recpt/documentaction.cpp

    r277 r281  
    1212/*
    1313   $Log$
     14   Revision 1.6  1999/06/16 23:53:15  sjboddie
     15   tidied a few things up. documentaction::define_external_macros now
     16   resets the "c" arg if it's set to something stupid by the .xx suffixes
     17
    1418   Revision 1.5  1999/06/16 03:10:49  sjboddie
    1519   define_internal_macros() now sets _pagetitle_ macro to document's title
     
    221225    disp.setmacro ("cgiargd", "Global", arg_d);
    222226  }
     227  // we'll also check here that the "cl" argument has a "classify" doctype
     228  // (in case ".fc" or ".lc" have screwed up)
    223229  if (needs_translating (arg_cl)) {
     230    request.fields.push_back("doctype");
    224231    request.docSet.insert (arg_cl);
     232    request.filterResultOptions = FRmetadata;
    225233    collectproto->filter (collection, request, response, err, logout);
    226     arg_cl = response.docInfo[0].OID;
     234    // set to original value (without .xx stuff) if doctype isn't "classify"
     235    if (response.docInfo[0].metadata[0].values[0] != "classify")
     236      strip_suffix (arg_cl);
     237    else
     238      arg_cl = response.docInfo[0].OID;
    227239    disp.setmacro ("cgiargcl", "Global", arg_cl);
    228240  }
Note: See TracChangeset for help on using the changeset viewer.