mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MNET-12558 Additional commenting and variable name change
This commit is contained in:
parent
a347291c30
commit
baed22bb1c
2 changed files with 16 additions and 7 deletions
|
@ -3978,6 +3978,7 @@ function &get_mailer($action='get') {
|
|||
*
|
||||
* @uses $CFG
|
||||
* @uses $FULLME
|
||||
* @uses $MNETIDPJUMPURL IdentityProvider(IDP) URL user hits to jump to mnet peer.
|
||||
* @uses SITEID
|
||||
* @param user $user A {@link $USER} object
|
||||
* @param user $from A {@link $USER} object
|
||||
|
@ -3994,7 +3995,7 @@ function &get_mailer($action='get') {
|
|||
*/
|
||||
function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $attachment='', $attachname='', $usetrueaddress=true, $replyto='', $replytoname='', $wordwrapwidth=79) {
|
||||
|
||||
global $CFG, $FULLME, $IDPJUMPURL;
|
||||
global $CFG, $FULLME, $MNETIDPJUMPURL;
|
||||
static $mnetjumps = array();
|
||||
|
||||
if (empty($user)) {
|
||||
|
@ -4027,12 +4028,12 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $a
|
|||
require_once($CFG->dirroot.'/mnet/lib.php');
|
||||
// Form the request url to hit the idp's jump.php
|
||||
if (isset($mnetjumps[$user->mnethostid])) {
|
||||
$IDPJUMPURL = $mnetjumps[$user->mnethostid];
|
||||
$MNETIDPJUMPURL = $mnetjumps[$user->mnethostid];
|
||||
} else {
|
||||
$idp = mnet_get_peer_host($user->mnethostid);
|
||||
$idpjumppath = mnet_get_app_jumppath($idp->applicationid);
|
||||
$IDPJUMPURL = $idp->wwwroot . $idpjumppath . '?hostwwwroot=' . $CFG->wwwroot . '&wantsurl=';
|
||||
$mnetjumps[$user->mnethostid] = $IDPJUMPURL;
|
||||
$MNETIDPJUMPURL = $idp->wwwroot . $idpjumppath . '?hostwwwroot=' . $CFG->wwwroot . '&wantsurl=';
|
||||
$mnetjumps[$user->mnethostid] = $MNETIDPJUMPURL;
|
||||
}
|
||||
|
||||
$messagetext = preg_replace_callback("%($CFG->wwwroot[^[:space:]]*)%",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue