diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2013-01-28 19:39:51 +0100 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2013-01-28 19:39:51 +0100 |
commit | a78ae6a5cb99ede0c1404c3540dd3ed262cbb2b1 (patch) | |
tree | e4aa8196b0f27960c03dd34756fb9c17cd74edac /core/js/config.php | |
parent | 31ebea0f6a9f6e26068b819d7d5989bf42a518af (diff) | |
parent | 06c1c35ac90f7920afa637ab0b628529b4135d40 (diff) | |
download | nextcloud-server-a78ae6a5cb99ede0c1404c3540dd3ed262cbb2b1.tar.gz nextcloud-server-a78ae6a5cb99ede0c1404c3540dd3ed262cbb2b1.zip |
Merge branch 'master' into permanent-share-icons
Diffstat (limited to 'core/js/config.php')
-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')), |