Changeset 2212
- Timestamp:
- 2001-03-20T21:48:12+12:00 (23 years ago)
- Location:
- trunk/gsdl/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/browsefilter.cpp
r1702 r2212 70 70 71 71 // get the filename for the database and make sure it exists 72 gdbm_filename = filename_cat( collectdir,"index","text",collection);72 gdbm_filename = filename_cat(gdbmhome, "collect", collection, "index", "text", collection); 73 73 74 74 if (littleEndian()) gdbm_filename += ".ldb"; -
trunk/gsdl/src/colservr/filter.cpp
r1285 r2212 46 46 else if (key == "collectdir") collectdir = value; 47 47 else if (key == "gsdlhome") gsdlhome = value; 48 else if (key == "gdbmhome") gdbmhome = value; 48 49 else if ((key == "filteroptdefault") && (cfgline.size() == 2)) { 49 50 // see if this filter has an option with this name … … 69 70 } 70 71 72 if (gdbmhome.empty()) gdbmhome = gsdlhome; 73 71 74 // get the collection directory name 72 75 if (collectdir.empty()) { -
trunk/gsdl/src/colservr/filter.h
r1285 r2212 36 36 protected: 37 37 text_t gsdlhome; 38 text_t gdbmhome; 38 39 text_t collection; 39 40 text_t collectdir; -
trunk/gsdl/src/colservr/mggdbmsource.cpp
r1459 r2212 78 78 // get the collection directory name 79 79 if (collectdir.empty()) { 80 collectdir = filename_cat (g dbmhome, "collect", collection);80 collectdir = filename_cat (gsdlhome, "collect", collection); 81 81 } 82 82 83 83 // get the filename for the database and make sure it exists 84 gdbm_filename = filename_cat(collectdir,"index","text",collection); 85 84 gdbm_filename = filename_cat(gdbmhome, "collect", collection, "index", "text", collection); 86 85 if (littleEndian()) gdbm_filename += ".ldb"; 87 86 else gdbm_filename += ".bdb"; -
trunk/gsdl/src/colservr/queryfilter.cpp
r1860 r2212 339 339 340 340 // get the filename for the database and make sure it exists 341 gdbm_filename = filename_cat( collectdir,"index","text",collection);341 gdbm_filename = filename_cat(gdbmhome, "collect", collection, "index", "text", collection); 342 342 343 343 if (littleEndian()) gdbm_filename += ".ldb"; -
trunk/gsdl/src/recpt/action.cpp
r1285 r2212 42 42 // configure should be called once for each configuration line 43 43 void action::configure (const text_t &key, const text_tarray &cfgline) { 44 if (key == "gsdlhome") {gsdlhome = cfgline[0];} 44 if (key == "gsdlhome") { 45 gsdlhome = cfgline[0]; 46 if (gdbmhome.empty()) gdbmhome = cfgline[0]; 47 } 48 if (key == "gdbmhome") {gdbmhome = cfgline[0];} 45 49 } 46 50 -
trunk/gsdl/src/recpt/action.h
r1285 r2212 48 48 cgiargsinfoclass argsinfo; 49 49 text_t gsdlhome; 50 text_t gdbmhome; 50 51 51 52 public: -
trunk/gsdl/src/recpt/authenaction.cpp
r1796 r2212 131 131 else if (key == "keyfile") keyfile = cfgline[0]; 132 132 else if (key == "keydecay") keydecay = cfgline[0].getint(); 133 else if (key == "gsdlhome") {134 if (usersfile.empty())135 usersfile = filename_cat (cfgline[0], "etc", "users.db");136 if (keyfile.empty())137 keyfile = filename_cat (cfgline[0], "etc", "key.db");138 }139 133 } 140 134 … … 143 137 144 138 bool authenaction::init (ostream &logout) { 139 140 if (gdbmhome.empty()) { 141 logout << "ERROR (authenaction::init) gdbmhome is not set\n"; 142 return false; 143 } 144 145 if (usersfile.empty()) usersfile = filename_cat (gdbmhome, "etc", "users.db"); 146 if (keyfile.empty()) keyfile = filename_cat (gdbmhome, "etc", "key.db"); 147 145 148 return action::init (logout); 146 149 } -
trunk/gsdl/src/recpt/nullproto.cpp
r2173 r2212 72 72 // the protocol should not configure the collection set; it should be 73 73 // done direct to the collection server set 74 if (key == "gsdlhome" ) {74 if (key == "gsdlhome" || key == "gdbmhome") { 75 75 cset->configure(key, cfgline); 76 76 } -
trunk/gsdl/src/recpt/queryaction.cpp
r1915 r2212 735 735 text_t userid = args["z"]; 736 736 text_tarray entries; 737 if (get_history_info (userid, entries, g sdlhome, logout)) {737 if (get_history_info (userid, entries, gdbmhome, logout)) { 738 738 int count = 1; 739 739 text_tarray::iterator here = entries.begin(); … … 1397 1397 int hd = args.getintarg("hd"); 1398 1398 if (hd > 0) display=true; 1399 if (set_history_info(userid, query, g sdlhome, display)) return true;1399 if (set_history_info(userid, query, gdbmhome, display)) return true; 1400 1400 else return false; 1401 1401 -
trunk/gsdl/src/recpt/receptionist.cpp
r2113 r2212 206 206 cgiarginfo *info = NULL; 207 207 if (key == "gsdlhome") configinfo.gsdlhome = cfgline[0]; 208 else if (key == "gdbmhome") configinfo.gdbmhome = cfgline[0]; 208 209 else if (key == "collection") { 209 210 configinfo.collection = cfgline[0]; … … 660 661 } 661 662 662 text_t logfile = filename_cat (configinfo.gsdlhome, "etc"); 663 logfile = filename_cat (logfile, "usage.txt"); 663 text_t logfile = filename_cat (configinfo.gdbmhome, "etc", "usage.txt"); 664 664 665 665 text_t logstr = script_name; -
trunk/gsdl/src/recpt/statusaction.cpp
r2113 r2212 906 906 ostream &textout, ostream &/*logout*/) { 907 907 908 text_t maincfgfile = filename_cat (g sdlhome, "etc", "main.cfg");908 text_t maincfgfile = filename_cat (gdbmhome, "etc", "main.cfg"); 909 909 910 910 textout << outconvert << disp << "_status:infoheader_(main.cfg)\n" -
trunk/gsdl/src/recpt/usersaction.cpp
r1285 r2212 148 148 if (cfgline.size() == 1) { 149 149 if (key == "usersfile") usersfile = cfgline[0]; 150 else if (key == "gsdlhome") {151 if (usersfile.empty())152 usersfile = filename_cat (cfgline[0], "etc", "users.db");153 }154 150 } 155 151 156 152 action::configure (key, cfgline); 153 } 154 155 bool usersaction::init (ostream &logout) { 156 157 if (gdbmhome.empty()) { 158 logout << "ERROR (usersaction::init) gdbmhome is not set\n"; 159 return false; 160 } 161 162 if (usersfile.empty()) usersfile = filename_cat (gdbmhome, "etc", "users.db"); 163 164 return action::init (logout); 157 165 } 158 166 -
trunk/gsdl/src/recpt/usersaction.h
r1285 r2212 42 42 43 43 void configure (const text_t &key, const text_tarray &cfgline); 44 45 bool init (ostream &logout); 44 46 45 47 text_t get_action_name () {return "um";} -
trunk/gsdl/src/w32server/cgiwrapper.cpp
r1918 r2212 228 228 } 229 229 230 static void page_errorparseargs (const text_t & gsdlhome) {230 static void page_errorparseargs (const text_t &/*gsdlhome*/) { 231 231 232 232 text_t message = "Error\n\n" … … 238 238 } 239 239 240 static void page_errorcgipage (const text_t & gsdlhome) {240 static void page_errorcgipage (const text_t &/*gsdlhome*/) { 241 241 242 242 text_t message = "Error\n\n" … … 351 351 // required to create a collection specific receptionist 352 352 text_t collection = ""; 353 text_tset g sdlhomes;353 text_tset gdbmhomes; 354 354 text_tset collections; 355 355 … … 371 371 // collection specific receptionist - one collection, one gsdlhome 372 372 collections.insert (collection); 373 g sdlhomes.insert (gsdl_gsdlhome);373 gdbmhomes.insert (gsdl_gdbmhome); 374 374 collectioninfo_t tmp; 375 375 tmp.gsdl_gsdlhome = gsdl_gsdlhome; … … 387 387 colinfo_tmap::const_iterator end_info = gsdl_collectinfo.end(); 388 388 while (this_info != end_info) { 389 if (g sdlhomes.find ((*this_info).second.gsdl_gsdlhome) == gsdlhomes.end()) {389 if (gdbmhomes.find ((*this_info).second.gsdl_gdbmhome) == gdbmhomes.end()) { 390 390 these_collections.erase (these_collections.begin(), these_collections.end()); 391 391 read_dir (filename_cat ((*this_info).second.gsdl_gsdlhome, "collect"), these_collections); … … 411 411 colhere ++; 412 412 } 413 g sdlhomes.insert ((*this_info).second.gsdl_gsdlhome);413 gdbmhomes.insert ((*this_info).second.gsdl_gdbmhome); 414 414 } 415 415 this_info ++; 416 416 } 417 417 418 // then if necessary the main g sdlhome (this should only happen if the419 // gsdl.ini is a little screwed up and no volume g sdlhomes occurred420 if (g sdlhomes.find (gsdl_gsdlhome) == gsdlhomes.end()) {418 // then if necessary the main gdbmhome (this should only happen if the 419 // gsdl.ini is a little screwed up and no volume gdbmhomes occurred) 420 if (gdbmhomes.find (gsdl_gdbmhome) == gdbmhomes.end()) { 421 421 these_collections.erase (these_collections.begin(), these_collections.end()); 422 read_dir (filename_cat (gsdl_g sdlhome, "collect"), these_collections);422 read_dir (filename_cat (gsdl_gdbmhome, "collect"), these_collections); 423 423 colhere = these_collections.begin(); 424 424 colend = these_collections.end(); … … 431 431 colhere ++; 432 432 } 433 g sdlhomes.insert (gsdl_gsdlhome);433 gdbmhomes.insert (gsdl_gdbmhome); 434 434 } 435 435 } … … 525 525 // set defaults 526 526 recpt.configure ("gsdlhome", gsdl_gsdlhome); 527 recpt.configure ("gdbmhome", gsdl_gdbmhome); 527 528 recpt.configure ("collection", collection); 528 529 … … 543 544 } 544 545 545 // read in config files of each g sdlhome (in no particular order)546 // read in config files of each gdbmhome (in no particular order) 546 547 // those read in last will override those read earlier 547 548 // collections being used together in this way should be 548 549 // careful not to have main.cfg files that might 549 550 // screw with each other. 550 text_tset::const_iterator thome = g sdlhomes.begin();551 text_tset::const_iterator ehome = g sdlhomes.end();551 text_tset::const_iterator thome = gdbmhomes.begin(); 552 text_tset::const_iterator ehome = gdbmhomes.end(); 552 553 while (thome != ehome) { 553 554 if (!main_cfg_read (recpt, *thome, collection)) {
Note:
See TracChangeset
for help on using the changeset viewer.