add mimetype as title attribute in folder listing

This commit is contained in:
Uwe Steinmann 2022-06-08 16:05:39 +02:00
parent 6cb9556e87
commit 3dd4fb145b

View File

@ -572,6 +572,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$displayname = $obj->getName().'/';
$filesize = 0;
$mtime = $obj->getDate();
$mimetype = '';
} else {
$content = $obj->getLatestContent();
@ -604,7 +605,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
printf($format,
number_format($filesize),
strftime("%Y-%m-%d %H:%M:%S", $mtime),
"<a href=\"".$_SERVER['SCRIPT_NAME'].htmlspecialchars($fullpath)."\">".htmlspecialchars($displayname, ENT_QUOTES)."</a>");
"<a href=\"".$_SERVER['SCRIPT_NAME'].htmlspecialchars($fullpath)."\"".($mimetype ? " title=\"".$mimetype."\"" : "").">".htmlspecialchars($displayname, ENT_QUOTES)."</a>");
}
echo "</pre>";