diff --git a/lib/cloudfunc.js b/lib/cloudfunc.js index 204b753b..e18322de 100644 --- a/lib/cloudfunc.js +++ b/lib/cloudfunc.js @@ -11,7 +11,7 @@ var Util; if (scope.window) { scope.CloudFunc = new CloudFuncProto(Util); } else { - if(!global.cloudcmd) + if (!global.cloudcmd) return console.log( '# cloudfunc.js' + '\n' + '# -----------' + '\n' + @@ -91,7 +91,7 @@ var Util; lLengh = pPath.length-1, lLastSlash = pPath.lastIndexOf('/'); - if(lIsStr && lLastSlash === lLengh) + if (lIsStr && lLastSlash === lLengh) lRet = pPath.substr(pPath, lLengh); return lRet; @@ -111,7 +111,7 @@ var Util; * @pPath */ this.getTitle = function(pPath) { - if(!CloudFunc.Path) + if (!CloudFunc.Path) CloudFunc.Path = '/'; return CloudFunc.NAME + ' - ' + (pPath || CloudFunc.Path); @@ -261,7 +261,7 @@ var Util; /* получаем первую строку */ var lLine = pPasswd_s.substr(pPasswd_s, pPasswd_s.indexOf('\n') + 1); - if(lLine) { + if (lLine) { /* удаляем первую строку из /etc/passwd*/ pPasswd_s = Util.removeStr(pPasswd_s, lLine); @@ -271,7 +271,7 @@ var Util; /* получаем uid*/ var lUID = lLine.substr(lLine,lLine.indexOf(':')); - if((lUID - 0).toString()!=='NaN') { + if ((lUID - 0).toString()!=='NaN') { lUsers.name = lName; lUsers.uid = lUID; lUsersData[i++] = lUsers; @@ -314,7 +314,7 @@ var Util; lShortName = Util.removeStr(lUrl, lUrl.substr(lUrl, lSlashIndex) ); - if(i !== 1) + if (i !== 1) lHtmlPath += lHref + FS + lUrl + lTitle + lUrl + _l + lShortName + lHrefEnd + '/'; @@ -380,7 +380,7 @@ var Util; lDotDot = lPath.substr(lPath, lPath.lastIndexOf('/')); lDotDot = lDotDot.substr(lDotDot, lDotDot.lastIndexOf('/')); /* Если предыдущий каталог корневой */ - if(lDotDot === '') + if (lDotDot === '') lDotDot = '/'; lLink = FS + lDotDot;