mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 09:55:33 +02:00
Merge branch 'wip-mdl-55466' of https://github.com/rajeshtaneja/moodle
This commit is contained in:
commit
b5830334e7
@ -73,6 +73,11 @@ information provided here is intended especially for developers.
|
||||
* data-fieldtype="type" attribute has been added to form field default template.
|
||||
* form elements extending MoodleQuickForm_group must call $this->createFormElement() instead of
|
||||
@MoodleQuickForm::createElement() in order to be compatible with PHP 7.1
|
||||
* Relative paths in $CFG->alternateloginurl will be resolved to absolute path within moodle site. Previously they
|
||||
were resolved to absolute path within the server. That means:
|
||||
- $CFG->wwwroot: http://example.com/moodle
|
||||
- $CFG->alternateloginurl : /my/super/login.php
|
||||
- Login url will be: http://example.com/moodle/my/super/login.php (moodle root based)
|
||||
|
||||
=== 3.1 ===
|
||||
|
||||
|
@ -282,23 +282,21 @@ if (empty($SESSION->wantsurl)) {
|
||||
|
||||
/// Redirect to alternative login URL if needed
|
||||
if (!empty($CFG->alternateloginurl)) {
|
||||
$loginurl = $CFG->alternateloginurl;
|
||||
$loginurl = new moodle_url($CFG->alternateloginurl);
|
||||
|
||||
if (strpos($SESSION->wantsurl, $loginurl) === 0) {
|
||||
//we do not want to return to alternate url
|
||||
$SESSION->wantsurl = NULL;
|
||||
$loginurlstr = $loginurl->out(false);
|
||||
|
||||
if (strpos($SESSION->wantsurl, $loginurlstr) === 0) {
|
||||
// We do not want to return to alternate url.
|
||||
$SESSION->wantsurl = null;
|
||||
}
|
||||
|
||||
// If error code then add that to url.
|
||||
if ($errorcode) {
|
||||
if (strpos($loginurl, '?') === false) {
|
||||
$loginurl .= '?';
|
||||
} else {
|
||||
$loginurl .= '&';
|
||||
}
|
||||
$loginurl .= 'errorcode='.$errorcode;
|
||||
$loginurl->param('errorcode', $errorcode);
|
||||
}
|
||||
|
||||
redirect($loginurl);
|
||||
redirect($loginurl->out(false));
|
||||
}
|
||||
|
||||
// make sure we really are on the https page when https login required
|
||||
|
Loading…
x
Reference in New Issue
Block a user