Changeset 2782


Ignore:
Timestamp:
2001-10-04T14:14:58+12:00 (23 years ago)
Author:
dmm9
Message:

setting up modified query interface in pageaction (for about page)

File:
1 edited

Legend:

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

    r2767 r2782  
    415415    disp.setmacro("numbytes", "Global", numbytes);
    416416  }
     417 
     418  //setting _queryformcontent_ so that the query interface is consistent.
     419  if(arg_p == "about"){
     420    text_t collection = args["c"];
     421     //check that the protocol is alive
     422    recptproto* colproto = protos->getrecptproto (collection, logout);
     423    if(colproto == NULL) {
     424      logout << "ERROR: Null collection protocol trying to query"
     425         << collection.getcstr() << "\n";
     426      return;
     427    }
     428   
     429    //check the collection is responding/in place
     430    ColInfoResponse_t *colinfo = recpt->get_collectinfo_ptr(colproto, collection,
     431                                logout);
     432    if(colinfo == NULL){
     433      logout << "ERROR: Null returned for get_collectinfo_ptr on "
     434         << collection.getcstr() << "in queryaction::define_query_interface\n";
     435      return;
     436    }
     437   
     438   
     439    text_tmap::iterator check = colinfo->format.find("QueryInterface");
     440    if(check != colinfo->format.end()){
     441      if((*check).second=="DateSearch"){
     442    text_t current = "_basicqueryform_ _datesearch_";
     443   
     444    disp.setmacro("queryformcontent","query",current);
     445      }
     446    }
     447  }
     448
     449
    417450
    418451  if (arg_p == "home") {
     
    422455  }
    423456
     457
     458 
     459 
    424460  else if (arg_p == "preferences") {
    425461    if (collectproto == NULL) {return;}
Note: See TracChangeset for help on using the changeset viewer.