Get config from template
This commit is contained in:
parent
74f92d0c7f
commit
63d51980e1
|
@ -26,8 +26,8 @@ $array = array(
|
||||||
"oc_debug" => (defined('DEBUG') && DEBUG) ? 'true' : 'false',
|
"oc_debug" => (defined('DEBUG') && DEBUG) ? 'true' : 'false',
|
||||||
"oc_webroot" => "\"".OC::$WEBROOT."\"",
|
"oc_webroot" => "\"".OC::$WEBROOT."\"",
|
||||||
"oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution
|
"oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution
|
||||||
"oc_current_user" => "\"".OC_User::getUser(). "\"",
|
"oc_current_user" => "document.head.getAttribute('data-user');",
|
||||||
"oc_requesttoken" => "\"".OC_Util::callRegister(). "\"",
|
"oc_requesttoken" => "document.head.getAttribute('data-requesttoken');",
|
||||||
"datepickerFormatDate" => json_encode($l->l('jsdate', 'jsdate')),
|
"datepickerFormatDate" => json_encode($l->l('jsdate', 'jsdate')),
|
||||||
"dayNames" => json_encode(
|
"dayNames" => json_encode(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<!--[if IE 9]><html class="ng-csp ie ie9 lte9"><![endif]-->
|
<!--[if IE 9]><html class="ng-csp ie ie9 lte9"><![endif]-->
|
||||||
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
|
<!--[if gt IE 9]><html class="ng-csp ie"><![endif]-->
|
||||||
<!--[if !IE]><!--><html class="ng-csp"><!--<![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
|
<title><?php p(!empty($_['application'])?$_['application'].' | ':'') ?>ownCloud
|
||||||
<?php p(trim($_['user_displayname']) != '' ?' ('.$_['user_displayname'].') ':'') ?></title>
|
<?php p(trim($_['user_displayname']) != '' ?' ('.$_['user_displayname'].') ':'') ?></title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
|
|
@ -56,7 +56,7 @@ class OC_TemplateLayout extends OC_Template {
|
||||||
$jsfiles = self::findJavascriptFiles(OC_Util::$scripts);
|
$jsfiles = self::findJavascriptFiles(OC_Util::$scripts);
|
||||||
$this->assign('jsfiles', array(), false);
|
$this->assign('jsfiles', array(), false);
|
||||||
if (OC_Config::getValue('installed', false) && $renderas!='error') {
|
if (OC_Config::getValue('installed', false) && $renderas!='error') {
|
||||||
$this->append( 'jsfiles', OC_Helper::linkToRoute('js_config'));
|
$this->append( 'jsfiles', OC_Helper::linkToRoute('js_config') . $versionParameter);
|
||||||
}
|
}
|
||||||
if (!empty(OC_Util::$core_scripts)) {
|
if (!empty(OC_Util::$core_scripts)) {
|
||||||
$this->append( 'jsfiles', OC_Helper::linkToRemoteBase('core.js', false) . $versionParameter);
|
$this->append( 'jsfiles', OC_Helper::linkToRemoteBase('core.js', false) . $versionParameter);
|
||||||
|
|
Loading…
Reference in New Issue