diff --git a/arangosh/ArangoShell/ArangoClient.cpp b/arangosh/ArangoShell/ArangoClient.cpp index 13b8e98c92..ca296fc0ba 100644 --- a/arangosh/ArangoShell/ArangoClient.cpp +++ b/arangosh/ArangoShell/ArangoClient.cpp @@ -489,7 +489,7 @@ void ArangoClient::printErrLine (const string& s) { void ArangoClient::_printLine(const string &s) { #ifdef _WIN32 - LPWSTR wBuf = (LPWSTR)TRI_Allocate(TRI_CORE_MEM_ZONE, (sizeof WCHAR)* (s.size() + 1), true); + LPWSTR wBuf = (LPWSTR) TRI_Allocate(TRI_CORE_MEM_ZONE, (sizeof WCHAR)* (s.size() + 1), true); int wLen = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, wBuf, (int) ((sizeof WCHAR) * (s.size() + 1))); if (wLen) { @@ -500,11 +500,6 @@ void ArangoClient::_printLine(const string &s) { pos = bufferInfo.dwCursorPosition; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); WriteConsoleOutputCharacterW(GetStdHandle(STD_OUTPUT_HANDLE), wBuf, (DWORD) s.size(), pos, &n); - // Workaround recomended by - // http://social.msdn.microsoft.com/Forums/de-DE/c16846a3-eb27-4698-80a5-6c4ecf92a799/aus-der-msdnhotline-deutsche-umlaute-in-der-console-anzeigen-standard-c?forum=visualcplusde - // but it does not work - // std::locale::global(std::locale("German_germany")); - // std::cout << "esteban: " << s; } else { fprintf(stdout, "window error: '%d' \r\n", GetLastError()); @@ -519,12 +514,12 @@ void ArangoClient::_printLine(const string &s) { void ArangoClient::printLine (const string& s, bool forceNewLine) { #ifdef _WIN32 - // no, we can use std::cout as this doesn't support UTF-8 on Windows + // no, we cannot use std::cout as this doesn't support UTF-8 on Windows //fprintf(stdout, "%s\r\n", s.c_str()); TRI_vector_string_t subStrings = TRI_SplitString(s.c_str(), '\n'); bool hasNewLines = (s.find("\n") != string::npos) | forceNewLine; if (hasNewLines) { - for (int i = 0; i < subStrings._length; i++) { + for (size_t i = 0; i < subStrings._length; i++) { _printLine(subStrings._buffer[i]); _newLine(); } @@ -539,13 +534,15 @@ void ArangoClient::printLine (const string& s, bool forceNewLine) { } //////////////////////////////////////////////////////////////////////////////// -/// @brief prints a string to stdout, without a newline +/// @brief prints a string to stdout, without a newline (Non-Windows only) +/// on Windows, we'll print the line and a newline //////////////////////////////////////////////////////////////////////////////// void ArangoClient::printContinuous (const string& s) { - // no, we can use std::cout as this doesn't support UTF-8 on Windows + // no, we cannot use std::cout as this doesn't support UTF-8 on Windows #ifdef _WIN32 - printLine(s); + // On Windows, we just print the line followed by a newline + printLine(s, true); #else fprintf(stdout, "%s", s.c_str()); fflush(stdout); diff --git a/configure.ac b/configure.ac index b54e98f5b7..d08aa669aa 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl ============================================================================ dnl --SECTION-- triAGENS GmbH Build Environment dnl ============================================================================ -AC_INIT([triAGENS ArangoDB], [2.1.0-devel], [info@triagens.de], [arangodb], [http://www.arangodb.org]) +AC_INIT([triAGENS ArangoDB], [2.1.4-devel], [info@triagens.de], [arangodb], [http://www.arangodb.org]) dnl ---------------------------------------------------------------------------- dnl auxillary directory for install-sh and missing diff --git a/js/apps/system/aardvark/frontend/js/arango/arango.js b/js/apps/system/aardvark/frontend/js/arango/arango.js index 6cfc242050..5ecc90aa04 100644 --- a/js/apps/system/aardvark/frontend/js/arango/arango.js +++ b/js/apps/system/aardvark/frontend/js/arango/arango.js @@ -34,26 +34,6 @@ }, toString: function (v) { return v.major + '.' + v.minor + '.' + v.patch; - }, - toStringMainLine: function (v) { - return v.major + '.' + v.minor; - }, - compareVersions: function (l, r) { - if (l.major === r.major) { - if (l.minor === r.minor) { - if (l.patch === r.patch) { - return 0; - } - return l.patch - r.patch; - } - return l.minor - r.minor; - } - return l.major - r.major; - }, - compareVersionStrings: function (l, r) { - l = window.versionHelper.fromString(l); - r = window.versionHelper.fromString(r); - return window.versionHelper.compareVersions(l, r); } }; diff --git a/js/apps/system/aardvark/frontend/js/collections/arangoDocuments.js b/js/apps/system/aardvark/frontend/js/collections/arangoDocuments.js index aa12ae6e21..284d65e302 100644 --- a/js/apps/system/aardvark/frontend/js/collections/arangoDocuments.js +++ b/js/apps/system/aardvark/frontend/js/collections/arangoDocuments.js @@ -84,7 +84,10 @@ queryObj = { query: query, - bindVars: bindVars + bindVars: bindVars, + options: { + fullCount: true + } }; $.ajax({ cache: false, diff --git a/js/apps/system/aardvark/test/specs/arango/arangoSpec.js b/js/apps/system/aardvark/test/specs/arango/arangoSpec.js index f2d5682328..b6d1f98ada 100644 --- a/js/apps/system/aardvark/test/specs/arango/arangoSpec.js +++ b/js/apps/system/aardvark/test/specs/arango/arangoSpec.js @@ -56,4 +56,10 @@ describe("Arango Helper", function() { }); + describe("checking html escaping", function() { + var input = "<&>\"'", + expected = "<&>"'"; + expect(arangoHelper.escapeHtml(input)).toEqual(expected); + }); + });