minor errors

This commit is contained in:
konovalovsergey
2016-03-30 12:24:32 +03:00
committed by Alexander.Trofimov
parent 6b0f2c56b0
commit 855ca7c9f5
3 changed files with 5 additions and 4 deletions

View File

@ -373,7 +373,7 @@ exports.getImageFormat = function(buffer, optExt) {
format = constants.AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_SVG;
} else {
//пробуем по расширению
if (optExt.Length > 0 && '.' == optExt[0]) {
if (optExt.length > 0 && '.' == optExt[0]) {
optExt = optExt.substring(1);
}
format = exports.getFormatFromString(optExt);

View File

@ -416,11 +416,12 @@ function* getAllPresence(docId, optZRange, optHVals) {
var now = (new Date()).getTime();
var expiredKeys;
var hvals;
var multi;
if (optHVals && optZRange) {
expiredKeys = optZRange;
hvals = optHVals;
} else {
var multi = redisClient.multi([
multi = redisClient.multi([
['zrangebyscore', redisKeyPresenceSet + docId, 0, now],
['hvals', redisKeyPresenceHash + docId]
]);
@ -429,7 +430,7 @@ function* getAllPresence(docId, optZRange, optHVals) {
hvals = multiRes[1];
}
if (expiredKeys.length > 0) {
var multi = [
var commands = [
['zremrangebyscore', redisKeyPresenceSet + docId, 0, now]
];
var expiredKeysMap = {};

View File

@ -1,5 +1,5 @@
var pg = require('pg');
var configSql = require('config').get('services.CoAuthoring.sql')
var configSql = require('config').get('services.CoAuthoring.sql');
var connectionString = 'postgres://' + configSql.get('dbUser') + ':' + configSql.get('dbPass') + '@' + configSql.get('dbHost') +
(configSql.get('dbPort') ? (':' + configSql.get('dbPort')) : '') + '/' + configSql.get('dbName');