Mercurial > hg > orthanc
changeset 1355:28563d910039
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 13 May 2015 13:16:49 +0200 |
parents | 3dd494f201a1 |
children | ab9f3d5910bd |
files | OrthancServer/ResourceFinder.cpp OrthancServer/ResourceFinder.h |
diffstat | 2 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/ResourceFinder.cpp Wed May 13 12:17:35 2015 +0200 +++ b/OrthancServer/ResourceFinder.cpp Wed May 13 13:16:49 2015 +0200 @@ -286,7 +286,8 @@ ResourceFinder::ResourceFinder(ServerIndex& index) : index_(index), level_(ResourceType_Patient), - caseSensitive_(true) + caseSensitive_(true), + nonMainTagsIgnored_(false) { } @@ -361,7 +362,8 @@ ApplyAtLevel(candidates, ResourceType_Instance); } - if (!query_.empty()) + if (!nonMainTagsIgnored_ && + !query_.empty()) { LOG(ERROR) << "Invalid query: Searching against a tag that is not valid for the requested level"; throw OrthancException(ErrorCode_BadRequest);
--- a/OrthancServer/ResourceFinder.h Wed May 13 12:17:35 2015 +0200 +++ b/OrthancServer/ResourceFinder.h Wed May 13 13:16:49 2015 +0200 @@ -48,6 +48,7 @@ ServerIndex& index_; ResourceType level_; bool caseSensitive_; + bool nonMainTagsIgnored_; Query query_; static void ExtractTagsForLevel(Query& result, @@ -70,6 +71,16 @@ caseSensitive_ = sensitive; } + bool NonMainTagsIgnored() const + { + return nonMainTagsIgnored_; + } + + void SetNonMainTagsIgnored(bool ignored) + { + nonMainTagsIgnored_ = ignored; + } + ResourceType GetLevel() const { return level_;