[LON-CAPA-cvs] cvs: loncom / lond

foxr foxr at source.lon-capa.org
Mon Mar 26 07:03:34 EDT 2012


foxr		Mon Mar 26 11:03:34 2012 EDT

  Modified files:              
    /loncom	lond 
  Log:
  BZ6580 - in is_author - untie the user hash as well as tying it.
  
  
  
Index: loncom/lond
diff -u loncom/lond:1.486 loncom/lond:1.487
--- loncom/lond:1.486	Tue Feb 28 15:54:07 2012
+++ loncom/lond	Mon Mar 26 11:03:34 2012
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.486 2012/02/28 15:54:07 raeburn Exp $
+# $Id: lond,v 1.487 2012/03/26 11:03:34 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -60,7 +60,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.486 $'; #' stupid emacs
+my $VERSION='$Revision: 1.487 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -6717,14 +6717,22 @@
 
     #  Author role should show up as a key /domain/_au
 
-    my $key    = "/$domain/_au";
     my $value;
-    if (defined($hashref)) {
-	$value = $hashref->{$key};
-    }
+    if ($hashref) {
 
-    if(defined($value)) {
-	&Debug("$user @ $domain is an author");
+	my $key    = "/$domain/_au";
+	if (defined($hashref)) {
+	    $value = $hashref->{$key};
+	    if(!untie_user_hash($hashref)) {
+		return 'error: ' .  ($!+0)." untie (GDBM) Failed";
+	    }
+	}
+	
+	if(defined($value)) {
+	    &Debug("$user @ $domain is an author");
+	}
+    } else {
+	return 'error: '.($!+0)." tie (GDBM) Failed";
     }
 
     return defined($value);




More information about the LON-CAPA-cvs mailing list