Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@
new lang_string('settings:presignedurl:enablepresignedurls', 'tool_objectfs'),
new lang_string('settings:presignedurl:enablepresignedurls_help', 'tool_objectfs'), ''));

if ($PAGE->pagetype !== 'admin-upgradesettings' && get_config('tool_objectfs', 'expirationtime') === false) {
// In case expirationtime is empty after installation, set it to default to prevent warnings.
set_config('expirationtime', 2 * HOURSECS, 'tool_objectfs');
}
$settings->add(new admin_setting_configduration('tool_objectfs/expirationtime',
new lang_string('settings:presignedurl:expirationtime', 'tool_objectfs'),
new lang_string('settings:presignedurl:expirationtime_help', 'tool_objectfs'), 2 * HOURSECS, HOURSECS));
Expand Down