|
a/src/common/rclconfig.cpp |
|
b/src/common/rclconfig.cpp |
|
... |
|
... |
588 |
LOGDEB(("RclConfig::readFieldsConfig: [%s] => [%s]\n",
|
588 |
LOGDEB(("RclConfig::readFieldsConfig: [%s] => [%s]\n",
|
589 |
it->first.c_str(), it->second.c_str()));
|
589 |
it->first.c_str(), it->second.c_str()));
|
590 |
}
|
590 |
}
|
591 |
#endif
|
591 |
#endif
|
592 |
|
592 |
|
593 |
string ss;
|
593 |
list<string> sl = m_fields->getNames("stored");
|
594 |
if (m_fields->get("stored", ss, "stored")) {
|
594 |
if (!sl.empty()) {
|
595 |
list<string> sl;
|
|
|
596 |
stringToStrings(ss, sl);
|
|
|
597 |
for (list<string>::const_iterator it = sl.begin();
|
595 |
for (list<string>::const_iterator it = sl.begin();
|
598 |
it != sl.end(); it++) {
|
596 |
it != sl.end(); it++) {
|
599 |
string fld = fieldCanon(stringtolower(*it));
|
597 |
string fld = fieldCanon(stringtolower(*it));
|
600 |
m_storedFields.insert(fld);
|
598 |
m_storedFields.insert(fld);
|
601 |
}
|
599 |
}
|
|
... |
|
... |
633 |
// Return specialisations of field name for search expansion
|
631 |
// Return specialisations of field name for search expansion
|
634 |
// (ie: author->[author, from])
|
632 |
// (ie: author->[author, from])
|
635 |
bool RclConfig::getFieldSpecialisations(const string& fld,
|
633 |
bool RclConfig::getFieldSpecialisations(const string& fld,
|
636 |
list<string>& children, bool top)
|
634 |
list<string>& children, bool top)
|
637 |
{
|
635 |
{
|
|
|
636 |
if (m_fields == 0)
|
|
|
637 |
return false;
|
638 |
string sclds;
|
638 |
string sclds;
|
639 |
children.push_back(fld);
|
639 |
children.push_back(fld);
|
640 |
if (m_fields->get(fld, sclds, "specialisations")) {
|
640 |
if (m_fields->get(fld, sclds, "specialisations")) {
|
641 |
list<string> clds;
|
641 |
list<string> clds;
|
642 |
stringToStrings(sclds, clds);
|
642 |
stringToStrings(sclds, clds);
|
|
... |
|
... |
679 |
return it->second;
|
679 |
return it->second;
|
680 |
}
|
680 |
}
|
681 |
LOGDEB1(("RclConfig::fieldCanon: [%s] -> [%s]\n", f.c_str(), fld.c_str()));
|
681 |
LOGDEB1(("RclConfig::fieldCanon: [%s] -> [%s]\n", f.c_str(), fld.c_str()));
|
682 |
return fld;
|
682 |
return fld;
|
683 |
}
|
683 |
}
|
|
|
684 |
|
|
|
685 |
list<string> RclConfig::getFieldSectNames(const string &sk, const char* patrn)
|
|
|
686 |
{
|
|
|
687 |
if (m_fields == 0)
|
|
|
688 |
return list<string>();
|
|
|
689 |
return m_fields->getNames(sk, patrn);
|
|
|
690 |
}
|
|
|
691 |
|
|
|
692 |
bool RclConfig::getFieldConfParam(const string &name, const string &sk,
|
|
|
693 |
string &value)
|
|
|
694 |
{
|
|
|
695 |
if (m_fields == 0)
|
|
|
696 |
return false;
|
|
|
697 |
return m_fields->get(name, value, sk);
|
|
|
698 |
}
|
|
|
699 |
|
684 |
|
700 |
|
685 |
string RclConfig::getMimeViewerDef(const string &mtype, const string& apptag)
|
701 |
string RclConfig::getMimeViewerDef(const string &mtype, const string& apptag)
|
686 |
{
|
702 |
{
|
687 |
LOGDEB(("RclConfig::getMimeViewerDef: mtype %s apptag %s\n",
|
703 |
LOGDEB(("RclConfig::getMimeViewerDef: mtype %s apptag %s\n",
|
688 |
mtype.c_str(), apptag.c_str()));
|
704 |
mtype.c_str(), apptag.c_str()));
|