summaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2014-03-01 02:46:27 +0100
committerkondou <kondou@ts.unde.re>2014-06-02 21:09:41 +0200
commit9bc3f3cf304c300c758743f2e460beb1fee3ecac (patch)
treeea564110fcd3a28caee27af3bf36486d1783cc3e /core/js/js.js
parentc88c0b9a13231478c626296d78aac7c1f66d87d9 (diff)
downloadnextcloud-server-9bc3f3cf304c300c758743f2e460beb1fee3ecac.tar.gz
nextcloud-server-9bc3f3cf304c300c758743f2e460beb1fee3ecac.zip
Scrutinizer cleanup
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/js/js.js b/core/js/js.js
index a859034ed01..51878cb9133 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1,7 +1,7 @@
/**
* Disable console output unless DEBUG mode is enabled.
* Add
- * define('DEBUG', true);
+ * define('DEBUG', true);
* To the end of config/config.php to enable debug mode.
* The undefined checks fix the broken ie8 console
*/
@@ -23,7 +23,10 @@ if (typeof oc_webroot === "undefined") {
oc_webroot = oc_webroot.substr(0, oc_webroot.lastIndexOf('/'));
}
}
-if (oc_debug !== true || typeof console === "undefined" || typeof console.log === "undefined") {
+if (
+ oc_debug !== true || typeof console === "undefined" ||
+ typeof console.log === "undefined"
+) {
if (!window.console) {
window.console = {};
}
@@ -37,7 +40,8 @@ if (oc_debug !== true || typeof console === "undefined" || typeof console.log ==
function initL10N(app) {
if (!( t.cache[app] )) {
$.ajax(OC.filePath('core', 'ajax', 'translations.php'), {
- async: false,//todo a proper solution for this without sync ajax calls
+ // TODO a proper solution for this without sync ajax calls
+ async: false,
data: {'app': app},
type: 'POST',
success: function (jsondata) {
@@ -75,8 +79,8 @@ function initL10N(app) {
/* We used to use eval, but it seems IE has issues with it.
* We now use "new Function", though it carries a slightly
* bigger performance hit.
- var code = 'function (n) { var plural; var nplurals; '+pf+' return { "nplural" : nplurals, "plural" : (plural === true ? 1 : plural ? plural : 0) }; };';
- Gettext._locale_data[domain].head.plural_func = eval("("+code+")");
+ var code = 'function (n) { var plural; var nplurals; '+pf+' return { "nplural" : nplurals, "plural" : (plural === true ? 1 : plural ? plural : 0) }; };';
+ Gettext._locale_data[domain].head.plural_func = eval("("+code+")");
*/
var code = 'var plural; var nplurals; '+pf+' return { "nplural" : nplurals, "plural" : (plural === true ? 1 : plural ? plural : 0) };';
t.plural_function[app] = new Function("n", code);