Ignore:
Timestamp:
2000-02-22T11:01:02+13:00 (24 years ago)
Author:
sjboddie
Message:

gsdlhome now comes from gsdlsite.cfg

File:
1 edited

Legend:

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

    r939 r963  
    2828/*
    2929  $Log$
     30  Revision 1.3  2000/02/21 22:01:02  sjboddie
     31  gsdlhome now comes from gsdlsite.cfg
     32
    3033  Revision 1.2  2000/02/17 02:40:21  sjboddie
    3134  tidied up a bit - fixed a bug (gdbm file wasn't always being closed properly)
     
    3538
    3639#include "historydb.h"
    37 #include "gsdlhome.h"
    3840#include "fileutil.h"
    3941#include "cgiutils.h"
     
    4446// returns true on success (in which case historyinfo will contain
    4547// the information for this history)
    46 bool get_history_info (const text_t &userid, text_tarray &historyinfo, ostream &logout) {
    47 
    48   text_t historyfile = filename_cat(GSDL_GSDLHOME, "etc", "history.db");
     48bool get_history_info (const text_t &userid, text_tarray &historyinfo,
     49               const text_t &gsdlhome, ostream &logout) {
     50
     51  text_t historyfile = filename_cat(gsdlhome, "etc", "history.db");
    4952 
    5053  bool result = false;
     
    7477
    7578// returns true on success
    76 bool set_history_info (const text_t &userid, const text_t &history) {
    77 
    78   text_t historyfile = filename_cat(GSDL_GSDLHOME, "etc", "history.db");
     79bool set_history_info (const text_t &userid, const text_t &history, const text_t &gsdlhome) {
     80
     81  text_t historyfile = filename_cat(gsdlhome, "etc", "history.db");
    7982 
    8083  bool result = false;
     
    126129
    127130// deletes all a users history
    128 bool delete_all_history_info (const text_t &userid) {
    129 
    130   text_t historyfile = filename_cat(GSDL_GSDLHOME, "etc", "history.db");
     131bool delete_all_history_info (const text_t &userid, const text_t &gsdlhome) {
     132
     133  text_t historyfile = filename_cat(gsdlhome, "etc", "history.db");
    131134 
    132135  // open the history database 
     
    142145
    143146//deletes only the selected records
    144 bool delete_history_info(const text_t &userid, const text_t &deletemode, const text_t &selection) {
    145 
    146   text_t historyfile = filename_cat(GSDL_GSDLHOME, "etc", "history.db");
     147bool delete_history_info (const text_t &userid, const text_t &deletemode,
     148              const text_t &selection, const text_t &gsdlhome) {
     149
     150  text_t historyfile = filename_cat(gsdlhome, "etc", "history.db");
    147151  bool result;
    148152  // open the history database 
     
    305309// replaces a reference to a previous query with the search
    306310// string from that query
    307 bool combine_query(text_t &userid, text_t &query)
     311bool combine_query(text_t &userid, text_t &query, const text_t &gsdlhome)
    308312{
    309313  text_t::iterator begin = query.begin();
     
    314318 
    315319  text_t queryresult = "";
    316   text_t historyfile = filename_cat(GSDL_GSDLHOME, "etc", "history.db");
     320  text_t historyfile = filename_cat(gsdlhome, "etc", "history.db");
    317321  text_t historyresult;
    318322  // open the history database 
Note: See TracChangeset for help on using the changeset viewer.