mirror of https://github.com/kiwix/libkiwix.git
Merge branch 'master' of ssh://git.code.sf.net/p/kiwix/kiwix
This commit is contained in:
commit
2f7e909b88
|
@ -91,8 +91,8 @@ namespace kiwix {
|
|||
/* Try to find it */
|
||||
std::vector<kiwix::Book>::iterator itr;
|
||||
for ( itr = this->books.begin(); itr != this->books.end(); ++itr ) {
|
||||
if (itr->id == book.id && (itr->readOnly == book.readOnly || book.readOnly)) {
|
||||
|
||||
if (itr->id == book.id) {
|
||||
if (!itr->readOnly) {
|
||||
itr->readOnly = book.readOnly;
|
||||
|
||||
if (itr->path.empty())
|
||||
|
@ -118,6 +118,7 @@ namespace kiwix {
|
|||
itr->favicon = book.favicon;
|
||||
itr->faviconMimeType = book.faviconMimeType;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -142,9 +142,6 @@ namespace kiwix {
|
|||
if (!itr->path.empty())
|
||||
bookNode.append_attribute("path") = itr->path.c_str();
|
||||
|
||||
if (!itr->pathAbsolute.empty())
|
||||
bookNode.append_attribute("pathAbsolute") = itr->pathAbsolute.c_str();
|
||||
|
||||
if (!itr->last.empty() && itr->last != "undefined") {
|
||||
bookNode.append_attribute("last") = itr->last.c_str();
|
||||
}
|
||||
|
@ -152,9 +149,6 @@ namespace kiwix {
|
|||
if (!itr->indexPath.empty())
|
||||
bookNode.append_attribute("indexPath") = itr->indexPath.c_str();
|
||||
|
||||
if (!itr->indexPathAbsolute.empty())
|
||||
bookNode.append_attribute("indexPathAbsolute") = itr->indexPathAbsolute.c_str();
|
||||
|
||||
if (!itr->indexPath.empty() || !itr->indexPathAbsolute.empty()) {
|
||||
if (itr->indexType == XAPIAN)
|
||||
bookNode.append_attribute("indexType") = "xapian";
|
||||
|
|
Loading…
Reference in New Issue