--- loncom/publisher/lonpubdir.pm	2011/12/23 14:54:26	1.139
+++ loncom/publisher/lonpubdir.pm	2011/12/23 19:07:50	1.141
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.139 2011/12/23 14:54:26 www Exp $
+# $Id: lonpubdir.pm,v 1.141 2011/12/23 19:07:50 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -524,7 +524,7 @@ sub putresource {
     my $css_class='LC_browser_file';
     my $title=' ';
     my $publish_button=&mt('Publish');
-    my $cstr_dir = $r->dir_config('lonDocRoot').'/priv/'.$udom.'/'.$uname.'/'.$thisdisfn.'/';
+    my $cstr_dir = $r->dir_config('lonDocRoot').'/priv'.$thisdisfn;
     my $linkfilename=&HTML::Entities::encode('/priv'.$thisdisfn.'/'.$filename,'<>&"');
 
     if (-e $resdir.'/'.$filename) {
@@ -596,11 +596,18 @@ sub putresource {
 
 	if (!$meta_same) {
 	    $title = &mt('Metadata Modified').'<br />'.$title.
-		'<br /><a href="/adm/diff?filename=/priv/'.$linkfilename.'.meta'.
-		'&amp;versiontwo=priv" target="cat">'.&mt('Metadata Diffs').'</a>';
-	    $title.="\n".'<br /><a href="/adm/retrieve?filename='.$linkfilename.'.meta" target="_parent">'.&mt('Retrieve Metadata').'</a>';
+		'<br />'.
+                &Apache::loncommon::modal_link(
+                    '/adm/diff?filename='.$linkfilename.'.meta'.'&amp;versiontwo=priv',
+                    &mt('Metadata Diffs'),600,500);
+	    $title.="\n".'<br />'.
+                &Apache::loncommon::modal_link(
+                    '/adm/retrieve?filename='.$linkfilename.'.meta&amp;inhibitmenu=yes&amp;add_modal=yes',
+                    &mt('Retrieve Metadata'),600,500);
 	}
-	$status.="\n".'<br /><a href="/adm/retrieve?filename='.$linkfilename.'" target="_parent">'.&mt('Retrieve').'</a>';
+	$status.="\n".'<br />'.
+             &Apache::loncommon::modal_link(
+                 '/adm/retrieve?filename='.$linkfilename.'&amp;inhibitmenu=yes&amp;add_modal=yes',&mt('Retrieve'),600,500);
     }
     my $editlink='';
     my $editlink2='';