aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-06-03 07:44:52 +0200
committerMorris Jobke <hey@morrisjobke.de>2014-06-03 07:44:52 +0200
commit5add56b6ca7a9ad5c89af0d18af42dcff7f46f45 (patch)
tree5f6c04f56b6a86623b8705a252a3669b2b0ebb31 /core/js/js.js
parentd6e521006a9a30e4c23aaa114146e62927c3c836 (diff)
parentaf32c67923fcd3f1ec2a4553249d6f420a14df18 (diff)
downloadnextcloud-server-5add56b6ca7a9ad5c89af0d18af42dcff7f46f45.tar.gz
nextcloud-server-5add56b6ca7a9ad5c89af0d18af42dcff7f46f45.zip
Merge pull request #7485 from owncloud/scrutinizer_fix_1_kondou
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 edae2912b1d..7de4d078f3e 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);