Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-05-12 13:40:30 +0400
committerLukas Reschke <lukas@statuscode.ch>2013-05-12 13:41:42 +0400
commit9a53d50e169a797f95c16cb75aa1bcafd7513c76 (patch)
tree44edee4a65da58d1b1b22bcf21460a6ed5884a5c /core
parentbc767f18991c7cffa55cbff694298f27afa3b821 (diff)
Merge pull request #3290 from owncloud/config-data
Move config data to template
Diffstat (limited to 'core')
-rw-r--r--core/js/config.php6
-rw-r--r--core/templates/layout.user.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/core/js/config.php b/core/js/config.php
index 0aaa4482287..48bea6ae542 100644
--- a/core/js/config.php
+++ b/core/js/config.php
@@ -26,8 +26,8 @@ $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" => "\"".OC_User::getUser(). "\"",
- "oc_requesttoken" => "\"".OC_Util::callRegister(). "\"",
+ "oc_current_user" => "document.head.getAttribute('data-user')",
+ "oc_requesttoken" => "document.head.getAttribute('data-requesttoken')",
"datepickerFormatDate" => json_encode($l->l('jsdate', 'jsdate')),
"dayNames" => json_encode(
array(
@@ -62,4 +62,4 @@ $array = array(
// Echo it
foreach ($array as $setting => $value) {
echo("var ". $setting ."=".$value.";\n");
-}
+} \ No newline at end of file
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 0bab2bb43a7..6a8e221cbd3 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -5,7 +5,7 @@
<!--[if IE 9]><html class="ng-csp ie ie9 lte9"><![endif]-->
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
<!--[if !IE]><!--><html class="ng-csp"><!--<![endif]-->
- <head>
+ <head data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
<title><?php p(!empty($_['application'])?$_['application'].' | ':'') ?>ownCloud
<?php p(trim($_['user_displayname']) != '' ?' ('.$_['user_displayname'].') ':'') ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />