Ignore:
Timestamp:
1999-09-17T16:46:06+12:00 (25 years ago)
Author:
sjboddie
Message:

fixed a couple of problems with 'unknown' classifier

File:
1 edited

Legend:

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

    r542 r604  
    2828/*
    2929   $Log$
     30   Revision 1.15  1999/09/17 04:46:05  sjboddie
     31   fixed a couple of problems with 'unknown' classifier
     32
    3033   Revision 1.14  1999/09/07 23:08:09  rjmcnab
    3134   Removed some compiler warnings
     
    117120pageaction::~pageaction () {
    118121}
     122
     123
     124bool 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
    119144
    120145bool pageaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, cgiargsclass &/*args*/,
     
    255280
    256281    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
    258287      shorttext += "<li>_text" + title + "short_\n";
    259288      longtext += "_text" + title + "long_";
Note: See TracChangeset for help on using the changeset viewer.