[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonmsg.pm

raeburn raeburn at source.lon-capa.org
Sun Jan 3 22:44:12 EST 2021


raeburn		Mon Jan  4 03:44:12 2021 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonmsg.pm 
  Log:
  - For 2.11
    Backport 1.246
  
  
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.239.2.1 loncom/interface/lonmsg.pm:1.239.2.2
--- loncom/interface/lonmsg.pm:1.239.2.1	Thu Aug  4 22:53:55 2016
+++ loncom/interface/lonmsg.pm	Mon Jan  4 03:44:12 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging
 #
-# $Id: lonmsg.pm,v 1.239.2.1 2016/08/04 22:53:55 raeburn Exp $
+# $Id: lonmsg.pm,v 1.239.2.2 2021/01/04 03:44:12 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -231,6 +231,7 @@
     $attachmenturl =&HTML::Entities::encode($attachmenturl,'<>&"');
     my $course_context = &get_course_context();
     my $now=time;
+    my $ip = &Apache::lonnet::get_requestor_ip();
     my $msgcount = &get_uniq();
     unless(defined($msgid)) {
         $msgid = &buildmsgid($now,$subject,$env{'user.name'},$env{'user.domain'},
@@ -250,7 +251,7 @@
     }
     $result .= '<servername>'.$ENV{'SERVER_NAME'}.'</servername>'.
            '<host>'.$ENV{'HTTP_HOST'}.'</host>'.
-	   '<client>'.$ENV{'REMOTE_ADDR'}.'</client>'.
+	   '<client>'.$ip.'</client>'.
 	   '<browsertype>'.$env{'browser.type'}.'</browsertype>'.
 	   '<browseros>'.$env{'browser.os'}.'</browseros>'.
 	   '<browserversion>'.$env{'browser.version'}.'</browserversion>'.




More information about the LON-CAPA-cvs mailing list