- Timestamp:
- 2009-12-09T21:41:14+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/colservr/collectserver.cpp
r20799 r21324 29 29 #include <assert.h> 30 30 #include "display.h" 31 32 void check_if_valid_buildtype(const text_t& buildtype) 33 { 34 if (buildtype=="mg") { 35 #ifndef ENABLE_MG 36 cerr << "Warning: Greenstone installation has not been compiled to support buildtype 'mg'." << endl; 37 #endif 38 } 39 40 else if (buildtype=="mgpp") { 41 #ifndef ENABLE_MGPP 42 cerr << "Warning: Greenstone installation has not been compiled to support buildtype 'mgpp'." << endl; 43 #endif 44 } 45 46 else if (buildtype=="lucene") { 47 #ifndef ENABLE_LUCENE 48 cerr << "Warning: Greenstone installation has not been compiled to support buildtype 'lucene'." << endl; 49 #endif 50 } 51 52 else { 53 cerr << "Error: buildtype '" << buildtype << "' is not a recognized indexer for Greenstone." << endl; 54 } 55 56 } 57 31 58 32 59 … … 202 229 else if (key == "httpprefix") collectinfo.httpprefix = value; 203 230 else if (key == "receptionist") collectinfo.receptionist = value; 204 else if (key == "buildtype") collectinfo.buildType = value; 231 else if (key == "buildtype") { 232 check_if_valid_buildtype(value); // prints warning if value (indexer) is invalid 233 collectinfo.buildType = value; 234 } 205 235 // backwards compatibility - searchytpes is now a format statement 206 236 else if (key == "searchtype") { // means buildtype is mgpp 207 237 if (collectinfo.buildType.empty()) { 238 check_if_valid_buildtype("mgpp"); // prints warning if value (indexer) is invalid 208 239 collectinfo.buildType = "mgpp"; 209 240 }
Note:
See TracChangeset
for help on using the changeset viewer.