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
33 changes: 18 additions & 15 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,22 +182,25 @@
new lang_string('settings:presignedurl:proxyrangerequests_help', 'tool_objectfs') . $warningtext, '1'));

// Add presigned url check to page to help with setup.
$check = new \tool_objectfs\check\presigned_urls();
$result = $check->get_result();
switch ($result->get_status()) {
case result::OK:
$notificationtype = \core\output\notification::NOTIFY_SUCCESS;
break;
case result::INFO:
$notificationtype = \core\output\notification::NOTIFY_INFO;
break;
case result::WARNING:
$notificationtype = \core\output\notification::NOTIFY_WARNING;
break;
default:
$notificationtype = \core\output\notification::NOTIFY_ERROR;
$presignedinfo = '';
if ($objectfspage) {
$check = new \tool_objectfs\check\presigned_urls();
$result = $check->get_result();
switch ($result->get_status()) {
case result::OK:
$notificationtype = \core\output\notification::NOTIFY_SUCCESS;
break;
case result::INFO:
$notificationtype = \core\output\notification::NOTIFY_INFO;
break;
case result::WARNING:
$notificationtype = \core\output\notification::NOTIFY_WARNING;
break;
default:
$notificationtype = \core\output\notification::NOTIFY_ERROR;
}
$presignedinfo = $OUTPUT->notification($result->get_summary(), $notificationtype);
}
$presignedinfo = $OUTPUT->notification($result->get_summary(), $notificationtype);

$settings->add(new admin_setting_configcheckbox('tool_objectfs/enablepresignedurls',
new lang_string('settings:presignedurl:enablepresignedurls', 'tool_objectfs'),
Expand Down