diff options
author | icewind1991 <robin@icewind.nl> | 2014-02-24 13:29:54 +0100 |
---|---|---|
committer | icewind1991 <robin@icewind.nl> | 2014-02-24 13:29:54 +0100 |
commit | ddb8cf32e90327376c5c6c170aae88a640b4d44e (patch) | |
tree | 9f2620d2cb385ee89be0def9754e07efede23da3 /core/js | |
parent | 11ca01403408413cbbe48c8d78c41802998868b7 (diff) | |
parent | df35929ed22d066c9ab9f74fab2db8e38915534b (diff) | |
download | nextcloud-server-ddb8cf32e90327376c5c6c170aae88a640b4d44e.tar.gz nextcloud-server-ddb8cf32e90327376c5c6c170aae88a640b4d44e.zip |
Merge pull request #7344 from owncloud/add-js-config-vars
Allow apps to add/modify config js output via hook.
Diffstat (limited to 'core/js')
-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) { |