diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-01-28 00:29:46 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-01-28 00:29:46 -0800 |
commit | 31d83fddc482959d7fb4f7377cc7020c59c30951 (patch) | |
tree | 2294989764a9f87e8965a8ea8e71aadc5d09bfb4 /core | |
parent | 44d6ff61e254635f055a1c92f12c653e5b1a1e7b (diff) | |
parent | 2e42c6f54f85c5ac5b339625d04685535ac69d40 (diff) | |
download | nextcloud-server-31d83fddc482959d7fb4f7377cc7020c59c30951.tar.gz nextcloud-server-31d83fddc482959d7fb4f7377cc7020c59c30951.zip |
Merge pull request #1321 from owncloud/csp-fixes
Files: CSP fixes
Diffstat (limited to 'core')
-rw-r--r-- | core/js/config.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/js/config.php b/core/js/config.php index e838fb1cd04..9069175ed6f 100644 --- a/core/js/config.php +++ b/core/js/config.php @@ -17,11 +17,15 @@ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); $l = OC_L10N::get('core'); // Get the config -$debug = (defined('DEBUG') && DEBUG) ? 'true' : 'false'; +$apps_paths = array(); +foreach(OC_App::getEnabledApps() as $app) { + $apps_paths[$app] = OC_App::getAppWebPath($app); +} + $array = array( - "oc_debug" => $debug, + "oc_debug" => (defined('DEBUG') && DEBUG) ? 'true' : 'false', "oc_webroot" => "\"".OC::$WEBROOT."\"", - "oc_appswebroots" => "\"".$_['apps_paths']. "\"", + "oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution "oc_current_user" => "\"".OC_User::getUser(). "\"", "oc_requesttoken" => "\"".OC_Util::callRegister(). "\"", "datepickerFormatDate" => json_encode($l->l('jsdate', 'jsdate')), |