MNET-12558 Additional commenting and variable name change

This commit is contained in:
peterbulmer 2008-08-20 05:57:06 +00:00
parent a347291c30
commit baed22bb1c
2 changed files with 16 additions and 7 deletions

View file

@ -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:]]*)%",