diff --git a/src/rcldb/rcldb.h b/src/rcldb/rcldb.h index 5bf6b621..a1c86415 100644 --- a/src/rcldb/rcldb.h +++ b/src/rcldb/rcldb.h @@ -16,7 +16,7 @@ */ #ifndef _DB_H_INCLUDED_ #define _DB_H_INCLUDED_ -/* @(#$Id: rcldb.h,v 1.64 2008-12-17 08:01:40 dockes Exp $ (C) 2004 J.F.Dockes */ +/* @(#$Id: rcldb.h,v 1.65 2008-12-19 09:55:36 dockes Exp $ (C) 2004 J.F.Dockes */ #include #include @@ -187,7 +187,9 @@ class Db { /** Test if terms stem to different roots. */ bool stemDiffers(const string& lang, const string& term, const string& base); - + + RclConfig *getConf() {return m_config;} + /* This has to be public for access by embedded Query::Native */ Native *m_ndb; diff --git a/src/rcldb/rclquery.cpp b/src/rcldb/rclquery.cpp index fa54c833..5d07029b 100644 --- a/src/rcldb/rclquery.cpp +++ b/src/rcldb/rclquery.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: rclquery.cpp,v 1.10 2008-10-07 06:44:23 dockes Exp $ (C) 2008 J.F.Dockes"; +static char rcsid[] = "@(#$Id: rclquery.cpp,v 1.11 2008-12-19 09:55:36 dockes Exp $ (C) 2008 J.F.Dockes"; #endif #include @@ -113,8 +113,7 @@ Db *Query::whatDb() } void Query::setSortBy(const string& fld, bool ascending) { - RclConfig *cfg = RclConfig::getMainConfig(); - m_sortField = cfg->fieldCanon(fld); + m_sortField = m_db->getConf()->fieldCanon(fld); m_sortAscending = ascending; LOGDEB0(("RclQuery::setSortBy: [%s] %s\n", m_sortField.c_str(), m_sortAscending ? "ascending" : "descending")); diff --git a/src/rcldb/searchdata.cpp b/src/rcldb/searchdata.cpp index ccf5bd54..14117a1b 100644 --- a/src/rcldb/searchdata.cpp +++ b/src/rcldb/searchdata.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: searchdata.cpp,v 1.31 2008-12-19 09:44:39 dockes Exp $ (C) 2006 J.F.Dockes"; +static char rcsid[] = "@(#$Id: searchdata.cpp,v 1.32 2008-12-19 09:55:36 dockes Exp $ (C) 2006 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -100,7 +100,7 @@ bool SearchData::toNativeQuery(Rcl::Db &db, void *d) vector exptps; exptps.reserve(m_filetypes.size()); // Expand categories - RclConfig *cfg = RclConfig::getMainConfig(); + RclConfig *cfg = db.getConf(); for (vector::iterator it = m_filetypes.begin(); it != m_filetypes.end(); it++) { if (cfg && cfg->isMimeCategory(*it)) {