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

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 27 Jul 2006 15:48:56 -0000


raeburn		Thu Jul 27 11:48:56 2006 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm 
  Log:
  Attachments included in bulletin board posts were not being stored in one case. 
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.212 loncom/interface/lonfeedback.pm:1.213
--- loncom/interface/lonfeedback.pm:1.212	Tue Jul 18 13:44:43 2006
+++ loncom/interface/lonfeedback.pm	Thu Jul 27 11:48:56 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.212 2006/07/18 17:44:43 albertel Exp $
+# $Id: lonfeedback.pm,v 1.213 2006/07/27 15:48:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -713,8 +713,8 @@
     if ($discussiononly) {
         my $now = time;
         my $attachnum = 0;
-        my $currnewattach;
-        my $currdelold;
+        my $currnewattach = [];
+        my $currdelold = [];
         my $comment = '';
         my $subject = '';
         if ($env{'form.origpage'}) {
@@ -1683,7 +1683,7 @@
                 }
             }
             if ($attachmsg) {
-                $r->print("<b>Retained attachments</b>:$attachmsg<br />\n");
+                $r->print("<br /><b>Retained attachments</b>:$attachmsg<br />\n");
             }
             if ($newattachmsg) {
                 $r->print("$newattachmsg<br />");
@@ -2920,7 +2920,7 @@
             }
         }
     }
-    if (@{$currnewattach} > 0) {
+    if ((ref($currnewattach) eq 'ARRAY') && (@{$currnewattach} > 0)) {
         $r->print("The following attachments have been uploaded for inclusion with this posting.<br />Check the checkboxes for any you wish to remove<br />\n");
         foreach (@{$currnewattach}) {
             $_ =~ m#/([^/]+)$#;