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

raeburn lon-capa-cvs@mail.lon-capa.org
Tue, 22 Aug 2006 17:15:23 -0000


raeburn		Tue Aug 22 13:15:23 2006 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  Stop &aboutmewrapper() returning a : linked to http://$SERVER_NAME///aboutme when username and domain have no value.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.446 loncom/interface/loncommon.pm:1.447
--- loncom/interface/loncommon.pm:1.446	Fri Aug 18 16:24:54 2006
+++ loncom/interface/loncommon.pm	Tue Aug 22 13:15:19 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.446 2006/08/18 20:24:54 albertel Exp $
+# $Id: loncommon.pm,v 1.447 2006/08/22 17:15:19 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2109,6 +2109,9 @@
 
 sub aboutmewrapper {
     my ($link,$username,$domain,$target)=@_;
+    if (!defined($username)  && !defined($domain)) {
+        return;
+    }
     return '<a href="/adm/'.$domain.'/'.$username.'/aboutme"'.
 	($target?' target="$target"':'').' title="'.&mt('View this users personal page').'">'.$link.'</a>';
 }