Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 161ddc9

Browse files
committed
More fixes for scrutinizer-ci (+ enable php)
1 parent 59b3224 commit 161ddc9

File tree

5 files changed

+17
-32
lines changed

5 files changed

+17
-32
lines changed

.scrutinizer.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ filter:
1111
- 'build/*'
1212
- 'data/*'
1313
checks:
14-
javascript: true
14+
javascript: true
15+
php: true

dev/External/ko.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ ko.bindingHandlers.tooltip = {
135135
init: function(oElement, fValueAccessor) {
136136

137137
var
138-
bi18n = true,
139138
sValue = '',
140139
Translator = null,
141140
$oEl = $(oElement),
@@ -145,7 +144,6 @@ ko.bindingHandlers.tooltip = {
145144

146145
if (!Globals.bMobileDevice || bMobile)
147146
{
148-
bi18n = 'on' === ($oEl.data('tooltip-i18n') || 'on');
149147
sValue = !ko.isObservable(fValue) && _.isFunction(fValue) ? fValue() : ko.unwrap(fValue);
150148

151149
oElement.__opentip = new Opentip(oElement, {
@@ -171,7 +169,7 @@ ko.bindingHandlers.tooltip = {
171169
oElement.__opentip.activate();
172170
}
173171

174-
if (bi18n)
172+
if ('on' === ($oEl.data('tooltip-i18n') || 'on'))
175173
{
176174
Translator = require('Common/Translator');
177175

@@ -207,8 +205,9 @@ ko.bindingHandlers.tooltip = {
207205
var sValue = !ko.isObservable(fValue) && _.isFunction(fValue) ? fValue() : ko.unwrap(fValue);
208206
if (sValue)
209207
{
210-
var i18n = 'on' === ($oEl.data('tooltip-i18n') || 'on');
211-
oElement.__opentip.setContent(i18n ? require('Common/Translator').i18n(sValue) : sValue);
208+
oElement.__opentip.setContent('on' === ($oEl.data('tooltip-i18n') || 'on') ?
209+
require('Common/Translator').i18n(sValue) : sValue);
210+
212211
oElement.__opentip.activate();
213212
}
214213
else

dev/Promises/AbstractAjax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ AbstractAjaxPromises.prototype.ajaxRequest = function(sAction, bPost, iTimeOut,
9090
}
9191

9292
// backward capability
93-
var sType = Enums.StorageResultType.Error;
93+
var sType = '';
9494
switch (true)
9595
{
9696
case 'success' === sTextStatus && oData && oData.Result && sAction === oData.Action:

dev/View/Popup/AddOpenPgpKey.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@ function AddOpenPgpKeyPopupView()
4646
return false;
4747
}
4848

49-
var
50-
done = false,
51-
match = null;
49+
var done = false;
5250

5351
do
5452
{
55-
match = reg.exec(keyTrimmed);
53+
var match = reg.exec(keyTrimmed);
5654
if (match && 0 < count)
5755
{
5856
if (match[0] && match[1] && match[2] && match[1] === match[2])

dev/View/Popup/Compose.js

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,13 +1380,9 @@ ComposePopupView.prototype.onBuild = function()
13801380
{
13811381
this.initUploader();
13821382

1383-
var
1384-
self = this,
1385-
oScript = null;
1383+
var self = this;
13861384

1387-
key('ctrl+q, command+q, ctrl+w, command+w', Enums.KeyState.Compose, function() {
1388-
return false;
1389-
});
1385+
key('ctrl+q, command+q, ctrl+w, command+w', Enums.KeyState.Compose, Utils.noopFalse);
13901386

13911387
key('`', Enums.KeyState.Compose, function() {
13921388
if (self.oEditor && !self.oEditor.hasFocus() && !Utils.inFocus())
@@ -1437,7 +1433,7 @@ ComposePopupView.prototype.onBuild = function()
14371433

14381434
if (this.dropboxEnabled() && this.dropboxApiKey() && !window.Dropbox)
14391435
{
1440-
oScript = window.document.createElement('script');
1436+
var oScript = window.document.createElement('script');
14411437
oScript.type = 'text/javascript';
14421438
oScript.src = 'https://www.dropbox.com/static/api/2/dropins.js';
14431439
$(oScript).attr('id', 'dropboxjs').attr('data-app-key', self.dropboxApiKey());
@@ -1690,19 +1686,16 @@ ComposePopupView.prototype.initUploader = function()
16901686
this.dragAndDropVisible(false);
16911687
}, this))
16921688
.on('onProgress', _.bind(function(sId, iLoaded, iTotal) {
1693-
var oItem = null;
1694-
if (Utils.isUnd(oUploadCache[sId]))
1689+
1690+
var oItem = oUploadCache[sId];
1691+
if (!oItem)
16951692
{
16961693
oItem = this.getAttachmentById(sId);
16971694
if (oItem)
16981695
{
16991696
oUploadCache[sId] = oItem;
17001697
}
17011698
}
1702-
else
1703-
{
1704-
oItem = oUploadCache[sId];
1705-
}
17061699

17071700
if (oItem)
17081701
{
@@ -1740,21 +1733,15 @@ ComposePopupView.prototype.initUploader = function()
17401733
}, this))
17411734
.on('onStart', _.bind(function(sId) {
17421735

1743-
var
1744-
oItem = null;
1745-
1746-
if (Utils.isUnd(oUploadCache[sId]))
1736+
var oItem = oUploadCache[sId];
1737+
if (!oItem)
17471738
{
17481739
oItem = this.getAttachmentById(sId);
17491740
if (oItem)
17501741
{
17511742
oUploadCache[sId] = oItem;
17521743
}
17531744
}
1754-
else
1755-
{
1756-
oItem = oUploadCache[sId];
1757-
}
17581745

17591746
if (oItem)
17601747
{

0 commit comments

Comments
 (0)