From c0b370f6cf8bf2ec3f4af921fc9f6935238ca41d Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Thu, 7 Feb 2013 08:11:18 +0100 Subject: Define the variables that are expected to exist but won't be set in setup --- core/js/js.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index 6b0c289850c..80914e954e5 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -5,6 +5,9 @@ * To the end of config/config.php to enable debug mode. * The undefined checks fix the broken ie8 console */ +var oc_debug; +var oc_webroot; +var oc_requesttoken; if (oc_debug !== true || typeof console === "undefined" || typeof console.log === "undefined") { if (!window.console) { window.console = {}; -- cgit v1.2.3 From a82d18d2f8e13edab296daaf2bda917381e78810 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Thu, 7 Feb 2013 21:13:57 +0100 Subject: Fill oc_webroot with the expected value --- core/js/js.js | 1 + 1 file changed, 1 insertion(+) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index 80914e954e5..c137f734d91 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -8,6 +8,7 @@ var oc_debug; var oc_webroot; var oc_requesttoken; +oc_webroot = oc_webroot || location.pathname.substr(0, location.pathname.lastIndexOf('/')); if (oc_debug !== true || typeof console === "undefined" || typeof console.log === "undefined") { if (!window.console) { window.console = {}; -- cgit v1.2.3 From d5f98a82aa5d1bee7971cb4c811b86083ce60ed6 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 8 Feb 2013 18:44:52 +0100 Subject: fix-oc_webroot --- core/js/js.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index c137f734d91..5f1870eb6ce 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -8,7 +8,9 @@ var oc_debug; var oc_webroot; var oc_requesttoken; -oc_webroot = oc_webroot || location.pathname.substr(0, location.pathname.lastIndexOf('/')); +if (typeof oc_webroot === "undefined") { + oc_webroot = location.pathname.substr(0, location.pathname.lastIndexOf('/')); +} if (oc_debug !== true || typeof console === "undefined" || typeof console.log === "undefined") { if (!window.console) { window.console = {}; -- cgit v1.2.3