1
0
Fork 0
This commit is contained in:
Jan 2018-06-28 20:15:33 +02:00 committed by GitHub
parent 96cbe699b9
commit 5af37176d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 8 deletions

View File

@ -96,11 +96,7 @@ RestStatus RestIndexHandler::getIndexes() {
return RestStatus::DONE;
}
bool withFigures = false;
std::string t = _request->value("withStats", found);
if (found) {
withFigures = StringUtils::tolower(t) == "true";
}
bool withFigures = _request->parsedValue("withStats", false);
VPackBuilder indexes;
Result res = methods::Indexes::getAll(coll, withFigures, indexes);

View File

@ -1588,7 +1588,7 @@ std::string itoa(uint64_t attr) {
}
std::string ftoa(double i) {
char buffer[64];
char buffer[24];
int length = fpconv_dtoa(i, &buffer[0]);
return std::string(&buffer[0], static_cast<size_t>(length));
@ -1599,10 +1599,11 @@ std::string ftoa(double i) {
// .............................................................................
bool boolean(std::string const& str) {
std::string lower = tolower(trim(str));
std::string lower = trim(str);
tolowerInPlace(&lower);
if (lower == "true" || lower == "yes" || lower == "on" || lower == "y" ||
lower == "1") {
lower == "1" || lower == "") {
return true;
} else {
return false;