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

raeburn raeburn at source.lon-capa.org
Tue Nov 30 11:16:14 EST 2021


raeburn		Tue Nov 30 16:16:14 2021 EDT

  Modified files:              
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  - Bug 6955 IP-based blocking.
    - Change in args passed to &blocked_in_folder().
    - Remove trailing whitespace.
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.194 loncom/interface/lonmsgdisplay.pm:1.195
--- loncom/interface/lonmsgdisplay.pm:1.194	Tue Nov 30 15:55:37 2021
+++ loncom/interface/lonmsgdisplay.pm	Tue Nov 30 16:16:14 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.194 2021/11/30 15:55:37 raeburn Exp $
+# $Id: lonmsgdisplay.pm,v 1.195 2021/11/30 16:16:14 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1073,7 +1073,7 @@
     my %setters = ();
     my $numblocked = 0;
     my $clientip = &Apache::lonnet::get_requestor_ip($r);
-    my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) = 
+    my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) =
         &Apache::loncommon::blockcheck(\%setters,'com',$clientip);
     my %js_lt = &Apache::lonlocal::texthash(
                       sede => 'Select a destination folder to which the messages will be moved.',
@@ -1321,7 +1321,7 @@
     $r->print('<input type="hidden" name="folder" value="'.$folder.'" /><input type="hidden" name="startdis" value="'.$postedstartdis.'" /><input type="hidden" name="interdis" value="'.$env{'form.interdis'}.'" /><input type="hidden" name="msgstatus" value="'.$msgstatus.'" /><input type="hidden" name="markedaction" value="" /></form>');
     if ($numblocked > 0) {
         $r->print(&blocked_in_folder($numblocked,$startblock,$endblock,
-                                     \%setters));
+                                     $by_ip,$clientip,$blockdom,\%setters));
     }
 }
 
@@ -1340,7 +1340,6 @@
     }
     #$output .= &Apache::loncommon::build_block_table($startblock,$endblock,
     #                                                 $setters);
-    
     my ($blocked, $blocktext) = &Apache::loncommon::blocking_status("com",$clientip);
     $output .="<br /><br />".$blocktext;
 
@@ -2119,7 +2118,7 @@
     my $clientip = &Apache::lonnet::get_requestor_ip($r);
 
 # info to generate "next" and "previous" buttons and check if message is blocked
-    my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) = 
+    my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) =
         &Apache::loncommon::blockcheck(\%setters,'com',$clientip);
     my @messages=&sortedmessages(\%blocked,$startblock,$endblock,$by_ip,\$numblocked,$folder,$msgstatus);
     if ( $blocked{$msgid} eq 'ON' ) {




More information about the LON-CAPA-cvs mailing list