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

raeburn raeburn at source.lon-capa.org
Fri Jan 4 13:35:12 EST 2013


raeburn		Fri Jan  4 18:35:12 2013 EDT

  Modified files:              
    /loncom/interface	lonsupportreq.pm 
  Log:
  - Eliminate duplicate code.
  
  
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.71 loncom/interface/lonsupportreq.pm:1.72
--- loncom/interface/lonsupportreq.pm:1.71	Fri Jan  4 17:46:00 2013
+++ loncom/interface/lonsupportreq.pm	Fri Jan  4 18:35:12 2013
@@ -1,5 +1,5 @@
 #
-# $Id: lonsupportreq.pm,v 1.71 2013/01/04 17:46:00 raeburn Exp $
+# $Id: lonsupportreq.pm,v 1.72 2013/01/04 18:35:12 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -641,10 +641,8 @@
                  adin        => 'Additional information recorded',
     );
 
-    my (@ok_ccs, at bad_ccs,$badccmsg,$okcclist,$public,$homeserver);
-    if (($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public')) {
-        $public = 1;
-    } else {
+    my (@ok_ccs, at bad_ccs,$badccmsg,$okcclist,$homeserver);
+    unless ($public) {
         if (($env{'user.name'} ne '') && ($env{'user.domain'} ne '')) {
             $homeserver = &Apache::lonnet::homeserver($env{'user.name'},
                                                       $env{'user.domain'});
@@ -816,8 +814,7 @@
 
     my $attachmentpath = '';
     my $attachmentsize = '';
-    if ((defined($env{'user.name'})) && ($env{'user.name'} ne 'public')
-        && ($env{'user.domain'} ne 'public')) {
+    if ((defined($env{'user.name'})) && (!$public)) {
         if ($homeserver && $env{'form.screenshot.filename'}) {
             $attachmentsize = length($env{'form.screenshot'});
             if ($attachmentsize > 131072) {




More information about the LON-CAPA-cvs mailing list