comparison OrthancServer/OrthancRestApi/OrthancRestModalities.cpp @ 1142:952cf9b6be83

Configuration option to disable the logging of exported resources
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Sep 2014 10:23:22 +0200
parents 0332e6e8c679
children 0561f2087cc9
comparison
equal deleted inserted replaced
1141:2ff467bcfb98 1142:952cf9b6be83
290 return false; 290 return false;
291 } 291 }
292 292
293 if (request.isString()) 293 if (request.isString())
294 { 294 {
295 context.GetIndex().LogExportedResource(request.asString(), remote); 295 if (Configuration::GetGlobalBoolParameter("LogExportedResources", true))
296 {
297 context.GetIndex().LogExportedResource(request.asString(), remote);
298 }
299
296 context.GetIndex().GetChildInstances(instances, request.asString()); 300 context.GetIndex().GetChildInstances(instances, request.asString());
297 } 301 }
298 else if (request.isArray()) 302 else if (request.isArray())
299 { 303 {
300 for (Json::Value::ArrayIndex i = 0; i < request.size(); i++) 304 for (Json::Value::ArrayIndex i = 0; i < request.size(); i++)
308 if (!Toolbox::IsSHA1(stripped)) 312 if (!Toolbox::IsSHA1(stripped))
309 { 313 {
310 return false; 314 return false;
311 } 315 }
312 316
313 context.GetIndex().LogExportedResource(stripped, remote); 317 if (Configuration::GetGlobalBoolParameter("LogExportedResources", true))
318 {
319 context.GetIndex().LogExportedResource(stripped, remote);
320 }
314 321
315 std::list<std::string> tmp; 322 std::list<std::string> tmp;
316 context.GetIndex().GetChildInstances(tmp, stripped); 323 context.GetIndex().GetChildInstances(tmp, stripped);
317 324
318 for (std::list<std::string>::const_iterator 325 for (std::list<std::string>::const_iterator