diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2014-02-20 10:26:05 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2014-02-20 10:26:05 +0100 |
commit | b61f0f11c5aa03240d3c18f02a1c790bd43522c0 (patch) | |
tree | 5a1fcb325a3ec6a029f1bac7cbdd1e9bac2ba387 /core | |
parent | 16262e3fd2c00475cc3b43a2684a45cc8ae70829 (diff) | |
download | nextcloud-server-b61f0f11c5aa03240d3c18f02a1c790bd43522c0.tar.gz nextcloud-server-b61f0f11c5aa03240d3c18f02a1c790bd43522c0.zip |
Move oc_isadmin to the config JS script
Diffstat (limited to 'core')
-rw-r--r-- | core/js/config.php | 1 | ||||
-rw-r--r-- | core/js/js.js | 1 | ||||
-rw-r--r-- | core/templates/layout.user.php | 2 |
3 files changed, 2 insertions, 2 deletions
diff --git a/core/js/config.php b/core/js/config.php index b6875fb73f9..6185be523e7 100644 --- a/core/js/config.php +++ b/core/js/config.php @@ -24,6 +24,7 @@ foreach(OC_App::getEnabledApps() as $app) { $array = array( "oc_debug" => (defined('DEBUG') && DEBUG) ? 'true' : 'false', + "ox_isadmin" => p(OC_User::isAdminUser(OC_User::getUser()) ? 'true' : 'false'); "oc_webroot" => "\"".OC::$WEBROOT."\"", "oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution "datepickerFormatDate" => json_encode($l->l('jsdate', 'jsdate')), diff --git a/core/js/js.js b/core/js/js.js index 3b3e0e99455..d4d2583f1e5 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -10,7 +10,6 @@ var oc_webroot; var oc_current_user = document.getElementsByTagName('head')[0].getAttribute('data-user'); var oc_requesttoken = document.getElementsByTagName('head')[0].getAttribute('data-requesttoken'); -var oc_isadmin = document.getElementsByTagName('head')[0].getAttribute('data-isAdmin'); window.oc_config = window.oc_config || {}; diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index d46f97852cc..bc1c700402e 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -6,7 +6,7 @@ <!--[if gt IE 9]><html class="ng-csp ie"><![endif]--> <!--[if !IE]><!--><html class="ng-csp"><!--<![endif]--> - <head data-isAdmin="<?php p(OC_User::isAdminUser(OC_User::getUser()) ? 'true' : 'false'); ?>" data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>"> + <head data-user="<?php p($_['user_uid']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>"> <title> <?php p(!empty($_['application'])?$_['application'].' - ':''); |