diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-05-09 16:36:20 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-05-13 11:28:25 +0200 |
commit | d56d03e230a20a621113a2b90064f331b3952f1b (patch) | |
tree | afc4e1a6a5cf1ec77b96bef43a8181293102949f /core/js/config.php | |
parent | ec045b251c5e42ce3762f3aefc0936581fd21030 (diff) | |
download | nextcloud-server-d56d03e230a20a621113a2b90064f331b3952f1b.tar.gz nextcloud-server-d56d03e230a20a621113a2b90064f331b3952f1b.zip |
add information about default expire date to the share dialog
Diffstat (limited to 'core/js/config.php')
-rw-r--r-- | core/js/config.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/js/config.php b/core/js/config.php index 7e23f3e2e41..9169cc14a7b 100644 --- a/core/js/config.php +++ b/core/js/config.php @@ -25,6 +25,13 @@ foreach(OC_App::getEnabledApps() as $app) { $apps_paths[$app] = OC_App::getAppWebPath($app); } +$defaultExpireDateEnabled = \OCP\Config::getAppValue('core', 'shareapi_default_expire_date', 'no'); +$defaultExpireDate = $enforceDefaultExpireDate = null; +if ($defaultExpireDateEnabled === 'yes') { + $defaultExpireDate = \OCP\Config::getAppValue('core', 'shareapi_expire_after_n_days', '7'); + $enforceDefaultExpireDate = \OCP\Config::getAppValue('core', 'shareapi_enforce_expire_date', 'no'); +} + $array = array( "oc_debug" => (defined('DEBUG') && DEBUG) ? 'true' : 'false', "oc_isadmin" => OC_User::isAdminUser(OC_User::getUser()) ? 'true' : 'false', @@ -67,6 +74,14 @@ $array = array( 'versionstring' => OC_Util::getVersionString(), ) ), + "oc_appconfig" => json_encode( + array("core" => array( + 'defaultExpireDateEnabled' => $defaultExpireDateEnabled, + 'defaultExpireDate' => $defaultExpireDate, + 'defaultExpireDateEnforced' => $enforceDefaultExpireDate, + ) + ) + ), "oc_defaults" => json_encode( array( 'entity' => $defaults->getEntity(), |