Changeset 2009 for trunk/gsdl


Ignore:
Timestamp:
2001-02-19T14:38:48+13:00 (23 years ago)
Author:
paynter
Message:

Added "classifier number" CGI argument (d). When a collection has more
than one phind classifier, this number distinguishes between them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/phind/host/phindcgi.cpp

    r1828 r2009  
    6363void get_gsdlsite_parameters(char *&gsdlhome);
    6464
    65 void get_cgi_parameters(char *&collection,
     65void get_cgi_parameters(char *&collection, char *&classifier,
    6666            unsigned long &phrasenumber, UCArray &phrasetext,
    6767            unsigned long &first_e, unsigned long &last_e,
     
    144144 
    145145  // Get command-line parameters
    146   char *collection;
     146  char *collection = NULL;
     147  char *classifier = NULL;
    147148  text_tmap param;
    148   get_cgi_parameters(collection, phrase, word,
     149  get_cgi_parameters(collection, classifier, phrase, word,
    149150             first_e, last_e, first_l, last_l, first_d, last_d, XMLmode);
    150151
     
    158159  strcat(basepath, collection);
    159160  strcat(basepath, "/index/phind");
     161  strcat(basepath, classifier);
    160162
    161163  // If we don't know the phrase number, look itup
     
    797799}
    798800
    799 void get_cgi_parameters(char *&collection,
     801void get_cgi_parameters(char *&collection, char *&classifier,
    800802            unsigned long &phrasenumber, UCArray &phrasetext,
    801803            unsigned long &first_e, unsigned long &last_e,
     
    854856      }
    855857     
     858      // d: the classifier number as string
     859      if (key[0] == 'd') {
     860    UCArray tmp;
     861    toUCArray(value, tmp);
     862    classifier = GetCStr(tmp);
     863      }
     864     
    856865      // e: the first expansion number
    857866      else if (key[0] == 'e') {
     
    900909
    901910    }
     911  } 
     912
     913  // if no classifier number is supplied, default to 1.
     914  if (classifier == NULL) {
     915    classifier = new (char)[2];
     916    strcpy(classifier, "1");
    902917  }
    903918}
Note: See TracChangeset for help on using the changeset viewer.