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

raeburn lon-capa-cvs@mail.lon-capa.org
Mon, 13 Sep 2004 05:12:56 -0000


raeburn		Mon Sep 13 01:12:56 2004 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm 
  Log:
  Fix bug #3469. Make sure that hash values are not only defined but also are NOT ''.
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.122 loncom/interface/lonfeedback.pm:1.123
--- loncom/interface/lonfeedback.pm:1.122	Tue Aug 31 18:27:10 2004
+++ loncom/interface/lonfeedback.pm	Mon Sep 13 01:12:56 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.122 2004/08/31 22:27:10 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.123 2004/09/13 05:12:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -177,22 +177,30 @@
 
 # Override user's default if user specified display setting for this discussion
     if (defined($dischash{$ondispkey})) {
-        $markondisp = $dischash{$ondispkey};
+        unless ($dischash{$ondispkey} eq '') {
+            $markondisp = $dischash{$ondispkey};
+        }
     }
     if ($markondisp) {
         $discinfo{$lastkey} = time;
     }
 
     if (defined($dischash{$showkey})) {
-        $showonlyunread = $dischash{$showkey};
+        unless ($dischash{$showkey} eq '') {
+            $showonlyunread = $dischash{$showkey};
+        }
     }
 
     if (defined($dischash{$markkey})) {
-        $showunmark = $dischash{$markkey};
+        unless ($dischash{$markkey} eq '') {
+            $showunmark = $dischash{$markkey};
+        }
     }
 
     if (defined($dischash{$visitkey})) {
-        $visit = $dischash{$visitkey};
+        unless ($dischash{$visitkey} eq '') {
+            $visit = $dischash{$visitkey};
+        }
     }
     $visit ++;