diff --git a/main/document/document.inc.php b/main/document/document.inc.php
index 63a131be12..3b9b7dd15a 100644
--- a/main/document/document.inc.php
+++ b/main/document/document.inc.php
@@ -1,4 +1,4 @@
-'.Display::return_icon($forcedownload_icon, get_lang('Download'),array('height'=>'16', 'width' => '16')).'';
-
- $tooltip_title = str_replace('?cidReq='.$_GET['cidReq'],'',basename($path));
- return ''.$title.''.$force_download_html;
+ //$tooltip_title = str_replace('?cidReq='.$_GET['cidReq'],'',basename($path));
+ $tooltip_title = explode('?', basename($path));
+ $tooltip_title = $tooltip_title[0];
+
+ if (!$show_as_icon)
+ {
+ $force_download_html = ($size==0)?'':''.Display::return_icon($forcedownload_icon, get_lang('Download'),array('height'=>'16', 'width' => '16')).'';
+ return ''.$title.''.$force_download_html;
+ }
+ else
+ {
+ return ''.build_document_icon_tag($filetype, $tooltip_title).'';
+ }
}
/**
@@ -193,14 +209,20 @@ function create_document_link($www,$title,$path,$filetype,$size,$visibility)
* @param string $path
* @return string img html tag
*/
-function build_document_icon_tag($type,$path)
+function build_document_icon_tag($type, $path)
{
- $icon='folder_document.gif';
- if($type=='file')
+ $basename = basename($path);
+
+ if ($type == 'file')
{
- $icon=choose_image(basename($path));
+ $icon = choose_image($basename);
}
- return Display::return_icon($icon, '', array('hspace'=>'5', 'align' => 'middle'));
+ else
+ {
+ $icon = 'folder_document.gif';
+ }
+
+ return Display::return_icon($icon, $basename, array('hspace'=>'5', 'align' => 'middle'));
}
/**
@@ -404,4 +426,4 @@ function display_user_link_document($user_id, $name)
}
}
-?>
\ No newline at end of file
+?>
diff --git a/main/document/document.php b/main/document/document.php
index d11db4e988..a8832f29c1 100644
--- a/main/document/document.php
+++ b/main/document/document.php
@@ -1,4 +1,4 @@
-
-
+
'.$invisibility_span_open.nl2br(htmlspecialchars($id['comment'],ENT_QUOTES,$charset)).$invisibility_span_close.$user_link;
+
//comments => display comment under the document name
//$row[] = $invisibility_span_open.nl2br(htmlspecialchars($id['comment'])).$invisibility_span_close;
$display_size = format_file_size($size);