Adds OC_Defaults values in javascript config

This commit is contained in:
Guillaume AMAT 2014-02-13 10:47:03 +01:00
parent a62b393d02
commit 01dee35ebe
1 changed files with 17 additions and 0 deletions

View File

@ -16,6 +16,9 @@ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
// Enable l10n support
$l = OC_L10N::get('core');
// Enable OC_Defaults support
$defaults = new OC_Defaults();
// Get the config
$apps_paths = array();
foreach(OC_App::getEnabledApps() as $app) {
@ -60,6 +63,20 @@ $array = array(
'session_lifetime' => \OCP\Config::getSystemValue('session_lifetime', 60 * 60 * 24),
'session_keepalive' => \OCP\Config::getSystemValue('session_keepalive', true)
)
),
"oc_defaults" => json_encode(
array(
'entity' => $defaults->getEntity(),
'name' => $defaults->getName(),
'title' => $defaults->getTitle(),
'baseUrl' => $defaults->getBaseUrl(),
'syncClientUrl' => $defaults->getSyncClientUrl(),
'docBaseUrl' => $defaults->getDocBaseUrl(),
'slogan' => $defaults->getSlogan(),
'logoClaim' => $defaults->getLogoClaim(),
'shortFooter' => $defaults->getShortFooter(),
'longFooter' => $defaults->getLongFooter()
)
)
);