[LON-CAPA-cvs] cvs: loncom /interface lonsupportreq.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Sun, 10 Apr 2005 23:37:21 -0000


raeburn		Sun Apr 10 19:37:21 2005 EDT

  Modified files:              
    /loncom/interface	lonsupportreq.pm 
  Log:
  Fix ups following %ENV -> %env switch, so that items that are really in %ENV are still recorded. 
  
  
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.25 loncom/interface/lonsupportreq.pm:1.26
--- loncom/interface/lonsupportreq.pm:1.25	Thu Apr  7 02:56:23 2005
+++ loncom/interface/lonsupportreq.pm	Sun Apr 10 19:37:21 2005
@@ -1,5 +1,5 @@
 #
-# $Id: lonsupportreq.pm,v 1.25 2005/04/07 06:56:23 albertel Exp $
+# $Id: lonsupportreq.pm,v 1.26 2005/04/10 23:37:21 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -637,7 +637,8 @@
 
 sub print_request_receipt {
     my ($r,$url,$function) = @_;
-    my @envvars = ('lonID','HTTP_HOST','HTTP_USER_AGENT','REMOTE_ADDR','SERVER_ADDR','SERVER_NAME','browser.os','browser.type','browser.version','user.home','request.role');
+    my @ENVvars = ('HTTP_HOST','HTTP_USER_AGENT','REMOTE_ADDR','SERVER_ADDR','SERVER_NAME');
+    my @envvars = ('browser.os','browser.type','browser.version','user.home','request.role');
     my @loncvars = ('user.name','user.domain','request.course.sec','request.course.id');
 
     my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0"',1);
@@ -752,6 +753,9 @@
         $fname = $1;
         $displaymsg .= "<br />An uploaded screenshot file - $fname ($attachmentsize bytes) was included in the request sent by $env{'user.name'} from LON-CAPA domain: $env{'user.domain'}";
         $supportmsg .= "\n";
+        foreach (@ENVvars) {
+            $supportmsg .= "$_: $ENV{$_}\n";
+        }
         foreach (@envvars) {
             $supportmsg .= "$_: $env{$_}\n";
         }
@@ -774,6 +778,9 @@
 
     } else {
         my $envdata = '';
+        foreach (@ENVvars) {
+            $envdata .= "$_: $ENV{$_}\n";
+        }
         foreach (@envvars) {
             $envdata .= "$_: $env{$_}\n";
         }
@@ -785,8 +792,6 @@
     }
 
 ### Send it:
-    # ->send can cause an sh launch which can pass all of %env along
-    # which can be to large for /bin/sh's little mind
     $msg->send('sendmail');
 
     if ($attachmentpath =~ m#$Apache::lonnet::perlvar{'lonDaemons'}/tmp/helprequests/(\d+)/[^/]+#) {
@@ -840,6 +845,11 @@
               <tr>
                <td>
     |);
+    foreach (@ENVvars) {
+        unless($ENV{$_} eq '') {
+            $r->print("$_:&nbsp;<font color='$vlinkcolor'>$ENV{$_}</font>, ");
+        }
+    }
     foreach (@envvars) {
         unless($env{$_} eq '') { 
             $r->print("$_:&nbsp;<font color='$vlinkcolor'>$env{$_}</font>, ");