From af3e0ed2eaf2274bf043f6a68f694f88c5d2250e Mon Sep 17 00:00:00 2001 From: ethem Date: Wed, 1 Nov 2006 12:36:19 +0000 Subject: [PATCH] Make authorize.net config page secure. See: http://moodle.org/mod/forum/discuss.php?d=56728 --- enrol/authorize/enrol.php | 11 ++++++++++- lang/en_utf8/enrol_authorize.php | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/enrol/authorize/enrol.php b/enrol/authorize/enrol.php index 8b74461d4d..f34ab8dca3 100755 --- a/enrol/authorize/enrol.php +++ b/enrol/authorize/enrol.php @@ -407,7 +407,16 @@ class enrolment_plugin_authorize } if (empty($CFG->loginhttps) and substr($CFG->wwwroot, 0, 5) !== 'https') { - notify('loginhttps must be ON'); + $a = new stdClass; + $a->url = "$CFG->wwwroot/$CFG->admin/settings.php?section=httpsecurity"; + notice(get_string('adminconfighttps', 'enrol_authorize', $a)); + } + elseif (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') { + $wwwsroot = qualified_me(); + $wwwsroot = str_replace('http:', 'https:', $wwwsroot); + $a = new stdClass; + $a->url = $wwwsroot; + notice(get_string('adminconfighttpsgo', 'enrol_authorize', $a)); } if (!empty($frm->an_review)) { diff --git a/lang/en_utf8/enrol_authorize.php b/lang/en_utf8/enrol_authorize.php index 2e4a122fdd..1049ef48e1 100644 --- a/lang/en_utf8/enrol_authorize.php +++ b/lang/en_utf8/enrol_authorize.php @@ -1,4 +1,4 @@ -url\">turned loginhttps ON\" to use this plugin
in Admin >> Variables >> Security >> HTTP security.'; +$string['adminconfighttpsgo'] = 'Go to the url\">secure page to configure this plugin.'; $string['admincronsetup'] = 'The cron.php maintenance script has not been run for at least 24 hours.
Cron must be enabled if you want to use scheduled-capture feature.
Enable \'Authorize.net plugin\' and setup cron properly; or uncheck an_review again.
If you disable scheduled-capture, transactions will be cancelled unless you review them within 30 days.
Check an_review and enter \'0\' to an_capture_day field
if you want to manually accept/deny payments within 30 days.'; $string['adminemailexpired'] = 'This is useful for \'Manual-Capture\'. Admins are notified $a days prior to pending orders expiring.'; $string['adminemailexpiredsort'] = 'When the number of pending orders expiring are sent to the teachers via email, which one is important?'; -- 2.39.5