Changeset 604
- Timestamp:
- 1999-09-17T16:46:06+12:00 (25 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/documentaction.cpp
r600 r604 28 28 /* 29 29 $Log$ 30 Revision 1.25 1999/09/17 04:46:05 sjboddie 31 fixed a couple of problems with 'unknown' classifier 32 30 33 Revision 1.24 1999/09/17 04:00:26 sjboddie 31 34 tidied up navigation bar to produce a default "unknown" button if … … 688 691 if (get_info (classtop, collection, metadata, false, collectproto, response, logout)) { 689 692 690 text_t &title = response.docInfo[0].metadata[0].values[0];693 text_t title = response.docInfo[0].metadata[0].values[0]; 691 694 text_t &classifytype = response.docInfo[0].metadata[1].values[0]; 695 696 text_tset::const_iterator it = classify_meta.find (title); 697 if (it == classify_meta.end()) title = "Unknown"; 692 698 693 699 disp.setmacro ("pagetitle", "document", "_text" + title + "page_"); -
trunk/gsdl/src/recpt/pageaction.cpp
r542 r604 28 28 /* 29 29 $Log$ 30 Revision 1.15 1999/09/17 04:46:05 sjboddie 31 fixed a couple of problems with 'unknown' classifier 32 30 33 Revision 1.14 1999/09/07 23:08:09 rjmcnab 31 34 Removed some compiler warnings … … 117 120 pageaction::~pageaction () { 118 121 } 122 123 124 bool pageaction::init (ostream &logout) { 125 126 // classify_meta should contain names of all classifiers supported 127 // by this receptionist. classifications using metadata names not 128 // in this list will be displayed as "unknown" 129 classify_meta.insert ("Title"); 130 classify_meta.insert ("List"); 131 classify_meta.insert ("Creator"); 132 classify_meta.insert ("Series"); 133 classify_meta.insert ("Date"); 134 classify_meta.insert ("Subject"); 135 classify_meta.insert ("Organization"); 136 classify_meta.insert ("Howto"); 137 classify_meta.insert ("Topic"); 138 classify_meta.insert ("Browse"); 139 classify_meta.insert ("People"); 140 141 return action::init (logout); 142 } 143 119 144 120 145 bool pageaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, cgiargsclass &/*args*/, … … 255 280 256 281 while (here != end) { 257 const text_t &title = (*here).metadata[0].values[0]; 282 text_t title = (*here).metadata[0].values[0]; 283 284 text_tset::const_iterator it = classify_meta.find (title); 285 if (it == classify_meta.end()) title = "Unknown"; 286 258 287 shorttext += "<li>_text" + title + "short_\n"; 259 288 longtext += "_text" + title + "long_"; -
trunk/gsdl/src/recpt/pageaction.h
r533 r604 41 41 receptionist *recpt; 42 42 43 text_tset classify_meta; 44 43 45 public: 44 46 pageaction (); 45 47 virtual ~pageaction (); 48 49 bool init (ostream &logout); 46 50 47 51 text_t get_action_name () {return "p";}
Note:
See TracChangeset
for help on using the changeset viewer.