combine ie8 fix with debug check
This commit is contained in:
parent
ed06070741
commit
5b07e722cb
|
@ -3,8 +3,9 @@
|
||||||
* Add
|
* Add
|
||||||
* define('DEBUG', true);
|
* define('DEBUG', true);
|
||||||
* To the end of config/config.php to enable debug mode.
|
* To the end of config/config.php to enable debug mode.
|
||||||
|
* The undefined checks fix the broken ie8 console
|
||||||
*/
|
*/
|
||||||
if (oc_debug !== true) {
|
if (oc_debug !== true || typeof console === "undefined" || typeof console.log === "undefined") {
|
||||||
if (!window.console) {
|
if (!window.console) {
|
||||||
window.console = {};
|
window.console = {};
|
||||||
}
|
}
|
||||||
|
@ -13,20 +14,13 @@ if (oc_debug !== true) {
|
||||||
console[methods[i]] = function () { };
|
console[methods[i]] = function () { };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* fix broken console log in ie8
|
|
||||||
*/
|
|
||||||
if (typeof console === "undefined" || typeof console.log === "undefined") {
|
|
||||||
console = {};
|
|
||||||
console.log = function() {};
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* translate a string
|
* translate a string
|
||||||
* @param app the id of the app for which to translate the string
|
* @param app the id of the app for which to translate the string
|
||||||
* @param text the string to translate
|
* @param text the string to translate
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function t(app,text, vars){
|
function t(app,text, vars){
|
||||||
if( !( t.cache[app] )){
|
if( !( t.cache[app] )){
|
||||||
$.ajax(OC.filePath('core','ajax','translations.php'),{
|
$.ajax(OC.filePath('core','ajax','translations.php'),{
|
||||||
|
|
Loading…
Reference in New Issue