diff options
author | ringmaster <epithet@gmail.com> | 2014-02-20 18:13:27 -0500 |
---|---|---|
committer | ringmaster <epithet@gmail.com> | 2014-02-20 18:13:27 -0500 |
commit | 58be2eb955b8c23a8698bdbb7bae8077eb402ee3 (patch) | |
tree | 2e62363abf364f34d702318565bb70a05c863113 /core/js/config.php | |
parent | 917a505af4c2182e585513e5188da17ac00b0cf1 (diff) | |
download | nextcloud-server-58be2eb955b8c23a8698bdbb7bae8077eb402ee3.tar.gz nextcloud-server-58be2eb955b8c23a8698bdbb7bae8077eb402ee3.zip |
Allow apps to add/modify config js output via hook.
Diffstat (limited to 'core/js/config.php')
-rw-r--r-- | core/js/config.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/js/config.php b/core/js/config.php index 139c3b6d485..edb9ccfd0fb 100644 --- a/core/js/config.php +++ b/core/js/config.php @@ -10,8 +10,8 @@ header("Content-type: text/javascript"); // Disallow caching -header("Cache-Control: no-cache, must-revalidate"); -header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); +header("Cache-Control: no-cache, must-revalidate"); +header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Enable l10n support $l = OC_L10N::get('core'); @@ -62,7 +62,10 @@ $array = array( 'session_keepalive' => \OCP\Config::getSystemValue('session_keepalive', true) ) ) - ); +); + +// Allow hooks to modify the output values +OC_Hook::emit('\OCP\Config', 'js', array('array' => &$array)); // Echo it foreach ($array as $setting => $value) { |