Mercurial > hg > orthanc
comparison OrthancServer/Sources/main.cpp @ 4628:5fabef29c4ff db-changes
added new primitive "hasRevisionsSupport" in database SDK, added "CheckRevisions" to URI "/system"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 20 Apr 2021 15:59:31 +0200 |
parents | 95ffe3b6ef7c |
children | 66109d24d26e |
comparison
equal
deleted
inserted
replaced
4627:f7d5372b59b3 | 4628:5fabef29c4ff |
---|---|
1487 boost::lexical_cast<std::string>(currentVersion) + " to " + | 1487 boost::lexical_cast<std::string>(currentVersion) + " to " + |
1488 boost::lexical_cast<std::string>(ORTHANC_DATABASE_VERSION) + | 1488 boost::lexical_cast<std::string>(ORTHANC_DATABASE_VERSION) + |
1489 ": Please run Orthanc with the \"--upgrade\" argument"); | 1489 ": Please run Orthanc with the \"--upgrade\" argument"); |
1490 } | 1490 } |
1491 | 1491 |
1492 { | |
1493 static const char* const CHECK_REVISIONS = "CheckRevisions"; | |
1494 | |
1495 OrthancConfiguration::ReaderLock lock; | |
1496 if (lock.GetConfiguration().GetBooleanParameter(CHECK_REVISIONS, false)) | |
1497 { | |
1498 if (database.HasRevisionsSupport()) | |
1499 { | |
1500 LOG(INFO) << "Handling of revisions is enabled, and the custom database back-end *has* " | |
1501 << "support for revisions of metadata and attachments"; | |
1502 } | |
1503 else | |
1504 { | |
1505 LOG(WARNING) << "The custom database back-end has *no* support for revisions of metadata and attachments, " | |
1506 << "but configuration option \"" << CHECK_REVISIONS << "\" is set to \"true\""; | |
1507 } | |
1508 } | |
1509 } | |
1510 | |
1492 bool success = ConfigureServerContext | 1511 bool success = ConfigureServerContext |
1493 (database, storageArea, plugins, loadJobsFromDatabase); | 1512 (database, storageArea, plugins, loadJobsFromDatabase); |
1494 | 1513 |
1495 database.Close(); | 1514 database.Close(); |
1496 | 1515 |