[LON-CAPA-cvs] cvs: loncom(GCI_2) /interface lonpreferences.pm

raeburn raeburn@source.lon-capa.org
Mon, 07 Dec 2009 01:41:32 -0000


raeburn		Mon Dec  7 01:41:32 2009 EDT

  Modified files:              (Branch: GCI_2)
    /loncom/interface	lonpreferences.pm 
  Log:
  - Correction to previous attempted backport of 1.174. 
  
  
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.125.8.4 loncom/interface/lonpreferences.pm:1.125.8.5
--- loncom/interface/lonpreferences.pm:1.125.8.4	Mon Dec  7 00:04:10 2009
+++ loncom/interface/lonpreferences.pm	Mon Dec  7 01:41:31 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.125.8.4 2009/12/07 00:04:10 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.125.8.5 2009/12/07 01:41:31 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2123,9 +2123,11 @@
 
 sub toggle_debug {
     if (&can_toggle_debug()) {
-        &Apache::lonnet::delenv('user.debug');
-    } else {
-        &Apache::lonnet::appenv({'user.debug' => 1});
+        if ($env{'user.debug'}) {
+            &Apache::lonnet::delenv('user.debug');
+        } else {
+            &Apache::lonnet::appenv({'user.debug' => 1});
+        }
     }
 }