diff --git a/src/common/kiwix/manager.cpp b/src/common/kiwix/manager.cpp index ac311c423..b4f017954 100644 --- a/src/common/kiwix/manager.cpp +++ b/src/common/kiwix/manager.cpp @@ -225,7 +225,7 @@ namespace kiwix { /* Add a book to the library. Return empty string if failed, book id otherwise */ string Manager::addBookFromPathAndGetId(const string pathToOpen, const string pathToSave, - const string url, const string origId, const bool checkMetaData) { + const string url, const bool checkMetaData, const string origId) { kiwix::Book book; if (this->readBookFromPath(pathToOpen, &book)) { @@ -249,8 +249,8 @@ namespace kiwix { } /* Wrapper over Manager::addBookFromPath which return a bool instead of a string */ - bool Manager::addBookFromPath(const string pathToOpen, const string pathToSave, const string url, const string origId, const bool checkMetaData) { - return !(this->addBookFromPathAndGetId(pathToOpen, pathToSave, url, origId, checkMetaData).empty()); + bool Manager::addBookFromPath(const string pathToOpen, const string pathToSave, const string url, const bool checkMetaData, const string origId) { + return !(this->addBookFromPathAndGetId(pathToOpen, pathToSave, url, checkMetaData, origId).empty()); } bool Manager::readBookFromPath(const string path, kiwix::Book *book) { diff --git a/src/common/kiwix/manager.h b/src/common/kiwix/manager.h index 063fca0bd..dc2544866 100644 --- a/src/common/kiwix/manager.h +++ b/src/common/kiwix/manager.h @@ -55,10 +55,10 @@ namespace kiwix { string getCurrentBookId(); bool setBookIndex(const string id, const string path, const supportedIndexType type); bool setBookPath(const string id, const string path); - string addBookFromPathAndGetId(const string pathToOpen, const string pathToSave = "", const string url = "", const string origID="", - const bool checkMetaData = false); - bool addBookFromPath(const string pathToOpen, const string pathToSave = "", const string url = "", const string origID="", - const bool checkMetaData = false); + string addBookFromPathAndGetId(const string pathToOpen, const string pathToSave = "", const string url = "", + const bool checkMetaData = false, const string origID=""); + bool addBookFromPath(const string pathToOpen, const string pathToSave = "", const string url = "", + const bool checkMetaData = false, const string origID=""); Library cloneLibrary(); bool getBookById(const string id, Book &book); bool getCurrentBook(Book &book);