From b633be82aa7f331db42a7b44b591dd6e5ac8bdfc Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Tue, 5 Nov 2013 17:33:13 +0800 Subject: [PATCH] MDL-42666 repository_boxnet: Warn on HTTPS requirement when non HTTPS --- repository/boxnet/lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/repository/boxnet/lib.php b/repository/boxnet/lib.php index 8ca15a9487f..07fd1344cdc 100644 --- a/repository/boxnet/lib.php +++ b/repository/boxnet/lib.php @@ -331,7 +331,10 @@ class repository_boxnet extends repository { $mform->setType('clientsecret', PARAM_RAW_TRIMMED); $mform->addElement('static', null, '', get_string('information', 'repository_boxnet')); - $mform->addElement('static', null, '', get_string('warninghttps', 'repository_boxnet')); + + if (strpos($CFG->wwwroot, 'https') !== 0) { + $mform->addElement('static', null, '', get_string('warninghttps', 'repository_boxnet')); + } if (get_config('boxnet', 'api_key')) { $url = new moodle_url('/repository/boxnet/migrationv1.php');