]> source.dussan.org Git - nextcloud-server.git/commitdiff
move javascript variables 'oc_current_user' and 'oc_requesttoken' to js.js - fixes...
authorThomas Mueller <thomas.mueller@tmit.eu>
Wed, 26 Jun 2013 09:23:21 +0000 (11:23 +0200)
committerThomas Mueller <thomas.mueller@tmit.eu>
Wed, 26 Jun 2013 09:23:21 +0000 (11:23 +0200)
core/js/config.php
core/js/js.js

index 53a8fb96388601b1f8e57e387fbee1076892ae91..dd46f7889d155ab80ff00fef7fcc892da516070e 100644 (file)
@@ -26,8 +26,6 @@ $array = array(
        "oc_debug" => (defined('DEBUG') && DEBUG) ? 'true' : 'false',
        "oc_webroot" => "\"".OC::$WEBROOT."\"",
        "oc_appswebroots" =>  str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution
-       "oc_current_user" => "document.getElementsByTagName('head')[0].getAttribute('data-user')",
-       "oc_requesttoken" => "document.getElementsByTagName('head')[0].getAttribute('data-requesttoken')",
        "datepickerFormatDate" => json_encode($l->l('jsdate', 'jsdate')),
        "dayNames" =>  json_encode(
                array(
index 3cb4d3dd151582915626c2363dc106b4a7de1fc3..08b429a555b3d0e459a5ec008d22082fe52cef25 100644 (file)
@@ -7,7 +7,10 @@
  */
 var oc_debug;
 var oc_webroot;
-var oc_requesttoken;
+
+var oc_current_user = document.getElementsByTagName('head')[0].getAttribute('data-user');
+var oc_requesttoken = document.getElementsByTagName('head')[0].getAttribute('data-requesttoken');
+
 if (typeof oc_webroot === "undefined") {
        oc_webroot = location.pathname.substr(0, location.pathname.lastIndexOf('/'));
 }