Skip to content
Browse files

removed file pop-ups

  • Loading branch information...
1 parent 14637fc commit 42dc0e903b1c3b41b460eaf8e48fb2af53169ca4 skodak committed Jul 12, 2005
Showing with 9 additions and 11 deletions.
  1. +9 −11 mod/forum/lib.php
View
20 mod/forum/lib.php
@@ -2185,30 +2185,28 @@ function forum_print_attachments($post, $return=NULL) {
if ($basedir = forum_file_area($post)) {
if ($files = get_directory_list($basedir)) {
$strattachment = get_string("attachment", "forum");
- $strpopupwindow = get_string("popupwindow");
foreach ($files as $file) {
$icon = mimeinfo("icon", $file);
if ($CFG->slasharguments) {
- $ffurl = "file.php/$filearea/$file";
+ $ffurl = "$CFG->wwwroot/file.php/$filearea/$file";
} else {
- $ffurl = "file.php?file=/$filearea/$file";
+ $ffurl = "$CFG->wwwroot/file.php?file=/$filearea/$file";
}
- $image = "<img border=\"0\" src=\"$CFG->pixpath/f/$icon\" height=\"16\" width=\"16\" alt=\"$strpopupwindow\" />";
+ $image = "<img border=\"0\" src=\"$CFG->pixpath/f/$icon\" height=\"16\" width=\"16\" alt=\"\" />";
if ($return == "html") {
- $output .= "<a href=\"$CFG->wwwroot/$ffurl\">$image</a> ";
- $output .= "<a href=\"$CFG->wwwroot/$ffurl\">$file</a><br />";
+ $output .= "<a href=\"$ffurl\">$image</a> ";
+ $output .= "<a href=\"$ffurl\">$file</a><br />";
} else if ($return == "text") {
- $output .= "$strattachment $file:\n$CFG->wwwroot/$ffurl\n";
+ $output .= "$strattachment $file:\n$ffurl\n";
} else {
if ($icon == "image.gif") { // Image attachments don't get printed as links
- $imagereturn .= "<br /><img src=\"$CFG->wwwroot/$ffurl\" alt=\"\" />";
+ $imagereturn .= "<br /><img src=\"$ffurl\" alt=\"\" />";
} else {
- link_to_popup_window("/$ffurl", "attachment", $image, 500, 500, $strattachment);
- echo "<a href=\"$CFG->wwwroot/$ffurl\">$file</a>";
- echo "<br />";
+ echo "<a href=\"$ffurl\">$image</a> ";
+ echo "<a href=\"$ffurl\">$file</a><br />";
}
}
}

0 comments on commit 42dc0e9

Please sign in to comment.
Something went wrong with that request. Please try again.